diff options
author | Tom Rondeau | 2012-01-30 18:50:29 -0500 |
---|---|---|
committer | Tom Rondeau | 2012-01-30 18:50:29 -0500 |
commit | 6385380c812a8cd1470073d01c7e8b6006b8f398 (patch) | |
tree | 921b562c926f292798a2338641d03870aa3e2247 /gnuradio-core/src/lib | |
parent | 046385126d92cf9179ac84ede06d3d50e1c9030f (diff) | |
download | gnuradio-6385380c812a8cd1470073d01c7e8b6006b8f398.tar.gz gnuradio-6385380c812a8cd1470073d01c7e8b6006b8f398.tar.bz2 gnuradio-6385380c812a8cd1470073d01c7e8b6006b8f398.zip |
core: redo fft_filter (complex and float) with Volk.
No need for sse implementation now but keeping code for reference.
Diffstat (limited to 'gnuradio-core/src/lib')
4 files changed, 5 insertions, 17 deletions
diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc index 9fa98cc69..d523404c9 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc @@ -30,7 +30,6 @@ #endif #include <gr_fft_filter_ccc.h> -//#include <gri_fft_filter_ccc_sse.h> #include <gri_fft_filter_ccc_generic.h> #include <gr_io_signature.h> #include <gri_fft.h> @@ -57,11 +56,7 @@ gr_fft_filter_ccc::gr_fft_filter_ccc (int decimation, const std::vector<gr_compl d_updated(false) { set_history(1); -#if 1 // don't enable the sse version until handling it is worked out d_filter = new gri_fft_filter_ccc_generic(decimation, taps); -#else - d_filter = new gri_fft_filter_ccc_sse(decimation, taps); -#endif d_new_taps = taps; d_nsamples = d_filter->set_taps(taps); set_output_multiple(d_nsamples); diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc index c0a9b3483..640851a1d 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc @@ -26,7 +26,6 @@ #include <gr_fft_filter_fff.h> #include <gri_fft_filter_fff_generic.h> -//#include <gri_fft_filter_fff_sse.h> #include <gr_io_signature.h> #include <assert.h> #include <stdexcept> @@ -50,11 +49,7 @@ gr_fft_filter_fff::gr_fft_filter_fff (int decimation, const std::vector<float> & { set_history(1); -#if 1 // don't enable the sse version until handling it is worked out - d_filter = new gri_fft_filter_fff_generic(decimation, taps); -#else - d_filter = new gri_fft_filter_fff_sse(decimation, taps); -#endif + d_filter = new gri_fft_filter_fff_generic(decimation, taps); d_new_taps = taps; d_nsamples = d_filter->set_taps(taps); set_output_multiple(d_nsamples); diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.cc b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.cc index 891905dd0..d9700ad2e 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.cc +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.cc @@ -26,6 +26,7 @@ #include <gri_fft_filter_ccc_generic.h> #include <gri_fft.h> +#include <volk/volk.h> #include <assert.h> #include <stdexcept> #include <cstdio> @@ -137,9 +138,7 @@ gri_fft_filter_ccc_generic::filter (int nitems, const gr_complex *input, gr_comp gr_complex *b = &d_xformed_taps[0]; gr_complex *c = d_invfft->get_inbuf(); - for (j = 0; j < d_fftsize; j+=1) { // filter in the freq domain - c[j] = a[j] * b[j]; - } + volk_32fc_x2_multiply_32fc_a(c, a, b, d_fftsize); d_invfft->execute(); // compute inv xform diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.cc b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.cc index b3fbe1d1a..64705ee5e 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.cc +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.cc @@ -26,6 +26,7 @@ #include <gri_fft_filter_fff_generic.h> #include <gri_fft.h> +#include <volk/volk.h> #include <assert.h> #include <stdexcept> #include <cstdio> @@ -124,9 +125,7 @@ gri_fft_filter_fff_generic::filter (int nitems, const float *input, float *outpu gr_complex *b = &d_xformed_taps[0]; gr_complex *c = d_invfft->get_inbuf(); - for (j = 0; j < d_fftsize/2+1; j++) { // filter in the freq domain - c[j] = a[j] * b[j]; - } + volk_32fc_x2_multiply_32fc_a(c, a, b, d_fftsize/2+1); d_invfft->execute(); // compute inv xform |