GNU Radio C++ API Reference: fft_filter_ccc.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
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>
15#include <gnuradio/sync_decimator.h>
16
17namespace gr {
18namespace 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 */
43 class FILTER_API fft_filter_ccc : virtual public sync_decimator
44{
45public:
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 */
gr::filter::fft_filter_ccc
Fast FFT filter with gr_complex input, gr_complex output and gr_complex taps.
Definition fft_filter_ccc.h:44
gr::filter::fft_filter_ccc::taps
virtual std::vector< gr_complex > taps() const =0
gr::filter::fft_filter_ccc::nthreads
virtual int nthreads() const =0
Get number of threads being used.
gr::filter::fft_filter_ccc::set_nthreads
virtual void set_nthreads(int n)=0
Set number of threads to use.
gr::filter::fft_filter_ccc::sptr
std::shared_ptr< fft_filter_ccc > sptr
Definition fft_filter_ccc.h:47
gr::filter::fft_filter_ccc::set_taps
virtual void set_taps(const std::vector< gr_complex > &taps)=0
gr::filter::fft_filter_ccc::make
static sptr make(int decimation, const std::vector< gr_complex > &taps, int nthreads=1)
gr::sync_decimator::sync_decimator
sync_decimator(void)
Definition sync_decimator.h:31
gr::sync_decimator::decimation
unsigned decimation() const
Definition sync_decimator.h:38
api.h
FILTER_API
#define FILTER_API
Definition gr-filter/include/gnuradio/filter/api.h:18
gr::filter
Definition dc_blocker_cc.h:18
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_decimator.h