Chris@19: Chris@19:
Chris@19:Chris@19: Next: FFTW Execution in Fortran, Chris@19: Previous: Fortran-interface routines, Chris@19: Up: Calling FFTW from Legacy Fortran Chris@19:
When creating plans in FFTW, a number of constants are used to specify
Chris@19: options, such as FFTW_MEASURE
or FFTW_ESTIMATE
. The
Chris@19: same constants must be used with the wrapper routines, but of course the
Chris@19: C header files where the constants are defined can't be incorporated
Chris@19: directly into Fortran code.
Chris@19:
Chris@19:
Instead, we have placed Fortran equivalents of the FFTW constant
Chris@19: definitions in the file fftw3.f
, which can be found in the same
Chris@19: directory as fftw3.h
. If your Fortran compiler supports a
Chris@19: preprocessor of some sort, you should be able to include
or
Chris@19: #include
this file; otherwise, you can paste it directly into
Chris@19: your code.
Chris@19:
Chris@19:
In C, you combine different flags (like FFTW_PRESERVE_INPUT
and
Chris@19: FFTW_MEASURE
) using the ‘|
’ operator; in Fortran
Chris@19: you should just use ‘+
’. (Take care not to add in the
Chris@19: same flag more than once, though. Alternatively, you can use the
Chris@19: ior
intrinsic function standardized in Fortran 95.)
Chris@19:
Chris@19:
Chris@19:
Chris@19: