DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::detail::fft::plan::RealPlan< T > Struct Template Reference

#include <FFT.h>

Public Member Functions

constexpr size_t firstLength () const noexcept
 Points of the spectra the first pass leaves.
 

Static Public Member Functions

static constexpr size_t passValues (size_t m, size_t repeat) noexcept
 
static constexpr size_t repeatFor (size_t m, size_t lanes, size_t wholeReach) noexcept
 
static constexpr bool halvesFor (size_t size, size_t lanes, size_t reach) noexcept
 
static constexpr size_t laneBin (size_t lanes, size_t p, bool byHalves) noexcept
 
static constexpr size_t passCount (size_t n) noexcept
 

Public Attributes

size_t n
 Points of each lane's transform.
 
size_t lanes
 Lanes: the transform has n * lanes samples.
 
bool first8
 The first pass takes eight samples (log2 n odd), not four.
 
bool halves
 The joining step works by halves, its tables in the order of laneBin().
 
size_t wholeReach
 Passes joining spectra of up to this many points hold each twiddle lanes times.
 
const T * twiddles
 The pass tables, by rising length of the spectra they join.
 
const T * turn
 The factors of the step that joins the lanes.
 
const T * edge
 The factors of the lanes' middle bin.
 
T scale
 1 / (n * lanes), for the inverse.
 

Detailed Description

template<typename T>
struct dspark::detail::fft::plan::RealPlan< T >

What a real transform by lanes reads (detail/FftKernels.inl): lanes sequences of n points each, one per lane of a vector.

Definition at line 259 of file FFT.h.

Member Function Documentation

◆ firstLength()

template<typename T >
constexpr size_t dspark::detail::fft::plan::RealPlan< T >::firstLength ( ) const
inlineconstexprnoexcept

Points of the spectra the first pass leaves.

Definition at line 272 of file FFT.h.

◆ halvesFor()

template<typename T >
static constexpr bool dspark::detail::fft::plan::RealPlan< T >::halvesFor ( size_t  size,
size_t  lanes,
size_t  reach 
)
inlinestaticconstexprnoexcept

Whether the joining step of a transform of size samples works by halves: only vectors of 32 bytes have halves, and only up to reach samples does it pay (kRealHalvesReach).

Definition at line 292 of file FFT.h.

◆ laneBin()

template<typename T >
static constexpr size_t dspark::detail::fft::plan::RealPlan< T >::laneBin ( size_t  lanes,
size_t  p,
bool  byHalves 
)
inlinestaticconstexprnoexcept

The bin (counted from the first of its group) that position p of a vector holds in the step that joins the lanes: p itself, or, where the step works by halves, four runs of lanes / 4 bins in the order (0, 2, 1, 3): what taking interleaved pairs apart gives when no value leaves its 128-bit half. The tables of that step follow this order.

Definition at line 302 of file FFT.h.

◆ passCount()

template<typename T >
static constexpr size_t dspark::detail::fft::plan::RealPlan< T >::passCount ( size_t  n)
inlinestaticconstexprnoexcept

Passes of a lane transform of n points, the first one included: one per two bits, the first taking three where their number is odd.

Definition at line 312 of file FFT.h.

◆ passValues()

template<typename T >
static constexpr size_t dspark::detail::fft::plan::RealPlan< T >::passValues ( size_t  m,
size_t  repeat 
)
inlinestaticconstexprnoexcept

Values in the table of the pass that joins spectra of m points: (re, im) of three factors for each bin 1 .. m/2 - 1, each one repeat times.

Definition at line 277 of file FFT.h.

◆ repeatFor()

template<typename T >
static constexpr size_t dspark::detail::fft::plan::RealPlan< T >::repeatFor ( size_t  m,
size_t  lanes,
size_t  wholeReach 
)
inlinestaticconstexprnoexcept

Times the table of the pass that joins spectra of m points holds each value.

Definition at line 284 of file FFT.h.

Member Data Documentation

◆ edge

template<typename T >
const T* dspark::detail::fft::plan::RealPlan< T >::edge

The factors of the lanes' middle bin.

Definition at line 268 of file FFT.h.

◆ first8

template<typename T >
bool dspark::detail::fft::plan::RealPlan< T >::first8

The first pass takes eight samples (log2 n odd), not four.

Definition at line 263 of file FFT.h.

◆ halves

template<typename T >
bool dspark::detail::fft::plan::RealPlan< T >::halves

The joining step works by halves, its tables in the order of laneBin().

Definition at line 264 of file FFT.h.

◆ lanes

template<typename T >
size_t dspark::detail::fft::plan::RealPlan< T >::lanes

Lanes: the transform has n * lanes samples.

Definition at line 262 of file FFT.h.

◆ n

template<typename T >
size_t dspark::detail::fft::plan::RealPlan< T >::n

Points of each lane's transform.

Definition at line 261 of file FFT.h.

◆ scale

template<typename T >
T dspark::detail::fft::plan::RealPlan< T >::scale

1 / (n * lanes), for the inverse.

Definition at line 269 of file FFT.h.

◆ turn

template<typename T >
const T* dspark::detail::fft::plan::RealPlan< T >::turn

The factors of the step that joins the lanes.

Definition at line 267 of file FFT.h.

◆ twiddles

template<typename T >
const T* dspark::detail::fft::plan::RealPlan< T >::twiddles

The pass tables, by rising length of the spectra they join.

Definition at line 266 of file FFT.h.

◆ wholeReach

template<typename T >
size_t dspark::detail::fft::plan::RealPlan< T >::wholeReach

Passes joining spectra of up to this many points hold each twiddle lanes times.

Definition at line 265 of file FFT.h.


The documentation for this struct was generated from the following file: