Manage FFTW wisdom data. Wisdom data can be used to significantly accelerate the calculation of the FFTs but implies an initial cost in its calculation. When the FFTW libraries are initialized, they read a system wide wisdom file (typically in /etc/fftw/wisdom), allowing wisdom to be shared between applications other than Octave. Alternatively, the
fftw
function can be used to import wisdom. For examplewisdom = fftw ('dwisdom')will save the existing wisdom used by Octave to the string wisdom. This string can then be saved to a file and restored using the
save
andload
commands respectively. This existing wisdom can be reimported as followsfftw ('dwisdom', wisdom)If wisdom is an empty matrix, then the wisdom used is cleared.
During the calculation of fourier transforms further wisdom is generated. The fashion in which this wisdom is generated is equally controlled by the
fftw
function. There are five different manners in which the wisdom can be treated, these being
- 'estimate'
- This specifies that no run-time measurement of the optimal means of calculating a particular is performed, and a simple heuristic is used to pick a (probably sub-optimal) plan. The advantage of this method is that there is little or no overhead in the generation of the plan, which is appropriate for a fourier transform that will be calculated once.
- 'measure'
- In this case a range of algorithms to perform the transform is considered and the best is selected based on their execution time.
- 'patient'
- This is like 'measure', but a wider range of algorithms is considered.
- 'exhaustive'
- This is like 'measure', but all possible algorithms that may be used to treat the transform are considered.
- 'hybrid'
- As run-time measurement of the algorithm can be expensive, this is a compromise where 'measure' is used for transforms up to the size of 8192 and beyond that the 'estimate' method is used.
The default method is 'estimate', and the method currently being used can be probed with
method = fftw ('planner')and the method used can be set using
fftw ('planner', method)Note that calculated wisdom will be lost when restarting Octave. However, the wisdom data can be reloaded if it is saved to a file as described above. Saved wisdom files should not be used on different platforms since they will not be efficient and the point of calculating the wisdom is lost.