cannam@167: cannam@167: cannam@167: cannam@167: cannam@167:
cannam@167:cannam@167: Next: Calling FFTW from Legacy Fortran, Previous: Distributed-memory FFTW with MPI, Up: Top [Contents][Index]
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:• Overview of Fortran interface: | cannam@167: | |
• Reversing array dimensions: | cannam@167: | |
• FFTW Fortran type reference: | cannam@167: | |
• Plan execution in Fortran: | cannam@167: | |
• Allocating aligned memory in Fortran: | cannam@167: | |
• Accessing the wisdom API from Fortran: | cannam@167: | |
• Defining an FFTW module: | cannam@167: |