cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: FFTW 3.3.8: Fortran-interface routines cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167:
cannam@167:

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

cannam@167:
cannam@167:
cannam@167: cannam@167:

8.1 Fortran-interface routines

cannam@167: cannam@167:

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

cannam@167:

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

cannam@167: cannam@167: cannam@167:

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

cannam@167:
cannam@167:
cannam@167:

Footnotes

cannam@167: cannam@167:

(9)

cannam@167:

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

cannam@167:

(10)

cannam@167:

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

cannam@167:
cannam@167:
cannam@167:
cannam@167:

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

cannam@167:
cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: