From ec70f8006be1e46055a0d65850c8c60c3bebf6ed Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Sat, 31 Oct 2009 00:13:22 -0400 Subject: added inlines to a bunch of functions --- unsupported/Eigen/FFT | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'unsupported/Eigen/FFT') diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index b1d3d9f0e..8f7a2fcae 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -85,6 +85,7 @@ class FFT inline void ClearFlag(Flag f) { m_flag &= (~(int)f);} + inline void fwd( Complex * dst, const Scalar * src, int nfft) { m_impl.fwd(dst,src,nfft); @@ -92,12 +93,14 @@ class FFT ReflectSpectrum(dst,nfft); } + inline void fwd( Complex * dst, const Complex * src, int nfft) { m_impl.fwd(dst,src,nfft); } template + inline void fwd( std::vector & dst, const std::vector<_Input> & src) { if ( NumTraits<_Input>::IsComplex == 0 && HasFlag(HalfSpectrum) ) @@ -108,6 +111,7 @@ class FFT } template + inline void fwd( MatrixBase & dst, const MatrixBase & src) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(InputDerived) @@ -125,6 +129,7 @@ class FFT fwd( &dst[0],&src[0],src.size() ); } + inline void inv( Complex * dst, const Complex * src, int nfft) { m_impl.inv( dst,src,nfft ); @@ -132,6 +137,7 @@ class FFT scale(dst,1./nfft,nfft); } + inline void inv( Scalar * dst, const Complex * src, int nfft) { m_impl.inv( dst,src,nfft ); @@ -140,6 +146,7 @@ class FFT } template + inline void inv( MatrixBase & dst, const MatrixBase & src) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(OutputDerived) @@ -157,6 +164,7 @@ class FFT } template + inline void inv( std::vector<_Output> & dst, const std::vector & src) { if ( NumTraits<_Output>::IsComplex == 0 && HasFlag(HalfSpectrum) ) @@ -171,18 +179,22 @@ class FFT // TODO: handle Eigen MatrixBase // ---> i added fwd and inv specializations above + unit test, is this enough? (bjacob) + inline impl_type & impl() {return m_impl;} private: template + inline void scale(_It x,_Val s,int nx) { for (int k=0;k>1)+1; for (int k=nhbins;k < nfft; ++k ) freq[k] = conj(freq[nfft-k]); -- cgit v1.2.3