Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::detail::SlicedFftPlanT< SampleType > Class Template Reference

Resumable in-place radix-2 complex FFT (Cooley & Tukey 1965). More...

#include <zero_latency_convolver_support.hpp>

Classes

struct  Cursor
 Cursor over one transform. More...

Public Member Functions

void prepare (int size)
int size () const
int log2_size () const
long forward_cost () const
 Metered cost of one complete forward transform (permuted gather plus all butterfly stages) and of one complete inverse (both conjugate passes, the in-place permute, and all butterfly stages).
long inverse_cost () const
void transform_real_padded (const double *src, int src_len, std::complex< SampleType > *dst) const
 Blocking forward transform of a contiguous real buffer, zero-padded to size().

Static Public Attributes

static constexpr long kGatherCost = 1
static constexpr long kButterflyCost = 10
static constexpr long kConjugateCost = 2
static constexpr long kScaleCost = 4
static constexpr long kMacCost = 8

Detailed Description

template<typename SampleType>
class pulp::signal::detail::SlicedFftPlanT< SampleType >

Resumable in-place radix-2 complex FFT (Cooley & Tukey 1965).

The convolver needs a transform it can stop in the middle of: a length-K transform whose deadline is L = K/2 samples away must be spread over those samples, otherwise the block where its frame closes carries the whole cost. A library transform (vDSP, FFTW) is a single opaque call and cannot be sliced, which is the only reason this exists next to pulp::signal::FftT.

Work is metered in estimated real flops rather than in elements, so that slicing by budget balances flops rather than loop iterations: a permuted gather and a radix-2 butterfly differ by an order of magnitude in cost and would otherwise produce a very lumpy schedule.

RT contract: prepare() allocates. Cursor::begin_*() / Cursor::advance() allocate nothing.

Member Function Documentation

◆ forward_cost()

template<typename SampleType>
long pulp::signal::detail::SlicedFftPlanT< SampleType >::forward_cost ( ) const
inline

Metered cost of one complete forward transform (permuted gather plus all butterfly stages) and of one complete inverse (both conjugate passes, the in-place permute, and all butterfly stages).

Used to size the per-sample slicing budget.

◆ inverse_cost()

template<typename SampleType>
long pulp::signal::detail::SlicedFftPlanT< SampleType >::inverse_cost ( ) const
inline

◆ log2_size()

template<typename SampleType>
int pulp::signal::detail::SlicedFftPlanT< SampleType >::log2_size ( ) const
inline

◆ prepare()

template<typename SampleType>
void pulp::signal::detail::SlicedFftPlanT< SampleType >::prepare ( int size)
inline

◆ size()

template<typename SampleType>
int pulp::signal::detail::SlicedFftPlanT< SampleType >::size ( ) const
inline

◆ transform_real_padded()

template<typename SampleType>
void pulp::signal::detail::SlicedFftPlanT< SampleType >::transform_real_padded ( const double * src,
int src_len,
std::complex< SampleType > * dst ) const
inline

Blocking forward transform of a contiguous real buffer, zero-padded to size().

Load-time only (building the IR partition spectra).

Member Data Documentation

◆ kButterflyCost

template<typename SampleType>
long pulp::signal::detail::SlicedFftPlanT< SampleType >::kButterflyCost = 10
staticconstexpr

◆ kConjugateCost

template<typename SampleType>
long pulp::signal::detail::SlicedFftPlanT< SampleType >::kConjugateCost = 2
staticconstexpr

◆ kGatherCost

template<typename SampleType>
long pulp::signal::detail::SlicedFftPlanT< SampleType >::kGatherCost = 1
staticconstexpr

◆ kMacCost

template<typename SampleType>
long pulp::signal::detail::SlicedFftPlanT< SampleType >::kMacCost = 8
staticconstexpr

◆ kScaleCost

template<typename SampleType>
long pulp::signal::detail::SlicedFftPlanT< SampleType >::kScaleCost = 4
staticconstexpr

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