|Re: [eigen] FFT for Eigen|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
Thomas Capricelli wrote:
The way fftw works is the following : you create a "plan" (describing
dimensions, sizes, type and so on), and you use the plan on data. The idea of
course is that you create the plan once and use it several times. I am not
sure if this is good or bad wrt to the use of fftw in eigen. Just wanted to
The concept of a "plan" is a common idiom among kissfft, FFTW, and IMKL.
The responsibility of creating and maintaining this plan would be shared
between the FFT class and the traits class.
In typical usage, the FFT "plan" will have the same lifetime as the FFT
object. This could be tweaked by extending the traits class.
FFT fft(1024); // the FFT executive object
fft.fwd( freqVec1, timeVec1 ); // this creates the forward plan for
// and calculates freqVec1 =
fft.fwd(freqVec2, timeVec2) ; // this reuses the previous plan
freqVec3 = frecVec1 * freqVec2; // or whatever...
fft.inv(timeVec3, freqVec3); // this creates an inverse plan for
// and calculates timeVec3 = IFFT(freqVec3)
} // ~FFT destroys both plans