The shared Stockham engine: a forward complex FFT of size N on split (re, im) arrays, ping-ponging between two work buffers.
More...
|
| | SplitFFT ()=default |
| |
| | SplitFFT (size_t n, bool interleavedInput=false) |
| |
| size_t | size () const noexcept |
| |
| T * | inRe () noexcept |
| | Input buffers: fill inRe() / inIm() with N values each before run().
|
| |
| T * | inIm () noexcept |
| |
| void | run (const T *&outRe, const T *&outIm) noexcept |
| | Runs the forward transform of the input buffers.
|
| |
| void | runFrom (const T *data, bool conjugate, const T *&outRe, const T *&outIm) noexcept |
| | Transforms interleaved (re, im) pairs, conjugated if asked, without first copying them into the input buffers.
|
| |
| void | runFromSplit (const T *re, const T *im, const T *&outRe, const T *&outIm) noexcept |
| | Transforms N values read from two arrays of real and imaginary parts, without first copying them into the input buffers.
|
| |
| void | runScaledSwap (const T *re, const T *im, const T *gain, size_t mask, const T *&outRe, const T *&outIm) noexcept |
| | Transforms the spectrum product whose bin k is (im[k & mask] gain[k], re[k & mask] gain[k]), read straight from the arrays. Run on a product's swapped parts, a forward transform is its inverse with the parts swapped back on the way out, so this is a filter's multiply and inverse in one go. The product is never stored, so a build that contracts multiply-adds may fuse it into the first pass: one rounding fewer than writing it to the input buffers first and calling run().
|
| |
| void | runScaledSwapFolded (const T *re, const T *im, const T *gain, size_t fold, const T *&outRe, const T *&outIm) noexcept |
| | runScaledSwap() of a spectrum fold times this engine's size, folded: bin k sums the products of bins k + f N, f < fold. The result is the inverse of the product at every fold-th sample, exact when the product holds nothing the fold aliases (a filter whose stopband starts at the decimated Nyquist).
|
| |
| void | runTo (T *out, T scaleRe, T scaleIm) noexcept |
| | Transforms the input buffers and writes interleaved output directly.
|
| |
| void | runFromTo (const T *data, bool conjugate, T *out, T scaleRe, T scaleIm) noexcept |
| |
| size_t | runToStepCount () const noexcept |
| |
| void | runToStep (size_t step, T *out, T scaleRe, T scaleIm) noexcept |
| | Runs one step of runTo(): step s below runToStepCount() - 1 is pass s, the last step the closing pass into out. All steps in order, with nothing else run in between, equal runTo() bit for bit (the passes alternate between the two work buffers, so the buffer a step reads follows from its index). Step 0 chooses the kernel set and the later steps keep it, as runTo() does.
|
| |
template<typename T>
class dspark::detail::fft::SplitFFT< T >
The shared Stockham engine: a forward complex FFT of size N on split (re, im) arrays, ping-ponging between two work buffers.
Definition at line 452 of file FFT.h.
template<typename T >
| void dspark::detail::fft::SplitFFT< T >::runScaledSwap |
( |
const T * |
re, |
|
|
const T * |
im, |
|
|
const T * |
gain, |
|
|
size_t |
mask, |
|
|
const T *& |
outRe, |
|
|
const T *& |
outIm |
|
) |
| |
|
inlinenoexcept |
Transforms the spectrum product whose bin k is (im[k & mask] gain[k], re[k & mask] gain[k]), read straight from the arrays. Run on a product's swapped parts, a forward transform is its inverse with the parts swapped back on the way out, so this is a filter's multiply and inverse in one go. The product is never stored, so a build that contracts multiply-adds may fuse it into the first pass: one rounding fewer than writing it to the input buffers first and calling run().
- Parameters
-
| re | Real parts, mask + 1 bins (may be this engine's last output). |
| im | Imaginary parts, mask + 1 bins. |
| gain | N real gains. |
| mask | One less than a power of two that divides N: the spectrum repeats every mask + 1 bins (N - 1 for none). |
| outRe | Receives the pointer to the N output real parts. |
| outIm | Receives the pointer to the N output imaginary parts. |
Definition at line 643 of file FFT.h.