commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 01/12: android: fft: problems with wisdom f


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/12: android: fft: problems with wisdom files and MEASURE version of FFTW. Using a setting for the FFTW plan options if android or not.
Date: Fri, 19 Feb 2016 13:58:38 +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 9543be3817f272dfe89f48d9f4b776d1b436939a
Author: Tom Rondeau <address@hidden>
Date:   Sun Dec 21 09:47:24 2014 -0500

    android: fft: problems with wisdom files and MEASURE version of
    FFTW. Using a setting for the FFTW plan options if android or not.
---
 gr-fft/lib/fft.cc | 33 ++++++++++++++++++++-------------
 volk              |  2 +-
 2 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/gr-fft/lib/fft.cc b/gr-fft/lib/fft.cc
index 729600c..c119f5b 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 {
 
@@ -160,20 +167,20 @@ namespace gr {
       }
 
       d_nthreads = nthreads;
-      config_threading(nthreads);
-      import_wisdom(); // load prior wisdom from disk
+      //config_threading(nthreads);
+      //import_wisdom();       // load prior wisdom from disk
 
       d_plan = fftwf_plan_dft_1d (fft_size,
-                  reinterpret_cast<fftwf_complex *>(d_inbuf),
-                  reinterpret_cast<fftwf_complex *>(d_outbuf),
-                  forward ? FFTW_FORWARD : FFTW_BACKWARD,
-                  FFTW_MEASURE);
+                                 reinterpret_cast<fftwf_complex *>(d_inbuf),
+                                 reinterpret_cast<fftwf_complex *>(d_outbuf),
+                                 forward ? FFTW_FORWARD : FFTW_BACKWARD,
+                                  FFTW_PLAN_OPTS);
 
       if (d_plan == NULL) {
         fprintf(stderr, "gr::fft: error creating plan\n");
         throw std::runtime_error ("fftwf_plan_dft_1d failed");
       }
-      export_wisdom(); // store new wisdom to disk
+      //export_wisdom();       // store new wisdom to disk
     }
 
     fft_complex::~fft_complex()
@@ -235,9 +242,9 @@ namespace gr {
       import_wisdom(); // load prior wisdom from disk
 
       d_plan = fftwf_plan_dft_r2c_1d (fft_size,
-                      d_inbuf,
-                      reinterpret_cast<fftwf_complex *>(d_outbuf),
-                      FFTW_MEASURE);
+                                     d_inbuf,
+                                     reinterpret_cast<fftwf_complex 
*>(d_outbuf),
+                                     FFTW_PLAN_OPTS);
 
       if (d_plan == NULL) {
         fprintf(stderr, "gr::fft::fft_real_fwd: error creating plan\n");
@@ -308,9 +315,9 @@ namespace gr {
       // will be called in multiple threads, we've got to ensure single
       // threaded access.  They are not thread-safe.
       d_plan = fftwf_plan_dft_c2r_1d (fft_size,
-                      reinterpret_cast<fftwf_complex *>(d_inbuf),
-                      d_outbuf,
-                      FFTW_MEASURE);
+                                     reinterpret_cast<fftwf_complex 
*>(d_inbuf),
+                                     d_outbuf,
+                                      FFTW_PLAN_OPTS);
 
       if (d_plan == NULL) {
         fprintf(stderr, "gr::fft::fft_real_rev: error creating plan\n");
diff --git a/volk b/volk
index 41b4df0..c2c7f82 160000
--- a/volk
+++ b/volk
@@ -1 +1 @@
-Subproject commit 41b4df055b2c8d4f2c23ad2bdc60c0b47b4f0dd8
+Subproject commit c2c7f82aea2ed99df66fad2b91ed29791d7818a5



reply via email to

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