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

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

Loading...
Searching...
No Matches
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>
15#include <gnuradio/sync_decimator.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 */
43 class FILTER_API fft_filter_fff : virtual public sync_decimator
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 */
gr::filter::fft_filter_fff
Fast FFT filter with float input, float output and float taps.
Definition fft_filter_fff.h:44
gr::filter::fft_filter_fff::set_nthreads
virtual void set_nthreads(int n)=0
Set number of threads to use.
gr::filter::fft_filter_fff::sptr
std::shared_ptr< fft_filter_fff > sptr
Definition fft_filter_fff.h:47
gr::filter::fft_filter_fff::set_taps
virtual void set_taps(const std::vector< float > &taps)=0
gr::filter::fft_filter_fff::taps
virtual std::vector< float > taps() const =0
gr::filter::fft_filter_fff::nthreads
virtual int nthreads() const =0
Get number of threads being used.
gr::filter::fft_filter_fff::make
static sptr make(int decimation, const std::vector< float > &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