Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: FFTW 3.3.8: FFTW Constants in Fortran Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:

Chris@82: Next: , Previous: , Up: Calling FFTW from Legacy Fortran   [Contents][Index]

Chris@82:
Chris@82:
Chris@82: Chris@82:

8.2 FFTW Constants in Fortran

Chris@82: Chris@82:

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

Chris@82:

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

Chris@82: Chris@82:

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

Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: