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

cannam@167: cannam@167:

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

cannam@167:

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

cannam@167: cannam@167:

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

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