summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-fft/include/gnuradio/fft/fft.h11
-rw-r--r--gr-fft/lib/fft.cc7
-rw-r--r--gr-fft/python/fft/bindings/docstrings/fft_pydoc_template.h6
-rw-r--r--gr-fft/python/fft/bindings/fft_python.cc9
-rw-r--r--gr-filter/lib/pfb_decimator_ccf_impl.cc13
-rw-r--r--gr-filter/lib/pfb_decimator_ccf_impl.h5
6 files changed, 6 insertions, 45 deletions
diff --git a/gr-fft/include/gnuradio/fft/fft.h b/gr-fft/include/gnuradio/fft/fft.h
index f892b21426..cc47a4f169 100644
--- a/gr-fft/include/gnuradio/fft/fft.h
+++ b/gr-fft/include/gnuradio/fft/fft.h
@@ -24,17 +24,6 @@
namespace gr {
namespace fft {
-
-/*! \brief Helper function for allocating complex* buffers
- * TODO: Remove once the single user of this stops using it.
- */
-FFT_API gr_complex* malloc_complex(int size);
-
-/*! \brief Helper function for freeing fft buffers
- * TODO: Remove once the single user of this stops using it.
- */
-FFT_API void free(void* b);
-
/*!
* \brief Export reference to planner mutex for those apps that
* want to use FFTW w/o using the fft_impl_fftw* classes.
diff --git a/gr-fft/lib/fft.cc b/gr-fft/lib/fft.cc
index 5579f00ef6..dca635265b 100644
--- a/gr-fft/lib/fft.cc
+++ b/gr-fft/lib/fft.cc
@@ -48,13 +48,6 @@ static boost::mutex wisdom_thread_mutex;
boost::interprocess::file_lock wisdom_lock;
static bool wisdom_lock_init_done = false; // Modify while holding 'wisdom_thread_mutex'
-gr_complex* malloc_complex(int size)
-{
- return (gr_complex*)volk_malloc(sizeof(gr_complex) * size, volk_get_alignment());
-}
-
-void free(void* b) { volk_free(b); }
-
boost::mutex& planner::mutex()
{
static boost::mutex s_planning_mutex;
diff --git a/gr-fft/python/fft/bindings/docstrings/fft_pydoc_template.h b/gr-fft/python/fft/bindings/docstrings/fft_pydoc_template.h
index fabe5afd47..0f37f06b93 100644
--- a/gr-fft/python/fft/bindings/docstrings/fft_pydoc_template.h
+++ b/gr-fft/python/fft/bindings/docstrings/fft_pydoc_template.h
@@ -106,9 +106,3 @@ static const char* __doc_gr_fft_fft_real_rev_nthreads = R"doc()doc";
static const char* __doc_gr_fft_fft_real_rev_execute = R"doc()doc";
-
-
-static const char* __doc_gr_fft_malloc_complex = R"doc()doc";
-
-
-static const char* __doc_gr_fft_free = R"doc()doc";
diff --git a/gr-fft/python/fft/bindings/fft_python.cc b/gr-fft/python/fft/bindings/fft_python.cc
index 9e8a4e889a..268edfaa24 100644
--- a/gr-fft/python/fft/bindings/fft_python.cc
+++ b/gr-fft/python/fft/bindings/fft_python.cc
@@ -14,7 +14,7 @@
/* BINDTOOL_GEN_AUTOMATIC(0) */
/* BINDTOOL_USE_PYGCCXML(0) */
/* BINDTOOL_HEADER_FILE(fft.h) */
-/* BINDTOOL_HEADER_FILE_HASH(4402b26d42b6210cd744a09ce7f6ffd6) */
+/* BINDTOOL_HEADER_FILE_HASH(ebbb274b1b433908749981712d96b3e9) */
/***********************************************************************************/
#include <pybind11/complex.h>
@@ -153,11 +153,4 @@ void bind_fft(py::module& m)
.def("execute", &fft_real_rev::execute, D(fft_real_rev, execute))
;
-
-
- m.def(
- "malloc_complex", &::gr::fft::malloc_complex, py::arg("size"), D(malloc_complex));
-
-
- m.def("free", &::gr::fft::free, py::arg("b"), D(free));
}
diff --git a/gr-filter/lib/pfb_decimator_ccf_impl.cc b/gr-filter/lib/pfb_decimator_ccf_impl.cc
index e96d3d7067..5a86efb62a 100644
--- a/gr-filter/lib/pfb_decimator_ccf_impl.cc
+++ b/gr-filter/lib/pfb_decimator_ccf_impl.cc
@@ -59,27 +59,18 @@ pfb_decimator_ccf_impl::pfb_decimator_ccf_impl(unsigned int decim,
} else {
set_history(d_taps_per_filter);
}
-
- d_tmp = NULL;
}
bool pfb_decimator_ccf_impl::start()
{
if (d_use_fft_filters) {
- d_tmp = fft::malloc_complex(max_noutput_items() * d_rate);
+ d_tmp.resize(max_noutput_items() * d_rate);
}
return block::start();
}
-bool pfb_decimator_ccf_impl::stop()
-{
- if ((d_use_fft_filters) && (d_tmp)) {
- fft::free(d_tmp);
- }
-
- return block::stop();
-}
+bool pfb_decimator_ccf_impl::stop() { return block::stop(); }
pfb_decimator_ccf_impl::~pfb_decimator_ccf_impl() {}
diff --git a/gr-filter/lib/pfb_decimator_ccf_impl.h b/gr-filter/lib/pfb_decimator_ccf_impl.h
index e9fa54f8f3..3e2ab1037d 100644
--- a/gr-filter/lib/pfb_decimator_ccf_impl.h
+++ b/gr-filter/lib/pfb_decimator_ccf_impl.h
@@ -15,6 +15,7 @@
#include <gnuradio/filter/pfb_decimator_ccf.h>
#include <gnuradio/filter/polyphase_filterbank.h>
#include <gnuradio/thread/thread.h>
+#include <volk/volk_alloc.hh>
namespace gr {
namespace filter {
@@ -29,8 +30,8 @@ private:
bool d_use_fft_rotator;
bool d_use_fft_filters;
std::vector<gr_complex> d_rotator;
- gr_complex* d_tmp; // used for fft filters
- gr::thread::mutex d_mutex; // mutex to protect set/work access
+ volk::vector<gr_complex> d_tmp; // used for fft filters
+ gr::thread::mutex d_mutex; // mutex to protect set/work access
inline int work_fir_exp(int noutput_items,
gr_vector_const_void_star& input_items,