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