GNU Radio Manual and C++ API Reference  3.10.9.1
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  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_FILTER_FFT_FILTER_CCC_H
12 #define INCLUDED_FILTER_FFT_FILTER_CCC_H
13 
14 #include <gnuradio/filter/api.h>
16 
17 namespace gr {
18 namespace filter {
19 
20 /*!
21  * \brief Fast FFT filter with gr_complex input, gr_complex output and gr_complex taps
22  * \ingroup filter_blk
23  *
24  * \details
25  * This block implements a complex decimating filter using the
26  * fast convolution method via an FFT. The decimation factor is an
27  * integer that is greater than or equal to 1.
28  *
29  * The filter takes a set of complex (or real) taps to use in the
30  * filtering operation. These taps can be defined as anything that
31  * satisfies the user's filtering needs. For standard filters such
32  * as lowpass, highpass, bandpass, etc., the filter.firdes and
33  * filter.optfir classes provide convenient generating methods.
34  *
35  * This filter is implemented by using the FFTW package to perform
36  * the required FFTs. An optional argument, nthreads, may be
37  * passed to the constructor (or set using the set_nthreads member
38  * function) to split the FFT among N number of threads. This can
39  * improve performance on very large FFTs (that is, if the number
40  * of taps used is very large) if you have enough threads/cores to
41  * support it.
42  */
44 {
45 public:
46  // gr::filter::fft_filter_ccc::sptr
47  typedef std::shared_ptr<fft_filter_ccc> sptr;
48 
49  /*!
50  * Build an FFT filter blocks.
51  *
52  * \param decimation >= 1
53  * \param taps complex filter taps
54  * \param nthreads number of threads for the FFT to use
55  */
56  static sptr
57  make(int decimation, const std::vector<gr_complex>& taps, int nthreads = 1);
58 
59  virtual void set_taps(const std::vector<gr_complex>& taps) = 0;
60  virtual std::vector<gr_complex> taps() const = 0;
61 
62  /*!
63  * \brief Set number of threads to use.
64  */
65  virtual void set_nthreads(int n) = 0;
66 
67  /*!
68  * \brief Get number of threads being used.
69  */
70  virtual int nthreads() const = 0;
71 };
72 
73 } /* namespace filter */
74 } /* namespace gr */
75 
76 #endif /* INCLUDED_FILTER_FFT_FILTER_CCC_H */
Fast FFT filter with gr_complex input, gr_complex output and gr_complex taps.
Definition: fft_filter_ccc.h:44
virtual std::vector< gr_complex > taps() const =0
virtual int nthreads() const =0
Get number of threads being used.
virtual void set_nthreads(int n)=0
Set number of threads to use.
std::shared_ptr< fft_filter_ccc > sptr
Definition: fft_filter_ccc.h:47
virtual void set_taps(const std::vector< gr_complex > &taps)=0
static sptr make(int decimation, const std::vector< gr_complex > &taps, int nthreads=1)
synchronous N:1 input to output with history
Definition: sync_decimator.h:26
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:18
static constexpr float taps[NSTEPS+1][NTAPS]
Definition: interpolator_taps.h:9
GNU Radio logging wrapper.
Definition: basic_block.h:29