commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 01/02: qtgui: fixed problem with new volk a


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/02: qtgui: fixed problem with new volk avx multiply kernel.
Date: Sun, 23 Feb 2014 22:19:39 +0000 (UTC)

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

trondeau pushed a commit to branch maint
in repository gnuradio.

commit bf6d843ebde3a36fcd0d42ee5788bef1b7125b4a
Author: Tom Rondeau <address@hidden>
Date:   Sun Feb 23 11:15:12 2014 -0500

    qtgui: fixed problem with new volk avx multiply kernel.
    
    Was calling _a version of kernel, but the window is a std::vector, which is 
not guaranteed to be 32-byte aligned.
---
 gr-qtgui/lib/freq_sink_c_impl.cc | 20 ++++++++++----------
 gr-qtgui/lib/freq_sink_f_impl.cc | 18 +++++++++---------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/gr-qtgui/lib/freq_sink_c_impl.cc b/gr-qtgui/lib/freq_sink_c_impl.cc
index 1339e2b..e86974f 100644
--- a/gr-qtgui/lib/freq_sink_c_impl.cc
+++ b/gr-qtgui/lib/freq_sink_c_impl.cc
@@ -32,7 +32,7 @@
 
 namespace gr {
   namespace qtgui {
-    
+
     freq_sink_c::sptr
     freq_sink_c::make(int fftsize, int wintype,
                      double fc, double bw,
@@ -177,7 +177,7 @@ namespace gr {
     {
       return d_fftsize;
     }
- 
+
     void
     freq_sink_c_impl::set_fft_average(const float fftavg)
     {
@@ -345,8 +345,8 @@ namespace gr {
     freq_sink_c_impl::fft(float *data_out, const gr_complex *data_in, int size)
     {
       if(d_window.size()) {
-       volk_32fc_32f_multiply_32fc_a(d_fft->get_inbuf(), data_in,
-                                     &d_window.front(), size);
+       volk_32fc_32f_multiply_32fc(d_fft->get_inbuf(), data_in,
+                                    &d_window.front(), size);
       }
       else {
        memcpy(d_fft->get_inbuf(), data_in, sizeof(gr_complex)*size);
@@ -354,8 +354,8 @@ namespace gr {
 
       d_fft->execute();     // compute the fft
 
-      volk_32fc_s32f_x2_power_spectral_density_32f_a(data_out, 
d_fft->get_outbuf(),
-                                                    size, 1.0, size);
+      volk_32fc_s32f_x2_power_spectral_density_32f(data_out, 
d_fft->get_outbuf(),
+                                                   size, 1.0, size);
 
       // Perform shift operation
       unsigned int len = (unsigned int)(floor(size/2.0));
@@ -409,8 +409,8 @@ namespace gr {
          memset(d_magbufs[i], 0, newfftsize*sizeof(double));
        }
 
-       // Set new fft size and reset buffer index 
-       // (throws away any currently held data, but who cares?) 
+       // Set new fft size and reset buffer index
+       // (throws away any currently held data, but who cares?)
        d_fftsize = newfftsize;
        d_index = 0;
 
@@ -420,7 +420,7 @@ namespace gr {
        // Reset FFTW plan for new size
        delete d_fft;
        d_fft = new fft::fft_complex(d_fftsize, true);
-    
+
        volk_free(d_fbuf);
        d_fbuf = (float*)volk_malloc(d_fftsize*sizeof(float),
                                      volk_get_alignment());
@@ -459,7 +459,7 @@ namespace gr {
               }
               //volk_32f_convert_64f_a(d_magbufs[n], d_fbuf, d_fftsize);
             }
-      
+
            d_last_time = gr::high_res_timer_now();
            d_qApplication->postEvent(d_main_gui,
                                      new FreqUpdateEvent(d_magbufs, 
d_fftsize));
diff --git a/gr-qtgui/lib/freq_sink_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc
index 98c55b9..8dca815 100644
--- a/gr-qtgui/lib/freq_sink_f_impl.cc
+++ b/gr-qtgui/lib/freq_sink_f_impl.cc
@@ -55,7 +55,7 @@ namespace gr {
       : sync_block("freq_sink_f",
                      io_signature::make(1, -1, sizeof(float)),
                      io_signature::make(0, 0, 0)),
-       d_fftsize(fftsize), d_fftavg(1.0), 
+       d_fftsize(fftsize), d_fftavg(1.0),
        d_wintype((filter::firdes::win_type)(wintype)),
        d_center_freq(fc), d_bandwidth(bw), d_name(name),
        d_nconnections(nconnections), d_parent(parent)
@@ -177,7 +177,7 @@ namespace gr {
     {
       return d_fftsize;
     }
- 
+
     void
     freq_sink_f_impl::set_fft_average(const float fftavg)
     {
@@ -350,13 +350,13 @@ namespace gr {
        dst[i] = data_in[i];
 
       if(d_window.size()) {
-       volk_32fc_32f_multiply_32fc_a(d_fft->get_inbuf(), dst,
-                                     &d_window.front(), size);
+       volk_32fc_32f_multiply_32fc(d_fft->get_inbuf(), dst,
+                                    &d_window.front(), size);
       }
 
       d_fft->execute();     // compute the fft
-      volk_32fc_s32f_x2_power_spectral_density_32f_a(data_out, 
d_fft->get_outbuf(),
-                                                    size, 1.0, size);
+      volk_32fc_s32f_x2_power_spectral_density_32f(data_out, 
d_fft->get_outbuf(),
+                                                   size, 1.0, size);
 
       // Perform shift operation
       unsigned int len = (unsigned int)(floor(size/2.0));
@@ -412,8 +412,8 @@ namespace gr {
          memset(d_magbufs[i], 0, newfftsize*sizeof(double));
        }
 
-       // Set new fft size and reset buffer index 
-       // (throws away any currently held data, but who cares?) 
+       // Set new fft size and reset buffer index
+       // (throws away any currently held data, but who cares?)
        d_fftsize = newfftsize;
        d_index = 0;
 
@@ -462,7 +462,7 @@ namespace gr {
               }
               //volk_32f_convert_64f_a(d_magbufs[n], d_fbuf, d_fftsize);
             }
-      
+
            d_last_time = gr::high_res_timer_now();
            d_qApplication->postEvent(d_main_gui,
                                      new FreqUpdateEvent(d_magbufs, 
d_fftsize));



reply via email to

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