diff options
author | Johnathan Corgan | 2012-02-14 12:32:52 -0800 |
---|---|---|
committer | Johnathan Corgan | 2012-02-14 12:34:47 -0800 |
commit | f0a1631dad755d5abf28351f07b2bbf7773b37b8 (patch) | |
tree | 397b02568ddbab1f85646afdd06aee6fd540c99c /gnuradio-core/src/lib/general/gri_fft.h | |
parent | ef1748e4efc40cc065fb5f1b40d710256dd37efa (diff) | |
parent | dc266ca38bdc59955f8c8d8a98291f078d7f4377 (diff) | |
download | gnuradio-f0a1631dad755d5abf28351f07b2bbf7773b37b8.tar.gz gnuradio-f0a1631dad755d5abf28351f07b2bbf7773b37b8.tar.bz2 gnuradio-f0a1631dad755d5abf28351f07b2bbf7773b37b8.zip |
Merge branch 'master' into safe_align
Conflicts:
gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc
gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc
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 (); |