d@0: d@0: d@0: Fortran-interface routines - FFTW 3.2.1 d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0:
d@0:

d@0: d@0: d@0: Next: , d@0: Previous: Calling FFTW from Fortran, d@0: Up: Calling FFTW from Fortran d@0:


d@0:
d@0: d@0:

7.1 Fortran-interface routines

d@0: d@0:

Nearly all of the FFTW functions have Fortran-callable equivalents. The d@0: name of the Fortran routine is the same as that of the corresponding C d@0: routine, but with the `fftw_' prefix replaced by `dfftw_'. d@0: (The single and long-double precision versions use `sfftw_' and d@0: `lfftw_', respectively, instead of `fftwf_' and d@0: `fftwl_'.)1 d@0: d@0:

For the most part, all of the arguments to the functions are the same, d@0: with the following exceptions: d@0: d@0:

d@0: d@0:

In general, you should take care to use Fortran data types that d@0: correspond to (i.e. are the same size as) the C types used by FFTW. If d@0: your C and Fortran compilers are made by the same vendor, the d@0: correspondence is usually straightforward (i.e. integer d@0: corresponds to int, real corresponds to float, d@0: etcetera). The native Fortran double/single-precision complex type d@0: should be compatible with fftw_complex/fftwf_complex. d@0: Such simple correspondences are assumed in the examples below. d@0: d@0: d@0: d@0:

d@0:
d@0:

Footnotes

[1] Technically, Fortran 77 identifiers are d@0: not allowed to have more than 6 characters, nor may they contain d@0: underscores. Any compiler that enforces this limitation doesn't deserve d@0: to link to FFTW.

d@0: d@0:

[2] The d@0: reason for this is that some Fortran implementations seem to have d@0: trouble with C function return values, and vice versa.

d@0: d@0:


d@0: d@0: d@0: