GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
fft_filter_fff.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_FFF_H
12#define INCLUDED_FILTER_FFT_FILTER_FFF_H
13
14#include <gnuradio/filter/api.h>
16
17namespace gr {
18namespace filter {
19
20/*!
21 * \brief Fast FFT filter with float input, float output and float taps
22 * \ingroup filter_blk
23 *
24 * \details
25 * This block implements a real-value 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 real-valued 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{
45public:
46 // gr::filter::fft_filter_fff::sptr
47 typedef std::shared_ptr<fft_filter_fff> sptr;
48
49 /*!
50 * Build an FFT filter block.
51 *
52 * \param decimation >= 1
53 * \param taps float filter taps
54 * \param nthreads number of threads for the FFT to use
55 */
56 static sptr make(int decimation, const std::vector<float>& taps, int nthreads = 1);
57
58 virtual void set_taps(const std::vector<float>& taps) = 0;
59 virtual std::vector<float> taps() const = 0;
60
61 /*!
62 * \brief Set number of threads to use.
63 */
64 virtual void set_nthreads(int n) = 0;
65
66 /*!
67 * \brief Get number of threads being used.
68 */
69 virtual int nthreads() const = 0;
70};
71
72} /* namespace filter */
73} /* namespace gr */
74
75#endif /* INCLUDED_FILTER_FFT_FILTER_FFF_H */
Fast FFT filter with float input, float output and float taps.
Definition: fft_filter_fff.h:44
virtual void set_nthreads(int n)=0
Set number of threads to use.
std::shared_ptr< fft_filter_fff > sptr
Definition: fft_filter_fff.h:47
virtual void set_taps(const std::vector< float > &taps)=0
virtual std::vector< float > taps() const =0
virtual int nthreads() const =0
Get number of threads being used.
static sptr make(int decimation, const std::vector< float > &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