Node:Planner Flags, Next:Real-data DFTs, Previous:Complex DFTs, Up:Basic Interface
All of the planner routines in FFTW accept an integer
argument, which is a bitwise OR (
|) of zero or more of the flag
constants defined below. These flags control the rigor (and time) of
the planning process, and can also impose (or lift) restrictions on the
type of transform algorithm that is employed.
FFTW_ESTIMATEspecifies that, instead of actual measurements of different algorithms, a simple heuristic is used to pick a (probably sub-optimal) plan quickly. With this flag, the input/output arrays are not overwritten during planning.
FFTW_MEASUREtells FFTW to find an optimized plan by actually computing several FFTs and measuring their execution time. Depending on your machine, this can take some time (often a few seconds).
FFTW_MEASUREis the default planning option.
FFTW_MEASURE, but considers a wider range of algorithms and often produces a "more optimal" plan (especially for large transforms), but at the expense of several times longer planning time (especially for large transforms).
FFTW_PATIENT, but considers an even wider range of algorithms, including many that we think are unlikely to be fast, to produce the most optimal plan but with a substantially increased planning time.
FFTW_DESTROY_INPUTspecifies that an out-of-place transform is allowed to overwrite its input array with arbitrary data; this can sometimes allow more efficient algorithms to be employed.
FFTW_PRESERVE_INPUTspecifies that an out-of-place transform must not change its input array. This is ordinarily the default, except for c2r and hc2r (i.e. complex-to-real) transforms for which
FFTW_DESTROY_INPUTis the default. In the latter cases, passing
FFTW_PRESERVE_INPUTwill attempt to use algorithms that do not destroy the input, at the expense of worse performance; for multi-dimensional c2r transforms, however, no input-preserving algorithms are implemented and the planner will return
NULLif one is requested.
FFTW_UNALIGNEDspecifies that the algorithm may not impose any unusual alignment requirements on the input/output arrays (i.e. no SIMD may be used). This flag is normally not necessary, since the planner automatically detects misaligned arrays. The only use for this flag is if you want to use the guru interface to execute a given plan on a different array that may not be aligned like the original. (Using
fftw_mallocmakes this flag unnecessary even then.)