cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: FFTW 3.3.5: FFTW Constants in Fortran 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.2 FFTW Constants in Fortran

cannam@127: cannam@127:

When creating plans in FFTW, a number of constants are used to specify cannam@127: options, such as FFTW_MEASURE or FFTW_ESTIMATE. The cannam@127: same constants must be used with the wrapper routines, but of course the cannam@127: C header files where the constants are defined can’t be incorporated cannam@127: directly into Fortran code. cannam@127:

cannam@127:

Instead, we have placed Fortran equivalents of the FFTW constant cannam@127: definitions in the file fftw3.f, which can be found in the same cannam@127: directory as fftw3.h. If your Fortran compiler supports a cannam@127: preprocessor of some sort, you should be able to include or cannam@127: #include this file; otherwise, you can paste it directly into cannam@127: your code. cannam@127:

cannam@127: cannam@127:

In C, you combine different flags (like FFTW_PRESERVE_INPUT and cannam@127: FFTW_MEASURE) using the ‘|’ operator; in Fortran cannam@127: you should just use ‘+’. (Take care not to add in the cannam@127: same flag more than once, though. Alternatively, you can use the cannam@127: ior intrinsic function standardized in Fortran 95.) cannam@127:

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