diff options
author | Tom Rondeau | 2012-02-06 14:48:13 -0500 |
---|---|---|
committer | Tom Rondeau | 2012-02-06 14:48:13 -0500 |
commit | c4d0b47fdbbbfee18d6dfc87c501731a0591fa57 (patch) | |
tree | 99e8c564bfa7f717ecba0f62bb356b92034d2efc /gnuradio-core/src/lib/general/gri_fft.h | |
parent | f49facf71cd1b31a8553de85377d956a3299f2d7 (diff) | |
parent | 7e10a26470d638afec9db3bd89ae3243fe0abd83 (diff) | |
download | gnuradio-c4d0b47fdbbbfee18d6dfc87c501731a0591fa57.tar.gz gnuradio-c4d0b47fdbbbfee18d6dfc87c501731a0591fa57.tar.bz2 gnuradio-c4d0b47fdbbbfee18d6dfc87c501731a0591fa57.zip |
Merge branch 'master' into next
Diffstat (limited to 'gnuradio-core/src/lib/general/gri_fft.h')
-rw-r--r-- | gnuradio-core/src/lib/general/gri_fft.h | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/gnuradio-core/src/lib/general/gri_fft.h b/gnuradio-core/src/lib/general/gri_fft.h index 91a82fb55..ed80badf1 100644 --- a/gnuradio-core/src/lib/general/gri_fft.h +++ b/gnuradio-core/src/lib/general/gri_fft.h @@ -49,12 +49,13 @@ public: */ class GR_CORE_API gri_fft_complex { int d_fft_size; + int d_nthreads; gr_complex *d_inbuf; gr_complex *d_outbuf; void *d_plan; public: - gri_fft_complex (int fft_size, bool forward = true); + gri_fft_complex (int fft_size, bool forward = true, int nthreads=1); virtual ~gri_fft_complex (); /* @@ -69,6 +70,16 @@ public: int outbuf_length () const { return d_fft_size; } /*! + * Set the number of threads to use for caclulation. + */ + void set_nthreads(int n); + + /*! + * Get the number of threads being used by FFTW + */ + int nthreads() const { return d_nthreads; } + + /*! * compute FFT. The input comes from inbuf, the output is placed in outbuf. */ void execute (); @@ -80,12 +91,13 @@ public: */ class GR_CORE_API gri_fft_real_fwd { int d_fft_size; + int d_nthreads; float *d_inbuf; gr_complex *d_outbuf; void *d_plan; public: - gri_fft_real_fwd (int fft_size); + gri_fft_real_fwd (int fft_size, int nthreads=1); virtual ~gri_fft_real_fwd (); /* @@ -100,6 +112,16 @@ public: int outbuf_length () const { return d_fft_size / 2 + 1; } /*! + * Set the number of threads to use for caclulation. + */ + void set_nthreads(int n); + + /*! + * Get the number of threads being used by FFTW + */ + int nthreads() const { return d_nthreads; } + + /*! * compute FFT. The input comes from inbuf, the output is placed in outbuf. */ void execute (); @@ -111,12 +133,13 @@ public: */ class GR_CORE_API gri_fft_real_rev { int d_fft_size; + int d_nthreads; gr_complex *d_inbuf; float *d_outbuf; void *d_plan; public: - gri_fft_real_rev (int fft_size); + gri_fft_real_rev (int fft_size, int nthreads=1); virtual ~gri_fft_real_rev (); /* @@ -131,6 +154,16 @@ public: int outbuf_length () const { return d_fft_size; } /*! + * Set the number of threads to use for caclulation. + */ + void set_nthreads(int n); + + /*! + * Get the number of threads being used by FFTW + */ + int nthreads() const { return d_nthreads; } + + /*! * compute FFT. The input comes from inbuf, the output is placed in outbuf. */ void execute (); |