From e3d08443dc272f740447de0147efc69cf7de1c93 Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Wed, 21 Oct 2009 20:53:05 -0400 Subject: inlining,all namespace declaration moved to FFT, removed preprocessor definitions, --- unsupported/Eigen/FFT | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'unsupported/Eigen/FFT') diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index 97ec8e49b..36afdde8d 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -25,29 +25,39 @@ #ifndef EIGEN_FFT_H #define EIGEN_FFT_H -// ei_kissfft_impl: small, free, reasonably efficient default, derived from kissfft -#include "src/FFT/ei_kissfft_impl.h" -#define DEFAULT_FFT_IMPL ei_kissfft_impl +#include +#include +#include +#ifdef EIGEN_FFTW_DEFAULT // FFTW: faster, GPL -- incompatible with Eigen in LGPL form, bigger code size -#ifdef FFTW_ESTIMATE // definition of FFTW_ESTIMATE indicates the caller has included fftw3.h, we can use FFTW routines -#include "src/FFT/ei_fftw_impl.h" -#undef DEFAULT_FFT_IMPL -#define DEFAULT_FFT_IMPL ei_fftw_impl -#endif - -// intel Math Kernel Library: fastest, commercial -- incompatible with Eigen in GPL form -#ifdef _MKL_DFTI_H_ // mkl_dfti.h has been included, we can use MKL FFT routines +# include + namespace Eigen { +# include "src/FFT/ei_fftw_impl.h" + //template typedef struct ei_fftw_impl default_fft_impl; this does not work + template struct default_fft_impl : public ei_fftw_impl {}; + } +#elif defined EIGEN_MKL_DEFAULT // TODO -// #include "src/FFT/ei_imkl_impl.h" -// #define DEFAULT_FFT_IMPL ei_imkl_impl +// intel Math Kernel Library: fastest, commercial -- may be incompatible with Eigen in GPL form + namespace Eigen { +# include "src/FFT/ei_imklfft_impl.h" + template struct default_fft_impl : public ei_imklfft_impl {}; + } +#else +// ei_kissfft_impl: small, free, reasonably efficient default, derived from kissfft +// + namespace Eigen { +# include "src/FFT/ei_kissfft_impl.h" + template + struct default_fft_impl : public ei_kissfft_impl {}; + } #endif namespace Eigen { template - > + typename _Impl=default_fft_impl<_Scalar> > class FFT { public: @@ -120,7 +130,6 @@ class FFT private: impl_type m_impl; }; -#undef DEFAULT_FFT_IMPL } #endif /* vim: set filetype=cpp et sw=2 ts=2 ai: */ -- cgit v1.2.3