Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:Chris@82: Next: Calling FFTW from Legacy Fortran, Previous: Distributed-memory FFTW with MPI, Up: Top [Contents][Index]
Chris@82:Fortran 2003 standardized ways for Fortran code to call C libraries, Chris@82: and this allows us to support a direct translation of the FFTW C API Chris@82: into Fortran. Compared to the legacy Fortran 77 interface Chris@82: (see Calling FFTW from Legacy Fortran), this direct interface Chris@82: offers many advantages, especially compile-time type-checking and Chris@82: aligned memory allocation. As of this writing, support for these C Chris@82: interoperability features seems widespread, having been implemented in Chris@82: nearly all major Fortran compilers (e.g. GNU, Intel, IBM, Chris@82: Oracle/Solaris, Portland Group, NAG). Chris@82: Chris@82:
Chris@82:This chapter documents that interface. For the most part, since this Chris@82: interface allows Fortran to call the C interface directly, the usage Chris@82: is identical to C translated to Fortran syntax. However, there are a Chris@82: few subtle points such as memory allocation, wisdom, and data types Chris@82: that deserve closer attention. Chris@82:
Chris@82:• Overview of Fortran interface: | Chris@82: | |
• Reversing array dimensions: | Chris@82: | |
• FFTW Fortran type reference: | Chris@82: | |
• Plan execution in Fortran: | Chris@82: | |
• Allocating aligned memory in Fortran: | Chris@82: | |
• Accessing the wisdom API from Fortran: | Chris@82: | |
• Defining an FFTW module: | Chris@82: |