@z This file was created by Aleksandar Donev as part of the Sphere Packing Project. Feel free to use any portion of it and contact me at adonev@princeton.edu @x \Title{Tinkering with Array Descriptors in F95} \author{Aleksandar Donev} \date{\today} \maketitle @*0 Module |Array_Descriptors|. @a MODULE Array_Descriptors @; USE Precision @; USE ISO_C_BINDING @; IMPLICIT NONE @; PRIVATE @; PUBLIC :: MakeArrayDescriptor @; @@; END MODULE Array_Descriptors @; @*1 Making Array Descriptors. In this case there is really no need of a Fortran wrapper around the C routines. @m _MakeArrayDescriptor_Declaration(type_,kind_,c_kind_,rank_) @; SUBROUTINE MakeArrayDescriptor_C_@e@&c_kind_@e@&rank_(array_descriptor, base_address, & lower_bounds, upper_bounds, strides) _BoundProcedure(C, MakeArrayDescriptor_C_@e@&c_kind_@e@&rank_) @; USE Precision @; USE ISO_C_BINDING @; _BindProcedure(MakeArrayDescriptor_C_@e@&c_kind_@e@&rank_) @; type_(KIND=kind_), DIMENSION(_FullExtent(rank_)), POINTER :: array_descriptor @; _PassedByValue(base_address, @E _C_PTR) :: base_address @; INTEGER(KIND=C_INT), DIMENSION(rank_), INTENT(IN) :: lower_bounds, upper_bounds, strides @; END SUBROUTINE @; @m _MakeArrayDescriptor_Declaration_TR(t_number_, rank_) @; _MakeArrayDescriptor_Declaration(_AllCBoundTypes(t_number_),_AllCBoundKinds(t_number_),_AllCKinds(t_number_),rank_) @; @= _GenerateExternalInterface_TKR_Array(MakeArrayDescriptor,_MakeArrayDescriptor_Declaration_TR,N_TC_ALL) @; @ @I C_Interop.hweb @I Macros.hweb @%% EOF