DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::detail::fft Namespace Reference

Classes

class  SplitFFT
 The shared Stockham engine: a forward complex FFT of size N on split (re, im) arrays, ping-ponging between two work buffers. More...
 
struct  TwiddleSpan
 

Typedefs

template<typename T , int W>
using Vec = simd::Vec< T, W >
 The shared SIMD vector abstraction (SimdOps.h) and its widths.
 

Functions

template<typename T , int W>
void radix4Strided (const T *xr, const T *xi, T *yr, T *yi, size_t n, size_t s, const TwiddleSpan< T > &tw) noexcept
 One Stockham radix-4 DIF pass with stride s >= W, vectorised over the stride (twiddles broadcast per butterfly group).
 
template<typename T , int W>
void radix4First (const T *xr, const T *xi, T *yr, T *yi, size_t n, const TwiddleSpan< T > &tw) noexcept
 The first (stride-1) radix-4 pass, vectorised across W butterflies (n/4 must be a multiple of W): the inputs and twiddles are contiguous in p, and the four outputs of each butterfly are adjacent, written through a 4-way interleave.
 
template<typename T , int W>
void radix2Last (const T *xr, const T *xi, T *yr, T *yi, size_t s) noexcept
 The closing radix-2 pass (n = 2, stride s = N / 2): no twiddles.
 

Variables

template<typename T >
constexpr int kWide = simd::kVecWidth<T>
 
template<typename T >
constexpr int kNarrow = simd::kVecNarrowWidth<T>
 

Typedef Documentation

◆ Vec

template<typename T , int W>
using dspark::detail::fft::Vec = typedef simd::Vec<T, W>

The shared SIMD vector abstraction (SimdOps.h) and its widths.

Definition at line 81 of file FFT.h.

Function Documentation

◆ radix2Last()

template<typename T , int W>
void dspark::detail::fft::radix2Last ( const T *  xr,
const T *  xi,
T *  yr,
T *  yi,
size_t  s 
)
noexcept

The closing radix-2 pass (n = 2, stride s = N / 2): no twiddles.

Definition at line 193 of file FFT.h.

◆ radix4First()

template<typename T , int W>
void dspark::detail::fft::radix4First ( const T *  xr,
const T *  xi,
T *  yr,
T *  yi,
size_t  n,
const TwiddleSpan< T > &  tw 
)
noexcept

The first (stride-1) radix-4 pass, vectorised across W butterflies (n/4 must be a multiple of W): the inputs and twiddles are contiguous in p, and the four outputs of each butterfly are adjacent, written through a 4-way interleave.

Definition at line 158 of file FFT.h.

◆ radix4Strided()

template<typename T , int W>
void dspark::detail::fft::radix4Strided ( const T *  xr,
const T *  xi,
T *  yr,
T *  yi,
size_t  n,
size_t  s,
const TwiddleSpan< T > &  tw 
)
noexcept

One Stockham radix-4 DIF pass with stride s >= W, vectorised over the stride (twiddles broadcast per butterfly group).

y[q + s(4p + k)] = w^(kp) * (radix-4 butterfly of x[q + s(p + k n/4)]).

Definition at line 106 of file FFT.h.

Variable Documentation

◆ kNarrow

template<typename T >
constexpr int dspark::detail::fft::kNarrow = simd::kVecNarrowWidth<T>
inlineconstexpr

Definition at line 83 of file FFT.h.

◆ kWide

template<typename T >
constexpr int dspark::detail::fft::kWide = simd::kVecWidth<T>
inlineconstexpr

Definition at line 82 of file FFT.h.