Krotos Modules 3
Loading...
Searching...
No Matches
fftconvolver Namespace Reference

Classes

class  Buffer
 Simple buffer implementation (uses 16-byte alignment if SSE optimization is enabled) More...
 
class  FFTConvolver
 Implementation of a partitioned FFT convolution algorithm with uniform block size. More...
 
class  SplitComplex
 Buffer for split-complex representation of FFT results. More...
 
class  TwoStageFFTConvolver
 FFT convolver using two different block sizes. More...
 

Typedefs

typedef float Sample
 Type of one sample.
 
typedef Buffer< SampleSampleBuffer
 Buffer for samples.
 

Functions

bool SSEEnabled ()
 Returns whether SSE optimization for the convolver is enabled.
 
void Sum (Sample *FFTCONVOLVER_RESTRICT result, const Sample *FFTCONVOLVER_RESTRICT a, const Sample *FFTCONVOLVER_RESTRICT b, size_t len)
 Sums two given sample arrays.
 
void ComplexMultiplyAccumulate (SplitComplex &result, const SplitComplex &a, const SplitComplex &b)
 Adds the complex product of two split-complex buffers to a result buffer.
 
void ComplexMultiplyAccumulate (Sample *FFTCONVOLVER_RESTRICT re, Sample *FFTCONVOLVER_RESTRICT im, const Sample *FFTCONVOLVER_RESTRICT reA, const Sample *FFTCONVOLVER_RESTRICT imA, const Sample *FFTCONVOLVER_RESTRICT reB, const Sample *FFTCONVOLVER_RESTRICT imB, const size_t len)
 Adds the complex product of two split-complex arrays to a result array.
 
template<typename T >
NextPowerOf2 (const T &val)
 Returns the next power of 2 of a given number.
 
template<typename T >
void CopyAndPad (Buffer< T > &dest, const T *src, size_t srcSize)
 Copies a source array into a destination buffer and pads the destination buffer with zeros.
 

Typedef Documentation

◆ Sample

typedef float fftconvolver::Sample

Type of one sample.

◆ SampleBuffer

Function Documentation

◆ ComplexMultiplyAccumulate() [1/2]

void fftconvolver::ComplexMultiplyAccumulate ( Sample *FFTCONVOLVER_RESTRICT re,
Sample *FFTCONVOLVER_RESTRICT im,
const Sample *FFTCONVOLVER_RESTRICT reA,
const Sample *FFTCONVOLVER_RESTRICT imA,
const Sample *FFTCONVOLVER_RESTRICT reB,
const Sample *FFTCONVOLVER_RESTRICT imB,
const size_t len )

Adds the complex product of two split-complex arrays to a result array.

Parameters
reThe real part of the result buffer
imThe imaginary part of the result buffer
reAThe real part of the 1st factor of the complex product
imAThe imaginary part of the 1st factor of the complex product
reBThe real part of the 2nd factor of the complex product
imBThe imaginary part of the 2nd factor of the complex product

◆ ComplexMultiplyAccumulate() [2/2]

void fftconvolver::ComplexMultiplyAccumulate ( SplitComplex & result,
const SplitComplex & a,
const SplitComplex & b )

Adds the complex product of two split-complex buffers to a result buffer.

Parameters
resultThe result buffer
aThe 1st factor of the complex product
bThe 2nd factor of the complex product

◆ CopyAndPad()

template<typename T >
void fftconvolver::CopyAndPad ( Buffer< T > & dest,
const T * src,
size_t srcSize )

Copies a source array into a destination buffer and pads the destination buffer with zeros.

Parameters
destThe destination buffer
srcThe source array
srcSizeThe size of the source array

◆ NextPowerOf2()

template<typename T >
T fftconvolver::NextPowerOf2 ( const T & val)

Returns the next power of 2 of a given number.

Parameters
valThe number
Returns
The next power of 2

◆ SSEEnabled()

bool fftconvolver::SSEEnabled ( )

Returns whether SSE optimization for the convolver is enabled.

Returns
true: Enabled - false: Disabled

◆ Sum()

void fftconvolver::Sum ( Sample *FFTCONVOLVER_RESTRICT result,
const Sample *FFTCONVOLVER_RESTRICT a,
const Sample *FFTCONVOLVER_RESTRICT b,
size_t len )

Sums two given sample arrays.

Parameters
resultThe result array
aThe 1st array
bThe 2nd array
lenThe length of the arrays