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