Next: , Previous: , Up: Basic Interface   [Contents][Index]

4.3.2 Planner Flags

All of the planner routines in FFTW accept an integer flags 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.

Important: the planner overwrites the input array during planning unless a saved plan (see Wisdom) is available for that problem, so you should initialize your input data after creating the plan. The only exceptions to this are the FFTW_ESTIMATE and FFTW_WISDOM_ONLY flags, as mentioned below.

In all cases, if wisdom is available for the given problem that was created with equal-or-greater planning rigor, then the more rigorous wisdom is used. For example, in FFTW_ESTIMATE mode any available wisdom is used, whereas in FFTW_PATIENT mode only wisdom created in patient or exhaustive mode can be used. See Words of Wisdom-Saving Plans.

Planning-rigor flags

Algorithm-restriction flags

Limiting planning time

extern void fftw_set_timelimit(double seconds);

This function instructs FFTW to spend at most seconds seconds (approximately) in the planner. If seconds == FFTW_NO_TIMELIMIT (the default value, which is negative), then planning time is unbounded. Otherwise, FFTW plans with a progressively wider range of algorithms until the given time limit is reached or the given range of algorithms is explored, returning the best available plan.

For example, specifying FFTW_PATIENT first plans in FFTW_ESTIMATE mode, then in FFTW_MEASURE mode, then finally (time permitting) in FFTW_PATIENT. If FFTW_EXHAUSTIVE is specified instead, the planner will further progress to FFTW_EXHAUSTIVE mode.

Note that the seconds argument specifies only a rough limit; in practice, the planner may use somewhat more time if the time limit is reached when the planner is in the middle of an operation that cannot be interrupted. At the very least, the planner will complete planning in FFTW_ESTIMATE mode (which is thus equivalent to a time limit of 0).

Next: , Previous: , Up: Basic Interface   [Contents][Index]