Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: FFTW 3.3.8: Calling FFTW from Modern Fortran Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:

Chris@82: Next: , Previous: , Up: Top   [Contents][Index]

Chris@82:
Chris@82:
Chris@82: Chris@82:

7 Calling FFTW from Modern Fortran

Chris@82: Chris@82: 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: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: