Class convolve_filter¶
class convolve_filter<T> dft¶
template <typename T>
class convolve_filter : public filter<T> { … } Streaming convolution filter using the overlap-add (block convolution) method.
| T | Sample type: float , double , complex<float> or complex<double> . |
constructor convolve_filter<T>(size_t, size_t) ¶
explicit convolve_filter(size_t size, size_t block_size = 1024) Constructs a filter with a kernel of the given length (initially zero).
| size | Length (in samples) of the filter kernel. |
| block_size | Processing block size in samples; rounded up to the next power of two. Larger blocks reduce per-sample overhead at the cost of more memory and latency. |
Fully qualified name: kfr::convolve_filter<T>::convolve_filter<T>(size_t, size_t)
Declared at dft/convolution.hpp:177
constructor convolve_filter<T>(const univector_ref<const T> &, size_t) ¶
explicit convolve_filter(const univector_ref<const T>& data, size_t block_size = 1024) Constructs a filter and initializes its kernel from data .
| data | The filter kernel (impulse response). |
| block_size | Processing block size in samples; rounded up to the next power of two. |
Fully qualified name: kfr::convolve_filter<T>::convolve_filter<T>(const univector_ref<const T> &, size_t)
Declared at dft/convolution.hpp:184
function set_data(const univector_ref<const T> &) ¶
void set_data(const univector_ref<const T>& data) Sets (replaces) the filter kernel.
Re-transforms the kernel into frequency-domain blocks and resets the internal state. The number of history segments is resized to match the new kernel length.
| data | The new filter kernel (impulse response). |
Fully qualified name: kfr::convolve_filter<T>::set_data(const univector_ref<const T> &)
Declared at dft/convolution.hpp:193
function reset() ¶
void reset() final Resets the filter state (clears input history and overlap buffers).
Fully qualified name: kfr::convolve_filter<T>::reset()
Declared at dft/convolution.hpp:195
function input_block_size() ¶
size_t input_block_size() const Returns the processing block size.
For optimal efficiency, drive the filter with input lengths that are multiples of this value.
| The block size in samples. |
Fully qualified name: kfr::convolve_filter<T>::input_block_size()
Declared at dft/convolution.hpp:203
function process_expression(T *, const expression_handle<T> &, size_t) ¶
void process_expression(T* dest, const expression_handle<T>& src, size_t size) final Fully qualified name: kfr::convolve_filter<T>::process_expression(T *, const expression_handle<T> &, size_t)
Declared at dft/convolution.hpp:206
function process_buffer(T *, const T *, size_t) ¶
void process_buffer(T* output, const T* input, size_t size) final Fully qualified name: kfr::convolve_filter<T>::process_buffer(T *, const T *, size_t)
Declared at dft/convolution.hpp:211
typedef ST ¶
using ST = subtype<T> Fully qualified name: kfr::convolve_filter<T>::ST
Declared at dft/convolution.hpp:213
variable real_fft ¶
Fully qualified name: kfr::convolve_filter<T>::real_fft
Declared at dft/convolution.hpp:214
typedef plan_t ¶
using plan_t = internal_generic::dft_conv_plan<T> Fully qualified name: kfr::convolve_filter<T>::plan_t
Declared at dft/convolution.hpp:215
variable data_size ¶
size_t data_size Fully qualified name: kfr::convolve_filter<T>::data_size
Declared at dft/convolution.hpp:218
variable block_size ¶
const size_t block_size Fully qualified name: kfr::convolve_filter<T>::block_size
Declared at dft/convolution.hpp:220
variable fft ¶
const plan_t fft Fully qualified name: kfr::convolve_filter<T>::fft
Declared at dft/convolution.hpp:222
variable temp ¶
Fully qualified name: kfr::convolve_filter<T>::temp
Declared at dft/convolution.hpp:224
variable segments ¶
Fully qualified name: kfr::convolve_filter<T>::segments
Declared at dft/convolution.hpp:226
variable position ¶
size_t position Fully qualified name: kfr::convolve_filter<T>::position
Declared at dft/convolution.hpp:228
variable ir_segments ¶
Fully qualified name: kfr::convolve_filter<T>::ir_segments
Declared at dft/convolution.hpp:230
variable saved_input ¶
univector<T> saved_input Fully qualified name: kfr::convolve_filter<T>::saved_input
Declared at dft/convolution.hpp:232
variable input_position ¶
size_t input_position Fully qualified name: kfr::convolve_filter<T>::input_position
Declared at dft/convolution.hpp:234
variable premul ¶
Fully qualified name: kfr::convolve_filter<T>::premul
Declared at dft/convolution.hpp:236
variable cscratch ¶
Fully qualified name: kfr::convolve_filter<T>::cscratch
Declared at dft/convolution.hpp:238
variable scratch1 ¶
univector<T> scratch1 Fully qualified name: kfr::convolve_filter<T>::scratch1
Declared at dft/convolution.hpp:240
variable scratch2 ¶
Fully qualified name: kfr::convolve_filter<T>::scratch2
Declared at dft/convolution.hpp:240
variable overlap ¶
univector<T> overlap Fully qualified name: kfr::convolve_filter<T>::overlap
Declared at dft/convolution.hpp:242
Fully qualified name: kfr::convolve_filter<T>
Declared at dft/convolution.hpp:167