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

Cursor over one transform. More...

#include <zero_latency_convolver_support.hpp>

Public Types

enum class  Phase {
  idle , gather , butterflies , conjugate ,
  permute , scale
}

Public Member Functions

bool done () const
void begin_forward_from_ring (const SampleType *ring, std::size_t base, std::size_t mask)
 Forward transform of ring[(base + i) & mask], i in [0, size).
void begin_forward_in_place ()
 Forward transform of the already gathered natural-order data in data, using the in-place permutation and butterfly phases.
void begin_inverse_in_place ()
 Inverse transform of whatever already sits in data, computed as conj(fft(conj(x)))/N.
void cancel ()
long advance (const SlicedFftPlanT &plan, std::complex< SampleType > *data, long budget)

Public Attributes

Phase phase = Phase::idle
int cursor = 0
int stage = 1
bool inverse = false
const SampleType * gather_src = nullptr
std::size_t gather_base = 0
std::size_t gather_mask = 0

Detailed Description

template<typename SampleType>
struct pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor

Cursor over one transform.

begin_*() arms it; advance() performs work until the budget is spent or the transform completes.

The gather phase reads the source through a power-of-two ring (gather_src / gather_base / gather_mask) rather than from data, which is what lets the convolver's input history keep advancing while a transform over an older frame is still in flight — no snapshot copy is needed, and therefore no unsliceable O(K) memcpy lands in the block where the frame closes.

Member Enumeration Documentation

◆ Phase

template<typename SampleType>
enum class pulp::signal::detail::SlicedFftPlanT::Cursor::Phase
strong
Enumerator
idle 
gather 
butterflies 
conjugate 
permute 
scale 

Member Function Documentation

◆ advance()

template<typename SampleType>
long pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::advance ( const SlicedFftPlanT & plan,
std::complex< SampleType > * data,
long budget )
inline

◆ begin_forward_from_ring()

template<typename SampleType>
void pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::begin_forward_from_ring ( const SampleType * ring,
std::size_t base,
std::size_t mask )
inline

Forward transform of ring[(base + i) & mask], i in [0, size).

◆ begin_forward_in_place()

template<typename SampleType>
void pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::begin_forward_in_place ( )
inline

Forward transform of the already gathered natural-order data in data, using the in-place permutation and butterfly phases.

◆ begin_inverse_in_place()

template<typename SampleType>
void pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::begin_inverse_in_place ( )
inline

Inverse transform of whatever already sits in data, computed as conj(fft(conj(x)))/N.

◆ cancel()

template<typename SampleType>
void pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::cancel ( )
inline

◆ done()

template<typename SampleType>
bool pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::done ( ) const
inline

Member Data Documentation

◆ cursor

template<typename SampleType>
int pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::cursor = 0

◆ gather_base

template<typename SampleType>
std::size_t pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::gather_base = 0

◆ gather_mask

template<typename SampleType>
std::size_t pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::gather_mask = 0

◆ gather_src

template<typename SampleType>
const SampleType* pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::gather_src = nullptr

◆ inverse

template<typename SampleType>
bool pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::inverse = false

◆ phase

template<typename SampleType>
Phase pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::phase = Phase::idle

◆ stage

template<typename SampleType>
int pulp::signal::detail::SlicedFftPlanT< SampleType >::Cursor::stage = 1

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