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