cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: FFTW 3.3.5: Fortran-interface routines cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127:
cannam@127:

cannam@127: Next: , Previous: , Up: Calling FFTW from Legacy Fortran   [Contents][Index]

cannam@127:
cannam@127:
cannam@127: cannam@127:

8.1 Fortran-interface routines

cannam@127: cannam@127:

Nearly all of the FFTW functions have Fortran-callable equivalents. cannam@127: The name of the legacy Fortran routine is the same as that of the cannam@127: corresponding C routine, but with the ‘fftw_’ prefix replaced by cannam@127: ‘dfftw_’.9 The single and long-double precision cannam@127: versions use ‘sfftw_’ and ‘lfftw_’, respectively, instead of cannam@127: ‘fftwf_’ and ‘fftwl_’; quadruple precision (real*16) cannam@127: is available on some systems as ‘fftwq_’ (see Precision). cannam@127: (Note that long double on x86 hardware is usually at most cannam@127: 80-bit extended precision, not quadruple precision.) cannam@127:

cannam@127:

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

cannam@127: cannam@127: cannam@127:

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

cannam@127:
cannam@127:
cannam@127:

Footnotes

cannam@127: cannam@127:

(9)

cannam@127:

Technically, Fortran 77 identifiers are not cannam@127: allowed to have more than 6 characters, nor may they contain cannam@127: underscores. Any compiler that enforces this limitation doesn’t cannam@127: deserve to link to FFTW.

cannam@127:

(10)

cannam@127:

The cannam@127: reason for this is that some Fortran implementations seem to have cannam@127: trouble with C function return values, and vice versa.

cannam@127:
cannam@127:
cannam@127:
cannam@127:

cannam@127: Next: , Previous: , Up: Calling FFTW from Legacy Fortran   [Contents][Index]

cannam@127:
cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: