HOPS
HOPS class reference
|
basic utility functions for native FFTs More...
#include <MHO_FastFourierTransformUtilities.hh>
Static Public Member Functions | |
static void | ButterflyRadixTwo_CooleyTukey (XFloatType *H0, XFloatType *H1, XFloatType *W) |
Function ButterflyRadixTwo_CooleyTukey See page 23 of "Inside the FFT Black Box", E. Chu and A. George, Ch. 13, CRC Press, 2000. More... | |
static void | ButterflyRadixTwo_GentlemanSande (XFloatType *H0, XFloatType *H1, XFloatType *W) |
Function ButterflyRadixTwo_GentlemanSande See page 25 of "Inside the FFT Black Box", E. Chu and A. George, Ch. 13, CRC Press, 2000. More... | |
static unsigned int | ComputeBluesteinArraySize (unsigned int N) |
Function ComputeBluesteinArraySize Computes the array size needed to perform a Bluestein/Chirp-Z FFT for arbitrary N. More... | |
static void | ComputeBluesteinCirculantVector (unsigned int N, unsigned int M, std::complex< XFloatType > *twiddle, std::complex< XFloatType > *scale, std::complex< XFloatType > *circulant) |
Function ComputeBluesteinCirculantVector twiddle and circulant array must be length M = 2^p >= (2N - 2), where N is the data length. More... | |
static void | ComputeBluesteinScaleFactors (unsigned int N, std::complex< XFloatType > *scale) |
Function ComputeBluesteinScaleFactors. More... | |
static void | ComputeConjugateTwiddleFactorBasis (unsigned int log2N, std::complex< XFloatType > *conj_twiddle) |
Computes conjugate twiddle factor basis for given log2N and stores result in conj_twiddle. More... | |
static void | ComputeConjugateTwiddleFactors (unsigned int N, std::complex< XFloatType > *conj_twiddle) |
Computes the conjugate twiddle factors for given size N and stores them in provided array. More... | |
static void | ComputeTwiddleFactorBasis (unsigned int log2N, std::complex< XFloatType > *twiddle) |
Computes twiddle factors for Fast Fourier Transform up to log2N. computes only the twiddle factors we need in order to easily compute them on the fly e.g e^{ix}, e^{2ix}, e^{4ix}, e^{8ix}, etc up to e^{Nix} ), that way we only need log2N storage. More... | |
static void | ComputeTwiddleFactors (unsigned int N, std::complex< XFloatType > *twiddle) |
Compute twiddle factors for a Fast Fourier Transform. computes all the twiddle factors e^{i*2*pi/N} for 0 to N-1 using std::cos and std::sin which is more accurate than the recursive method. More... | |
static void | Conjugate (unsigned int N, std::complex< XFloatType > *array) |
Conjugates each element in a complex array. More... | |
static void | Conjugate (unsigned int N, std::complex< XFloatType > *array, unsigned int stride) |
Conjugates each element in a complex (strided) array. More... | |
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 access) More... | |
static void | FFTRadixTwo_DIF (unsigned int N, std::complex< XFloatType > *data, std::complex< XFloatType > *twiddle, unsigned int stride=1) |
Radix-2 DIF FFT wrapper for a std::complex array. More... | |
static void | FFTRadixTwo_DIF (unsigned int N, XFloatType *data, XFloatType *twiddle, unsigned int stride=1) |
Performs Radix-2 Decimation In Frequency (DIF) FFT using conjugate array and twiddle factors. input: data array in normal order output: fft of data in bit-address permutated order. More... | |
static void | FFTRadixTwo_DIT (unsigned int N, std::complex< XFloatType > *data, std::complex< XFloatType > *twiddle, unsigned int stride=1) |
Radix-2 DIT FFT wrapper for a std::complex array. More... | |
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 output: fft of data in normal order. More... | |
basic utility functions for native FFTs
|
inline |
|
inlinevirtual |
|
inlinestatic |
Function ButterflyRadixTwo_CooleyTukey See page 23 of "Inside the FFT Black Box", E. Chu and A. George, Ch. 13, CRC Press, 2000.
H0 | (XFloatType*) |
H1 | (XFloatType*) |
W | (XFloatType*) |
|
inlinestatic |
Function ButterflyRadixTwo_GentlemanSande See page 25 of "Inside the FFT Black Box", E. Chu and A. George, Ch. 13, CRC Press, 2000.
H0 | (XFloatType*) |
H1 | (XFloatType*) |
W | (XFloatType*) |
|
inlinestatic |
Function ComputeBluesteinArraySize Computes the array size needed to perform a Bluestein/Chirp-Z FFT for arbitrary N.
N | (unsigned int) |
|
inlinestatic |
Function ComputeBluesteinCirculantVector twiddle and circulant array must be length M = 2^p >= (2N - 2), where N is the data length.
N | (unsigned int) |
M | (unsigned int) |
twiddle | (std::complex< XFloatType >*) |
scale | (std::complex< XFloatType >*) |
circulant | (std::complex< XFloatType >*) |
|
inline |
Function MHO_FastFourierTransformUtilities<double>::ComputeBluesteinScaleFactors.
N | (unsigned int) |
scale | (std::complex< double >*) |
|
inline |
Function MHO_FastFourierTransformUtilities<float>::ComputeBluesteinScaleFactors.
N | (unsigned int) |
scale | (std::complex< float >*) |
|
inline |
Function MHO_FastFourierTransformUtilities<long double>::ComputeBluesteinScaleFactors.
N | (unsigned int) |
scale | (std::complex< long double >*) |
|
static |
Function ComputeBluesteinScaleFactors.
N | (unsigned int) |
scale | (std::complex< XFloatType >*) scale factor array must be length N |
|
inlinestatic |
Computes conjugate twiddle factor basis for given log2N and stores result in conj_twiddle.
log2N | Number of bits to divide N by 2 for twiddle factors |
conj_twiddle | (std::complex< XFloatType )* |
|
inlinestatic |
Computes the conjugate twiddle factors for given size N and stores them in provided array.
N | Size of the transform (N must be a power of 2) |
conj_twiddle | Output array to store the computed conjugate twiddle factors |
|
inline |
Function MHO_FastFourierTransformUtilities<double>::ComputeTwiddleFactorBasis.
log2N | (unsigned int) |
twiddle | (std::complex< double >*) |
|
inline |
Function MHO_FastFourierTransformUtilities<float>::ComputeTwiddleFactorBasis.
log2N | (unsigned int) |
twiddle | (std::complex< float >*) |
|
inline |
Function MHO_FastFourierTransformUtilities<long double>::ComputeTwiddleFactorBasis.
log2N | (unsigned int) |
twiddle | (std::complex< long double >*) |
|
static |
Computes twiddle factors for Fast Fourier Transform up to log2N. computes only the twiddle factors we need in order to easily compute them on the fly e.g e^{ix}, e^{2ix}, e^{4ix}, e^{8ix}, etc up to e^{Nix} ), that way we only need log2N storage.
log2N | Number of bits in N (N = 2^log2N) |
twiddle | Array to store computed twiddle factors |
|
inline |
Function MHO_FastFourierTransformUtilities<double>::ComputeTwiddleFactors.
N | (unsigned int) |
twiddle | (std::complex< double >*) |
|
inline |
Function MHO_FastFourierTransformUtilities<float>::ComputeTwiddleFactors.
N | (unsigned int) |
twiddle | (std::complex< float >*) |
|
inline |
Function MHO_FastFourierTransformUtilities<long double>::ComputeTwiddleFactors.
N | (unsigned int) |
twiddle | (std::complex< long double >*) |
|
static |
Compute twiddle factors for a Fast Fourier Transform. computes all the twiddle factors e^{i*2*pi/N} for 0 to N-1 using std::cos and std::sin which is more accurate than the recursive method.
N | Size of the transform (N). |
twiddle | Output array to store computed twiddle factors. |
|
inlinestatic |
Conjugates each element in a complex array.
N | Size of the input array |
array | Input/output array of complex numbers |
|
inlinestatic |
Conjugates each element in a complex (strided) array.
N | Size of the array |
array | Input/output complex array to conjugate |
stride | (unsigned int) |
|
inlinestatic |
Function Bluestein algorithm for arbitrary length, N is length of the data, (supports strided data access)
N | (unsigned int) length of data |
M | (unsigned int) Bluestein array size |
data | (std::complex< XFloatType >*) data array |
twiddle | (std::complex< XFloatType >*) twiddle factors |
conj_twiddle | (std::complex< XFloatType >*) conjugate twiddle factors |
scale | (std::complex< XFloatType >*) scale factors |
circulant | (std::complex< XFloatType >*) circulant array |
workspace | (std::complex< XFloatType >*) scratch space |
stride | (unsigned int) (default is 1, unstrided) |
|
inlinestatic |
Radix-2 DIF FFT wrapper for a std::complex array.
N | Size of the data array |
data | Input/output complex data array |
twiddle | Output twiddle factors array |
stride | Stride for accessing data elements |
|
inlinestatic |
Performs Radix-2 Decimation In Frequency (DIF) FFT using conjugate array and twiddle factors. input: data array in normal order output: fft of data in bit-address permutated order.
N | Size of the data array (must be power of 2) |
data | Input/output complex data array |
twiddle | Twiddle factor array |
stride | Stride for accessing data elements |
|
inlinestatic |
Radix-2 DIT FFT wrapper for a std::complex array.
N | Size of the data array |
data | Input/output complex data array with given stride |
twiddle | Precomputed twiddle factors array |
stride | Stride for accessing data elements |
|
inlinestatic |
Computes a Radix-2 decimation in time (DIT) FFT. input: data array in bit-address permutated order output: fft of data in normal order.
N | Size of the data array (must be power of 2) |
data | Input/output array of complex numbers to conjugate |
twiddle | Array of precomputed twiddle factors |
stride | Stride between elements in the input array |