You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switching to Byte-Based Strides in LFortran's Array Descriptor
Background
LFortran's internal array descriptor is designed to be compatible with
CFI_cdesc_t (the ISO_Fortran_binding descriptor), but it currently stores
strides in element units rather than byte units. This mismatch requires
conversion at every bind(c) boundary.
This document summarizes why switching to byte-based strides is the right move.
Plan: Align LFortran Descriptor with Fortran Standard / Flang
Problem
LFortran's array descriptor (CFI_cdesc_t) diverges from the Fortran standard
and from both GFortran and Flang in several ways. This causes ABI
incompatibility with any C code compiled against a standard-compliant
ISO_Fortran_binding.h.
Plan for Implementing Quadruple Precision (REAL(KIND=16)) in LFortran
Overview
LFortran will support full IEEE 754 binary128 quadruple precision (REAL(KIND=16) and COMPLEX(KIND=16)) using LLVM’s native fp128 type for all arithmetic and most operations. This provides exact binary128 semantics (15-bit exponent, 113-bit mantissa) on every target LLVM supports.
Transcendental intrinsics will be provided through an optional, thin runtime wrapper that can link to libquadmath (or the platform’s _Float128 / long-double functions when available). Basic operations, array intrinsics, and most language features will work with zero extra dependencies.
The implementation is designed to be incremental, portable, and consistent with existing LFortran infrastructure (ASR → LLVM IR lowering, runtime library, multiple backends, JIT).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters