Babel Fortran 2003 Binding for Structured Data Types Page: 7 of 11
This article is part of the collection entitled: Office of Scientific & Technical Information Technical Reports and was provided to Digital Library by the UNT Libraries Government Documents Department.
The following text was automatically extracted from the image on this page using optical character recognition software:
Babel Fortran 2003 Binding
the relevant code generation required to support SIDL primitive types, array
types and r-array types as structured data type members.
SIDL Primitive Types The Fortran 2003 iso_c_binding module provides
specific Fortran kinds that enable a direct mapping to C/C++ and SIDL types
and are listed in the left column of Table 3. The right-hand column of Table 3
lists the corresponding Fortran 2003 isocbinding types and kinds that facilitate
C/C++ to Fortran interoperability.
SIDL Array Types
The SIDL array type
exists in order to gen-
eralize the use of many
native array types built
into various program-
ming languages .
The binding we pro-
vide for Fortran 2003
and structs must ad-
here to this philoso-
phy and retain the orig-
inal API's functional-
ity. Figure 4 presents a
high level view of our
approach. The SIDL
definition of sidlArray
provides the basis for
SIDL --- na <dou e,1,comnma 01> si Ariay,
C++ CLIESERVER - F03
strut MsUL doue MPLEMENTATIONf
[ -tType sidAnay type(cptr) si dAnay t e sidi le ocasdAa
=sid1 double anra ueate ld(N)cl stsr typ sdl rylcasdAr )
Fig. 4: Overview of the Fortran 2003 Babel binding for
the SIDL Array Type.
the "interoperability glue" of the client (caller) and server (callee, also implemen-
tation). The glue code consists of 1) Intermediate Object Representation (IOR)
files where the language interoperability actually occurs 2) Stub code that facil-
itates the method call from client to IOR and 3) Skel code that facilitates the
method call from IOR to implementation.
The C++ client code provides a mechanism that creates the array type
createdteld() within the struct and then passes that struct as a pointer
through the IOR files to the Fortran 2003 side. The Fortran 2003 server code con-
sists of module and implementation files. The Fortran 2003 derived data type
definition of sidlArray in the module files contains the bind(C) type cptr which
allows the C++ pointer to be passed directly to the Fortran side. At this point
we include a local declaration of the type within the struct on which the SIDL
array API may be applied. The c-ptr type is then cast to a local type using
Chasm  which provides the underlying Fortran array descriptor that is a
part of the SIDL array type.
SIDL R-array Types The SIDL r-array type allows direct access to ar-
ray data without having to use the accessor functions as required when us-
Here’s what’s next.
This article can be searched. Note: Results may vary based on the legibility of text within the document.
Tools / Downloads
Get a copy of this page or view the extracted text.
Citing and Sharing
Basic information for referencing this web page. We also provide extended guidance on usage rights, references, copying or embedding.
Reference the current page of this Article.
Muszala, S; Epperly, T & Wang, N. Babel Fortran 2003 Binding for Structured Data Types, article, May 2, 2008; Livermore, California. (https://digital.library.unt.edu/ark:/67531/metadc897976/m1/7/: accessed May 26, 2019), University of North Texas Libraries, Digital Library, https://digital.library.unt.edu; crediting UNT Libraries Government Documents Department.