root / gr-filter / lib / fft_filter_fff_impl.h @ master
History | View | Annotate | Download (1.8 kB)
| 1 | 26531c2d | Tom Rondeau | /* -*- c++ -*- */
|
|---|---|---|---|
| 2 | 26531c2d | Tom Rondeau | /*
|
| 3 | b63e3b8a | Tom Rondeau | * Copyright 2005,2012 Free Software Foundation, Inc. |
| 4 | 26531c2d | Tom Rondeau | * |
| 5 | 26531c2d | Tom Rondeau | * This file is part of GNU Radio |
| 6 | 26531c2d | Tom Rondeau | * |
| 7 | 26531c2d | Tom Rondeau | * GNU Radio is free software; you can redistribute it and/or modify |
| 8 | 26531c2d | Tom Rondeau | * it under the terms of the GNU General Public License as published by |
| 9 | 26531c2d | Tom Rondeau | * the Free Software Foundation; either version 3, or (at your option) |
| 10 | 26531c2d | Tom Rondeau | * any later version. |
| 11 | 26531c2d | Tom Rondeau | * |
| 12 | 26531c2d | Tom Rondeau | * GNU Radio is distributed in the hope that it will be useful, |
| 13 | 26531c2d | Tom Rondeau | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | 26531c2d | Tom Rondeau | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | 26531c2d | Tom Rondeau | * GNU General Public License for more details. |
| 16 | 26531c2d | Tom Rondeau | * |
| 17 | 26531c2d | Tom Rondeau | * You should have received a copy of the GNU General Public License |
| 18 | 26531c2d | Tom Rondeau | * along with GNU Radio; see the file COPYING. If not, write to |
| 19 | 26531c2d | Tom Rondeau | * the Free Software Foundation, Inc., 51 Franklin Street, |
| 20 | 26531c2d | Tom Rondeau | * Boston, MA 02110-1301, USA. |
| 21 | 26531c2d | Tom Rondeau | */ |
| 22 | b63e3b8a | Tom Rondeau | #ifndef INCLUDED_FILTER_FFT_FILTER_FFF_IMPL_H
|
| 23 | b63e3b8a | Tom Rondeau | #define INCLUDED_FILTER_FFT_FILTER_FFF_IMPL_H
|
| 24 | b63e3b8a | Tom Rondeau | |
| 25 | b63e3b8a | Tom Rondeau | #include <filter/api.h> |
| 26 | b63e3b8a | Tom Rondeau | #include <filter/fft_filter.h> |
| 27 | b63e3b8a | Tom Rondeau | #include <filter/fft_filter_fff.h> |
| 28 | b63e3b8a | Tom Rondeau | |
| 29 | b63e3b8a | Tom Rondeau | namespace gr {
|
| 30 | b63e3b8a | Tom Rondeau | namespace filter {
|
| 31 | b63e3b8a | Tom Rondeau | |
| 32 | b63e3b8a | Tom Rondeau | class FILTER_API fft_filter_fff_impl : public fft_filter_fff |
| 33 | b63e3b8a | Tom Rondeau | {
|
| 34 | b63e3b8a | Tom Rondeau | private:
|
| 35 | b63e3b8a | Tom Rondeau | int d_nsamples;
|
| 36 | b63e3b8a | Tom Rondeau | bool d_updated;
|
| 37 | b63e3b8a | Tom Rondeau | kernel::fft_filter_fff *d_filter; |
| 38 | b63e3b8a | Tom Rondeau | std::vector<float> d_new_taps;
|
| 39 | b63e3b8a | Tom Rondeau | |
| 40 | b63e3b8a | Tom Rondeau | public:
|
| 41 | b63e3b8a | Tom Rondeau | fft_filter_fff_impl(int decimation,
|
| 42 | b63e3b8a | Tom Rondeau | const std::vector<float> &taps, |
| 43 | b63e3b8a | Tom Rondeau | int nthreads=1); |
| 44 | b63e3b8a | Tom Rondeau | |
| 45 | b63e3b8a | Tom Rondeau | ~fft_filter_fff_impl(); |
| 46 | b63e3b8a | Tom Rondeau | |
| 47 | b63e3b8a | Tom Rondeau | void set_taps(const std::vector<float> &taps); |
| 48 | b63e3b8a | Tom Rondeau | std::vector<float> taps() const; |
| 49 | b63e3b8a | Tom Rondeau | |
| 50 | b63e3b8a | Tom Rondeau | void set_nthreads(int n); |
| 51 | b63e3b8a | Tom Rondeau | int nthreads() const; |
| 52 | b63e3b8a | Tom Rondeau | |
| 53 | b63e3b8a | Tom Rondeau | int work(int noutput_items, |
| 54 | b63e3b8a | Tom Rondeau | gr_vector_const_void_star &input_items, |
| 55 | b63e3b8a | Tom Rondeau | gr_vector_void_star &output_items); |
| 56 | b63e3b8a | Tom Rondeau | }; |
| 57 | b63e3b8a | Tom Rondeau | |
| 58 | b63e3b8a | Tom Rondeau | } /* namespace filter */
|
| 59 | b63e3b8a | Tom Rondeau | } /* namespace gr */
|
| 60 | b63e3b8a | Tom Rondeau | |
| 61 | b63e3b8a | Tom Rondeau | #endif /* INCLUDED_FILTER_FFT_FILTER_FFF_IMPL_H */ |