cannam@95: cannam@95: cannam@95: FFTW Constants in Fortran - FFTW 3.3.3 cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95: cannam@95:
cannam@95: cannam@95:

cannam@95: Next: , cannam@95: Previous: Fortran-interface routines, cannam@95: Up: Calling FFTW from Legacy Fortran cannam@95:


cannam@95:
cannam@95: cannam@95:

8.2 FFTW Constants in Fortran

cannam@95: cannam@95:

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

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

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