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