DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::detail::fft::WorkBuffers< T > Class Template Reference

Two buffers of the same length in one allocation, each starting on a 64-byte boundary, the second a whole number of 64-byte lines after the first (of 4 KiB pages from 4 KiB per buffer). More...

#include <FFT.h>

Public Member Functions

 WorkBuffers ()=default
 
 WorkBuffers (size_t count)
 Two zeroed buffers of count values each.
 
 WorkBuffers (const WorkBuffers &other)
 
 WorkBuffers (WorkBuffers &&other) noexcept
 
WorkBuffers & operator= (WorkBuffers other) noexcept
 
T * first () noexcept
 
const T * first () const noexcept
 
T * second () noexcept
 
const T * second () const noexcept
 

Static Public Member Functions

static constexpr size_t values (size_t count) noexcept
 

Detailed Description

template<typename T>
class dspark::detail::fft::WorkBuffers< T >

Two buffers of the same length in one allocation, each starting on a 64-byte boundary, the second a whole number of 64-byte lines after the first (of 4 KiB pages from 4 KiB per buffer).

A pass reads one buffer and writes the other with vectors of up to 32 bytes. A buffer that starts wherever its allocation does puts some of those vectors across two cache lines (with 32-byte vectors, every other one where the start is 16 bytes off, which is where the usual allocators put a large block): measured with the 32-byte kernels, transforms of a few thousand points and more then cost 1.2 to 1.6 times as much on one CPU family and 1.05 to 1.1 times on another, and shorter ones up to 1.15 times.

Copies place their own buffers and carry the contents over; a moved-from object holds nothing.

Definition at line 381 of file FFT.h.

Constructor & Destructor Documentation

◆ WorkBuffers() [1/4]

template<typename T >
dspark::detail::fft::WorkBuffers< T >::WorkBuffers ( )
default

◆ WorkBuffers() [2/4]

template<typename T >
dspark::detail::fft::WorkBuffers< T >::WorkBuffers ( size_t  count)
inlineexplicit

Two zeroed buffers of count values each.

Definition at line 387 of file FFT.h.

◆ WorkBuffers() [3/4]

template<typename T >
dspark::detail::fft::WorkBuffers< T >::WorkBuffers ( const WorkBuffers< T > &  other)
inline

Definition at line 392 of file FFT.h.

◆ WorkBuffers() [4/4]

template<typename T >
dspark::detail::fft::WorkBuffers< T >::WorkBuffers ( WorkBuffers< T > &&  other)
inlinenoexcept

Definition at line 399 of file FFT.h.

Member Function Documentation

◆ first() [1/2]

template<typename T >
const T * dspark::detail::fft::WorkBuffers< T >::first ( ) const
inlinenoexcept

Definition at line 414 of file FFT.h.

◆ first() [2/2]

template<typename T >
T * dspark::detail::fft::WorkBuffers< T >::first ( )
inlinenoexcept

Definition at line 413 of file FFT.h.

◆ operator=()

template<typename T >
WorkBuffers & dspark::detail::fft::WorkBuffers< T >::operator= ( WorkBuffers< T >  other)
inlinenoexcept

Definition at line 405 of file FFT.h.

◆ second() [1/2]

template<typename T >
const T * dspark::detail::fft::WorkBuffers< T >::second ( ) const
inlinenoexcept

Definition at line 416 of file FFT.h.

◆ second() [2/2]

template<typename T >
T * dspark::detail::fft::WorkBuffers< T >::second ( )
inlinenoexcept

Definition at line 415 of file FFT.h.

◆ values()

template<typename T >
static constexpr size_t dspark::detail::fft::WorkBuffers< T >::values ( size_t  count)
inlinestaticconstexprnoexcept

Values the constructor requests for two buffers of count values: the first buffer rounded up to whole lines, the second, and room to reach the first boundary.

Definition at line 421 of file FFT.h.


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