3 * Copyright 2008 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 3, 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 along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef INCLUDED_GCP_FFT_1D_R2_H
22 #define INCLUDED_GCP_FFT_1D_R2_H
24 #include <gcell/gc_job_manager.h>
28 * \brief Submit a job that computes the forward or inverse FFT.
30 * \param mgr is the job manager instance
31 * \param log2_fft_length is the log2 of the fft_length (4 <= x <= 12).
32 * \param forward is true to compute the forward transform, else the inverse.
33 * \param shift indicates if an "fftshift" should be applied to the output data
34 * \param out is the fft_length output from FFT (must be 16-byte aligned).
35 * \param in is the fft_length input to FFT (must be 16-byte aligned).
36 * \param twiddle is fft_length/4 twiddle factor input to FFT (must be 16-byte aligned).
37 * \param window is the window to be applied to the input data.
38 * The window length must be either 0 or fft_length (must be 16-byte aligned).
40 * Returns a shared_ptr to a job descriptor which should be passed to wait_job*.
41 * Throws an exception in the event of a problem.
42 * This uses the FFTW conventions for scaling. That is, neither the forward nor inverse
43 * are scaled by 1/fft_length.
46 gcp_fft_1d_r2_submit(gc_job_manager_sptr mgr,
47 unsigned int log2_fft_length,
50 std::complex<float> *out,
51 const std::complex<float> *in,
52 const std::complex<float> *twiddle,
56 * \brief Compute twiddle factors
58 * \param log2_fft_length is the log2 of the fft_length.
59 * \param W is fft_length/4 twiddle factor output (must be 16-byte aligned).
62 gcp_fft_1d_r2_twiddle(unsigned int log2_fft_length, std::complex<float> *W);
64 #endif /* INCLUDED_GCP_FFT_1D_R2_H */