10typedef fftw_complex cpx;
23 static fftw_plan forward;
24 static fftw_plan backward;
31 static bool planExists;
47 vector<complex<double>>
fft(
const vector<double> &v);
53 vector<double>
ifft(
const vector<complex<double>> &c);
static void destroyPlan()
Destroy plans once all FFT objects are out of scope. Needed for multi-threading.
static void preInit(int n)
Associated with constructor. Will only be called once per the scope of the FFT object instantiation....
~FFT()
Destroy FFT plans and buffers.
vector< complex< double > > fft(const vector< double > &v)
Apply FFT to vector v.
FFT(int n)
Allocate FFT plans and buffers , enabled for multi-threaded or serial use.
vector< double > ifft(const vector< complex< double > > &c)
Apply IFFT to complex vector c.