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 |
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.
|
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Blocking forward transform of a contiguous real buffer, zero-padded to size().
Load-time only (building the IR partition spectra).
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |