ISO_Fortran_binding supports C/Fortran interoperability by providing the Fortran 2018 ISO_Fortran_binding.h
C header file, corresponding function definitions, and CMake scripts for building, testing, and installing static and dynamic libraries. C programs may use the provided function to manipulate interoperable Fortran data objects by exploiting metadata describing the type, rank, extents, contiguity, and other information about the object.
CFI_allocate
, CFI_deallocate
. Allocate or deallocate Fortran allocatable variables. ๐ CFI_establish
. Establish the metadata necessary to access Fortran variables inside a C descriptor struct
.CFI_address
. If a C descriptor describes a scalar variable, find its address. If it describes an array, find the address of the element with column-major (Fortran ordering) indexing. :house:CFI_is_contiguous
. Determine whether a Fortran array is contiguous.CFI_select_part
. Update a C descriptor to select an element or contiguous elements of a Fortran derived type. The variable whose part is selected could be an array section of derived type. ๐ฃโ CFI_section
. Update a C descriptor to select a section of an array. The array can be of interoperable derived types. The array can also be composed of elements of a derived type, i.e., a C descriptor updated by CFI_select_part
. The array can also be a section.CFI_setpointer
: Update a C descriptor to point at a Fortran variable. ๐น Build, test, and install
cd ISO_Fortran_binding
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=<insert-install-path-here>
make
ctest
make install
This repository uses GNU C language extensions that are not supported by the clang compiler.