Functions | |
void * | createArrayDesc_F90Vendor (void *desc, void *hidden, int rank, F90_DescType desc_type) |
Creates an array descriptor by copying an existing array and hidden descriptor pair. | |
int | setArrayDesc_F90Vendor (void *desc, void *base_addr, int rank, F90_DescType desc_type, F90_ArrayDataType data_type, unsigned long element_size, const long *lowerBound, const unsigned long *extent, const long *strideMult) |
Sets the elements of a preallocated array descriptor. | |
int | resetArrayDesc_F90Vendor (void *desc, void *base_addr, int rank, const long *lowerBound, const unsigned long *extent, const long *strideMult) |
Resets the elements of a preallocated array descriptor. |
Descriptors created by these functions may be permanently stored in C (as long as the array associated with the descriptor has not freed; it is an error to use a descriptor if the associated array has been freed). However, these descriptors cannot be directly used in a procedure call to Fortran as the call may require a hidden descriptor parameter (depending on the Fortran compiler). Descriptors created by these functions must first be converted to a descriptor and hidden descriptor pair by a function in the "Procedure Call" group.
|
Creates an array descriptor by copying an existing array and hidden descriptor pair. This function is used when passing an array from Fortran to C. The array and hidden descriptor input parameters are obtained from the Fortran calling procedure; they must not be otherwise stored or saved. The returned descriptor cannot be directly used in calls to Fortran because a hidden descriptor may be required by some compilers. The created descriptor may be copied to a descriptor and hidden descriptor pair by either createArrayDescAndHidden_F90Vendor() (for a C call to Fortran) or by copyToArrayDescAndHidden_F90Vendor() (for modifying an array pointer on return from a Fortran call to C). Note, it is the callers responsibility to free the returned descriptor.
|
|
Resets the elements of a preallocated array descriptor. The descriptor must have been previously initialized by either setArrayDesc_F90Vendor() or createArrayDesc_F90Vendor(). The rank, data type and element size of the array MUST NOT change. Note, at least, getArrayDescSize_F90Vendor() bytes must have been allocated for the descriptor.
|
|
Sets the elements of a preallocated array descriptor. This function is used when memory for an array has been created in C and the C array is to be subsequently passed to a Fortran procedure. The initialized descriptor cannot be directly used in calls to Fortran because a hidden descriptor parameter may be required by some compilers. The initialized descriptor may be copied to a descriptor and hidden descriptor pair by either createArrayDescAndHidden_F90Vendor() (for a C call to Fortran) or by copyToArrayDescAndHidden_F90Vendor() (for modifying an array pointer on return from a Fortran call to C). Memory for the descriptor is allocated and freed by the caller. The size of descriptor must be at least getArrayDescSize_F90Vendor() bytes.
|