Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW*From*: Mark Borgerding <mark@xxxxxxxxxxxxxx>*Date*: Thu, 05 Apr 2012 10:01:59 -0400

On 04/05/2012 09:57 AM, Mark Borgerding wrote:

I tried to keep this in mind when writing originally. It does nothandle it, but it might not be too hard.There are at least two Achille's heels, both inkiss_cpx_fft::make_twiddles ( file==ei_kissfft_impl.h )1. The exp() function, as others have mentioned. 2. The calculation of pi, as done via acos(-1)Stepping back, what make_twiddles does is make one full cycle of acomplex sinusoid with nfft points and unity magnitude.This problem easily decomposes into a primitive root-finding problem.This can be done very efficiently in most cases for the FFT, sincepeople tend to use a length that is a multiple of small primes (2,3,5)(Let me know if this is not clear and I can provide an example.) In other words, if we had a root-finding function template<typename Scalar>Scalar nth_root( const Scalar & x, int n); // maybe implemented viaNewton-Raphson ?then make_twiddles could be specialized to use it for types other thancomplex<float|double|long double>The real_twiddles function also contains some trig calls -- thesecould derived in a similar way.On 04/05/2012 07:04 AM, Pavel Holoborodko wrote:Yes, I have my own multiple precision complex exp() in std space, as well as other math. functions. Seems to work fine in all other contexts (including Eigen itself), but doesn't help with FFT :(On Apr 5, 2012, at 19:52, "Björn Piltz"<bjornpiltz@xxxxxxxxxxxxxx>wrote:I think std::exp() might be a candidate. Try addingnamespace std { std::complex<Real> exp(conststd::complex<Real>&); }to your file to see if it's the culprit. Björn

**References**:**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Pavel Holoborodko

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Márton Danóczy

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Pavel Holoborodko

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Márton Danóczy

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Björn Piltz

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Pavel Holoborodko

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Mark Borgerding

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW** - Next by Date:
**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW** - Previous by thread:
**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW** - Next by thread:
**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |