3 * Copyright 2003 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
26 * Wrappers for FFTW single precision 1d dft
29 #include <gr_complex.h>
32 * \brief FFT: complex in, complex out
35 class gri_fft_complex {
42 gri_fft_complex (int fft_size, bool forward = true);
43 virtual ~gri_fft_complex ();
46 * These return pointers to buffers owned by gri_fft_complex into which
47 * input and output take place. It's done this way in order to
48 * ensure optimal alignment for SIMD instructions.
50 gr_complex *get_inbuf () const { return d_inbuf; }
51 gr_complex *get_outbuf () const { return d_outbuf; }
53 int inbuf_length () const { return d_fft_size; }
54 int outbuf_length () const { return d_fft_size; }
57 * compute FFT. The input comes from inbuf, the output is placed in outbuf.
63 * \brief FFT: real in, complex out
65 class gri_fft_real_fwd {
72 gri_fft_real_fwd (int fft_size);
73 virtual ~gri_fft_real_fwd ();
76 * These return pointers to buffers owned by gri_fft_real_fwd into
77 * which input and output take place. It's done this way in order
78 * to ensure optimal alignment for SIMD instructions.
80 float *get_inbuf () const { return d_inbuf; }
81 gr_complex *get_outbuf () const { return d_outbuf; }
83 int inbuf_length () const { return d_fft_size; }
84 int outbuf_length () const { return d_fft_size / 2 + 1; }
87 * compute FFT. The input comes from inbuf, the output is placed in outbuf.
93 * \brief FFT: complex in, float out
95 class gri_fft_real_rev {
102 gri_fft_real_rev (int fft_size);
103 virtual ~gri_fft_real_rev ();
106 * These return pointers to buffers owned by gri_fft_real_rev into
107 * which input and output take place. It's done this way in order
108 * to ensure optimal alignment for SIMD instructions.
110 gr_complex *get_inbuf () const { return d_inbuf; }
111 float *get_outbuf () const { return d_outbuf; }
113 int inbuf_length () const { return d_fft_size / 2 + 1; }
114 int outbuf_length () const { return d_fft_size; }
117 * compute FFT. The input comes from inbuf, the output is placed in outbuf.