GNU Radio Manual and C++ API Reference  3.8.1.0
The Free & Open Software Radio Ecosystem
fft_filter_ccc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2005,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef INCLUDED_FILTER_FFT_FILTER_CCC_H
24 #define INCLUDED_FILTER_FFT_FILTER_CCC_H
25 
26 #include <gnuradio/filter/api.h>
28 
29 namespace gr {
30 namespace filter {
31 
32 /*!
33  * \brief Fast FFT filter with gr_complex input, gr_complex output and gr_complex taps
34  * \ingroup filter_blk
35  *
36  * \details
37  * This block implements a complex decimating filter using the
38  * fast convolution method via an FFT. The decimation factor is an
39  * integer that is greater than or equal to 1.
40  *
41  * The filter takes a set of complex (or real) taps to use in the
42  * filtering operation. These taps can be defined as anything that
43  * satisfies the user's filtering needs. For standard filters such
44  * as lowpass, highpass, bandpass, etc., the filter.firdes and
45  * filter.optfir classes provide convenient generating methods.
46  *
47  * This filter is implemented by using the FFTW package to perform
48  * the required FFTs. An optional argument, nthreads, may be
49  * passed to the constructor (or set using the set_nthreads member
50  * function) to split the FFT among N number of threads. This can
51  * improve performance on very large FFTs (that is, if the number
52  * of taps used is very large) if you have enough threads/cores to
53  * support it.
54  */
56 {
57 public:
58  // gr::filter::fft_filter_ccc::sptr
59  typedef boost::shared_ptr<fft_filter_ccc> sptr;
60 
61  /*!
62  * Build an FFT filter blocks.
63  *
64  * \param decimation >= 1
65  * \param taps complex filter taps
66  * \param nthreads number of threads for the FFT to use
67  */
68  static sptr
69  make(int decimation, const std::vector<gr_complex>& taps, int nthreads = 1);
70 
71  virtual void set_taps(const std::vector<gr_complex>& taps) = 0;
72  virtual std::vector<gr_complex> taps() const = 0;
73 
74  /*!
75  * \brief Set number of threads to use.
76  */
77  virtual void set_nthreads(int n) = 0;
78 
79  /*!
80  * \brief Get number of threads being used.
81  */
82  virtual int nthreads() const = 0;
83 };
84 
85 } /* namespace filter */
86 } /* namespace gr */
87 
88 #endif /* INCLUDED_FILTER_FFT_FILTER_CCC_H */
boost::shared_ptr< fft_filter_ccc > sptr
Definition: fft_filter_ccc.h:59
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
Fast FFT filter with gr_complex input, gr_complex output and gr_complex taps.
Definition: fft_filter_ccc.h:55
synchronous N:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_decimator.h:37
static const float taps[NSTEPS+1][NTAPS]
Definition: interpolator_taps.h:9
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:30