commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 11/14: fft: defined a setting for the FFTW


From: git
Subject: [Commit-gnuradio] [gnuradio] 11/14: fft: defined a setting for the FFTW plan options if android or not.
Date: Thu, 12 Mar 2015 19:38:14 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch android
in repository gnuradio.

commit ae225372f9e9229f070e3a15dc8a291ad02ef1b1
Author: Tom Rondeau <address@hidden>
Date:   Fri Jan 2 12:59:09 2015 -0500

    fft: defined a setting for the FFTW plan options if android or not.
---
 gr-fft/lib/fft.cc | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/gr-fft/lib/fft.cc b/gr-fft/lib/fft.cc
index 13ef12a..30d9999 100644
--- a/gr-fft/lib/fft.cc
+++ b/gr-fft/lib/fft.cc
@@ -47,6 +47,13 @@ static int my_fftw_read_char(void *f) { return fgetc((FILE 
*) f); }
 #include <boost/filesystem/path.hpp>
 namespace fs = boost::filesystem;
 
+
+#ifdef ANDROID
+#define FFTW_PLAN_OPTS FFTW_ESTIMATE
+#else
+#define FFTW_PLAN_OPTS FFTW_MEASURE
+#endif
+
 namespace gr {
   namespace fft {
 
@@ -166,8 +173,7 @@ namespace gr {
                                  reinterpret_cast<fftwf_complex *>(d_inbuf),
                                  reinterpret_cast<fftwf_complex *>(d_outbuf),
                                  forward ? FFTW_FORWARD : FFTW_BACKWARD,
-                                  FFTW_ESTIMATE);
-                                 //FFTW_MEASURE);
+                                  FFTW_PLAN_OPTS);
 
       if (d_plan == NULL) {
        fprintf(stderr, "gr::fft: error creating plan\n");
@@ -234,8 +240,7 @@ namespace gr {
       d_plan = fftwf_plan_dft_r2c_1d (fft_size,
                                      d_inbuf,
                                      reinterpret_cast<fftwf_complex 
*>(d_outbuf),
-                                     FFTW_ESTIMATE);
-                                      //FFTW_MEASURE);
+                                     FFTW_PLAN_OPTS);
 
       if (d_plan == NULL) {
        fprintf(stderr, "gr::fft::fft_real_fwd: error creating plan\n");
@@ -305,8 +310,7 @@ namespace gr {
       d_plan = fftwf_plan_dft_c2r_1d (fft_size,
                                      reinterpret_cast<fftwf_complex 
*>(d_inbuf),
                                      d_outbuf,
-                                      FFTW_ESTIMATE);
-                                      //FFTW_MEASURE);
+                                      FFTW_PLAN_OPTS);
 
       if (d_plan == NULL) {
        fprintf(stderr, "gr::fft::fft_real_rev: error creating plan\n");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]