HOPS
HOPS class reference
MHO_FastFourierTransformCalls.hh
Go to the documentation of this file.
1 #ifndef MHO_FastFourierTransformCalls_HH__
2 #define MHO_FastFourierTransformCalls_HH__
3 
4 #include <algorithm>
5 #include <cmath>
6 #include <complex>
7 #include <cstddef>
8 
12 #include "MHO_Message.hh"
13 
14 namespace hops
15 {
16 
36 template< typename XFloatType >
37 void FFTRadix2(std::complex< XFloatType >* data, MHO_FastFourierTransformWorkspace< XFloatType >& work, bool isForward,
38  unsigned int stride = 1)
39 {
40  //for DFT we conjugate first (NOTE: this matches FFTW3 convention)
41  if(isForward)
42  {
44  }
45 
46  //use radix-2 + bit reversal permutation
47  MHO_BitReversalPermutation::PermuteArray< std::complex< XFloatType > >(work.fN, work.fPermutation, data, stride);
49 
50  //for DFT we conjugate again (NOTE: this matches FFTW3 convention)
51  if(isForward)
52  {
54  }
55 }
56 
57 
67 template< typename XFloatType >
68 void FFTBluestein(std::complex< XFloatType >* data, MHO_FastFourierTransformWorkspace< XFloatType >& work, bool isForward,
69  unsigned int stride = 1)
70 {
71  //for DFT we conjugate first (NOTE: this matches FFTW3 convention)
72  if(isForward)
73  {
75  }
76 
77  //use bluestein algorithm for arbitrary (non-power of 2) N
79  work.fScale, work.fCirculant, work.fWorkspace, stride);
80 
81  //for DFT we conjugate again (NOTE: this matches FFTW3 convention)
82  if(isForward)
83  {
85  }
86 }
87 
88 } // namespace hops
89 
90 #endif
static void FFTRadixTwo_DIT(unsigned int N, XFloatType *data, XFloatType *twiddle, unsigned int stride=1)
Computes a Radix-2 decimation in time (DIT) FFT. input: data array in bit-address permutated order ou...
Definition: MHO_FastFourierTransformUtilities.hh:119
static void FFTBluestein(unsigned int N, unsigned int M, std::complex< XFloatType > *data, std::complex< XFloatType > *twiddle, std::complex< XFloatType > *conj_twiddle, std::complex< XFloatType > *scale, std::complex< XFloatType > *circulant, std::complex< XFloatType > *workspace, unsigned int stride=1)
Function Bluestein algorithm for arbitrary length, N is length of the data, (supports strided data ac...
Definition: MHO_FastFourierTransformUtilities.hh:406
static void Conjugate(unsigned int N, std::complex< XFloatType > *array)
Conjugates each element in a complex array.
Definition: MHO_FastFourierTransformUtilities.hh:35
navtive FFT workspace definitions
Definition: MHO_FastFourierTransformWorkspace.hh:25
std::complex< XFloatType > * fCirculant
Definition: MHO_FastFourierTransformWorkspace.hh:153
std::complex< XFloatType > * fWorkspace
Definition: MHO_FastFourierTransformWorkspace.hh:154
unsigned int fM
Definition: MHO_FastFourierTransformWorkspace.hh:148
std::complex< XFloatType > * fScale
Definition: MHO_FastFourierTransformWorkspace.hh:152
unsigned int fN
Definition: MHO_FastFourierTransformWorkspace.hh:147
unsigned int * fPermutation
Definition: MHO_FastFourierTransformWorkspace.hh:149
std::complex< XFloatType > * fTwiddle
Definition: MHO_FastFourierTransformWorkspace.hh:150
std::complex< XFloatType > * fConjugateTwiddle
Definition: MHO_FastFourierTransformWorkspace.hh:151
Definition: MHO_ChannelLabeler.hh:17
void FFTBluestein(std::complex< XFloatType > *data, MHO_FastFourierTransformWorkspace< XFloatType > &work, bool isForward, unsigned int stride=1)
Performs Bluestein's FFT algorithm on complex data using a workspace for arbitrary N....
Definition: MHO_FastFourierTransformCalls.hh:68
void FFTRadix2(std::complex< XFloatType > *data, MHO_FastFourierTransformWorkspace< XFloatType > &work, bool isForward, unsigned int stride=1)
Performs a Radix-2 Decimation-in-time (DIT) FFT algorithm on complex data using a workspace for arbit...
Definition: MHO_FastFourierTransformCalls.hh:37