FFTW
PySOFFT uses FFTW for the computation of normal fast Fourier transforms.
Flags
In the creation of a transform instance you can specify FFTW flags that are used in the creation of fft plans. Many of these flags are acessible at
from pysofft import fftw
fftw.flags
from pysofft import Soft,fftw
flags = fftw.flags
s = Soft(32,init_ffts = True,fftw_flags=flags.fftw_measure)
fftw_measure can bring significant speedups compared to the default fftw_estimate.
Wisdom
FFTW wisdom is the idea to save the optimal fft execution strategies to a file and reload them at a later time, since plan creation using fftw_measure or even fftw_exhaustive can take a lot of time.
You can make use of this feature as follows:
from pysofft import Soft,fftw
s = Soft(32,
use_fftw_wisdom = True,
init_ffts=True,
fftw_flags = fftw.flags.fftw_measure)
~/.config/pysofft/fftw_wisdom.dat.You can change the location of the used wisdom file:
from pysofft import fftw
fftw.set_wisdom_file_path('~/some/other/path/your_wisdom.dat')
multiprocessing
To avoid race conditions and possible file corruptions, saving wisdom is only permitted from the master process in python. The program wont crash but wisdom is simply not saved if computed from a child process. Loading wisdom is always possible.