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