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

One polyphase branch of a block 2x stage: a direct-form FIR whose every output is the taps summed oldest-first, one multiply-add each (fused where the hardware has it; see fir_multiply_add()). More...

#include <oversampling_fir.hpp>

Public Member Functions

void set_coefficients (const std::vector< SampleType > &time_order)
void reset ()
std::size_t taps () const noexcept
void process (const SampleType *input, SampleType *output, std::size_t n) noexcept
 n <= kBlock. output must not alias input.

Static Public Attributes

static constexpr std::size_t kBlock = 256

Detailed Description

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

One polyphase branch of a block 2x stage: a direct-form FIR whose every output is the taps summed oldest-first, one multiply-add each (fused where the hardware has it; see fir_multiply_add()).

That fixed per-output order is the point. A vectorised correlation (vDSP_conv, a tree-reduced dot) regroups the sum differently depending on how many outputs one call produces, so the same signal fed in different block sizes rounds differently. Here sixteen outputs advance together in registers and a ragged tail runs the identical sequence one output at a time, so the result is bit-identical for any partition of the input — including one sample at a time.

Member Function Documentation

◆ process()

template<typename SampleType>
void pulp::signal::detail::FixedOrderFirBranch< SampleType >::process ( const SampleType * input,
SampleType * output,
std::size_t n )
inlinenoexcept

n <= kBlock. output must not alias input.

◆ reset()

template<typename SampleType>
void pulp::signal::detail::FixedOrderFirBranch< SampleType >::reset ( )
inline

◆ set_coefficients()

template<typename SampleType>
void pulp::signal::detail::FixedOrderFirBranch< SampleType >::set_coefficients ( const std::vector< SampleType > & time_order)
inline

◆ taps()

template<typename SampleType>
std::size_t pulp::signal::detail::FixedOrderFirBranch< SampleType >::taps ( ) const
inlinenoexcept

Member Data Documentation

◆ kBlock

template<typename SampleType>
std::size_t pulp::signal::detail::FixedOrderFirBranch< SampleType >::kBlock = 256
staticconstexpr

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