FFTW Plans and Wisdom




Pretty new to Julia, trying to get an FFT/spectrogram code working with the FFTW interface. I’ve used FFTW in C before, and I’m a bit confused as to how this works regarding plans and wisdom. Is there any provision for saving and reusing wisdom, especially saving/load wisdom files? Can I just save a Plan object to a file using JLD? The FFTing Julia processes will often be short-lived, and so I’d like to reduce re-planning overhead as much as possible.



Yes. It’s undocumented, but you can use FFTW.export_wisdom and FFTW.import_wisdom to export/import wisdom (saved plans) to/from a file: FFTW.export_wisdom(filename) and FFTW.import_wisdom(filename).

You can’t save a Plan object to a JLD file, however. (A Plan object is just a wrapper around an fftw_plan pointer, which will not be a valid pointer in a subsequent Julia run.)


Perfect. Thanks!