From f23a2b33ca1bebf0c3a5fa26fdcff11827744b77 Mon Sep 17 00:00:00 2001 From: Marcus D Leech Date: Sun, 16 May 2010 08:30:03 -0700 Subject: gnuradio-core: allows configuring FFTW to use ESTIMATE vs. MEASURE --- gnuradio-core/src/lib/general/gri_fft.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gnuradio-core/src/lib/general') diff --git a/gnuradio-core/src/lib/general/gri_fft.cc b/gnuradio-core/src/lib/general/gri_fft.cc index e535f28c7..1ce14eefd 100644 --- a/gnuradio-core/src/lib/general/gri_fft.cc +++ b/gnuradio-core/src/lib/general/gri_fft.cc @@ -28,6 +28,7 @@ #include #include #include +#include boost::mutex & @@ -113,7 +114,9 @@ gri_fft_complex::gri_fft_complex (int fft_size, bool forward) reinterpret_cast(d_inbuf), reinterpret_cast(d_outbuf), forward ? FFTW_FORWARD : FFTW_BACKWARD, - FFTW_MEASURE); + gr_prefs::singleton()->get_bool("fftw", "estimate", false) == true ? FFTW_ESTIMATE + : FFTW_MEASURE); + if (d_plan == NULL) { fprintf(stderr, "gri_fft_complex: error creating plan\n"); @@ -165,7 +168,8 @@ gri_fft_real_fwd::gri_fft_real_fwd (int fft_size) d_plan = fftwf_plan_dft_r2c_1d (fft_size, d_inbuf, reinterpret_cast(d_outbuf), - FFTW_MEASURE); + gr_prefs::singleton()->get_bool("fftw", "estimate", false) == true ? FFTW_ESTIMATE + : FFTW_MEASURE); if (d_plan == NULL) { fprintf(stderr, "gri_fft_real_fwd: error creating plan\n"); -- cgit