cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: FFTW 3.3.8: Calling FFTW from Modern Fortran cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167:
cannam@167:

cannam@167: Next: , Previous: , Up: Top   [Contents][Index]

cannam@167:
cannam@167:
cannam@167: cannam@167:

7 Calling FFTW from Modern Fortran

cannam@167: cannam@167: cannam@167:

Fortran 2003 standardized ways for Fortran code to call C libraries, cannam@167: and this allows us to support a direct translation of the FFTW C API cannam@167: into Fortran. Compared to the legacy Fortran 77 interface cannam@167: (see Calling FFTW from Legacy Fortran), this direct interface cannam@167: offers many advantages, especially compile-time type-checking and cannam@167: aligned memory allocation. As of this writing, support for these C cannam@167: interoperability features seems widespread, having been implemented in cannam@167: nearly all major Fortran compilers (e.g. GNU, Intel, IBM, cannam@167: Oracle/Solaris, Portland Group, NAG). cannam@167: cannam@167:

cannam@167:

This chapter documents that interface. For the most part, since this cannam@167: interface allows Fortran to call the C interface directly, the usage cannam@167: is identical to C translated to Fortran syntax. However, there are a cannam@167: few subtle points such as memory allocation, wisdom, and data types cannam@167: that deserve closer attention. cannam@167:

cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: