diff options
-rw-r--r-- | gnuradio-core/src/lib/general/gri_fft.cc | 6 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gri_fft.h | 14 | ||||
-rw-r--r-- | gr-fft/include/fft/fft.h | 8 | ||||
-rw-r--r-- | gr-fft/lib/fft.cc | 6 |
4 files changed, 27 insertions, 7 deletions
diff --git a/gnuradio-core/src/lib/general/gri_fft.cc b/gnuradio-core/src/lib/general/gri_fft.cc index 68e7e69519..78446ad39b 100644 --- a/gnuradio-core/src/lib/general/gri_fft.cc +++ b/gnuradio-core/src/lib/general/gri_fft.cc @@ -59,6 +59,12 @@ gri_fft_malloc_float(int size) return (float*)fftwf_malloc(sizeof(float)*size); } +double * +gri_fft_malloc_double(int size) +{ + return (double*)fftwf_malloc(sizeof(double)*size); +} + void gri_fft_free(void *b) { diff --git a/gnuradio-core/src/lib/general/gri_fft.h b/gnuradio-core/src/lib/general/gri_fft.h index 65e9d046e2..c6fbd4f43f 100644 --- a/gnuradio-core/src/lib/general/gri_fft.h +++ b/gnuradio-core/src/lib/general/gri_fft.h @@ -30,17 +30,21 @@ #include <gr_complex.h> #include <boost/thread.hpp> -/*! \brief Helper function for allocating complex fft buffers +/*! \brief Helper function for allocating complex* buffers */ -gr_complex* gri_fft_malloc_complex(int size); +GR_CORE_API gr_complex* gri_fft_malloc_complex(int size); -/*! \brief Helper function for allocating float fft buffers +/*! \brief Helper function for allocating float* buffers */ -float* gri_fft_malloc_float(int size); +GR_CORE_API float* gri_fft_malloc_float(int size); + +/*! \brief Helper function for allocating double* buffers + */ +GR_CORE_API double* gri_fft_malloc_double(int size); /*! \brief Helper function for freeing fft buffers */ -void gri_fft_free(void *b); +GR_CORE_API void gri_fft_free(void *b); /*! diff --git a/gr-fft/include/fft/fft.h b/gr-fft/include/fft/fft.h index e3fd3f278a..305b1cb711 100644 --- a/gr-fft/include/fft/fft.h +++ b/gr-fft/include/fft/fft.h @@ -35,14 +35,18 @@ namespace gr { namespace fft { - /*! \brief Helper function for allocating complex fft buffers + /*! \brief Helper function for allocating complex* buffers */ FFT_API gr_complex* malloc_complex(int size); - /*! \brief Helper function for allocating float fft buffers + /*! \brief Helper function for allocating float* buffers */ FFT_API float* malloc_float(int size); + /*! \brief Helper function for allocating double* buffers + */ + FFT_API double* malloc_double(int size); + /*! \brief Helper function for freeing fft buffers */ FFT_API void free(void *b); diff --git a/gr-fft/lib/fft.cc b/gr-fft/lib/fft.cc index 6074236e18..60838ee302 100644 --- a/gr-fft/lib/fft.cc +++ b/gr-fft/lib/fft.cc @@ -62,6 +62,12 @@ namespace gr { return (float*)fftwf_malloc(sizeof(float)*size); } + double * + malloc_double(int size) + { + return (double*)fftwf_malloc(sizeof(double)*size); + } + void free(void *b) { |