From 6385380c812a8cd1470073d01c7e8b6006b8f398 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 30 Jan 2012 18:50:29 -0500 Subject: core: redo fft_filter (complex and float) with Volk. No need for sse implementation now but keeping code for reference. --- gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc | 5 ----- gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc | 7 +------ gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.cc | 5 ++--- gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.cc | 5 ++--- 4 files changed, 5 insertions(+), 17 deletions(-) (limited to 'gnuradio-core/src/lib') 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 -//#include #include #include #include @@ -57,11 +56,7 @@ gr_fft_filter_ccc::gr_fft_filter_ccc (int decimation, const std::vectorset_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 #include -//#include #include #include #include @@ -50,11 +49,7 @@ gr_fft_filter_fff::gr_fft_filter_fff (int decimation, const std::vector & { 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 #include +#include #include #include #include @@ -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 #include +#include #include #include #include @@ -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 -- cgit