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

RAII aligned buffer with SIMD-friendly access. More...

#include <simd_buffer.hpp>

Public Member Functions

 AlignedBufferT ()=default
 AlignedBufferT (size_t num_samples)
 ~AlignedBufferT ()
 AlignedBufferT (AlignedBufferT &&other) noexcept
AlignedBufferT & operator= (AlignedBufferT &&other) noexcept
 AlignedBufferT (const AlignedBufferT &)=delete
AlignedBufferT & operator= (const AlignedBufferT &)=delete
SampleType * data ()
const SampleType * data () const
size_t size () const
bool empty () const
SampleType & operator[] (size_t i)
const SampleType & operator[] (size_t i) const
SampleType * begin ()
SampleType * end ()
const SampleType * begin () const
const SampleType * end () const
void clear ()
 Clear buffer to zero.
void resize (size_t new_size)
 Resize (reallocates, does not preserve data).
void copy_from (const SampleType *src, size_t count)
 Copy from raw pointer.

Detailed Description

template<typename SampleType = float>
class pulp::signal::AlignedBufferT< SampleType >

RAII aligned buffer with SIMD-friendly access.

RT contract: construction, destruction, move assignment, and resize() may allocate or free memory, except resize(size()) which is a no-op. clear(), copy_from(), element access, iteration, and same-size resize are allocation-free after storage has been allocated.

Constructor & Destructor Documentation

◆ AlignedBufferT() [1/4]

template<typename SampleType = float>
pulp::signal::AlignedBufferT< SampleType >::AlignedBufferT ( )
default

◆ AlignedBufferT() [2/4]

template<typename SampleType = float>
pulp::signal::AlignedBufferT< SampleType >::AlignedBufferT ( size_t num_samples)
inlineexplicit

◆ ~AlignedBufferT()

template<typename SampleType = float>
pulp::signal::AlignedBufferT< SampleType >::~AlignedBufferT ( )
inline

◆ AlignedBufferT() [3/4]

template<typename SampleType = float>
pulp::signal::AlignedBufferT< SampleType >::AlignedBufferT ( AlignedBufferT< SampleType > && other)
inlinenoexcept

◆ AlignedBufferT() [4/4]

template<typename SampleType = float>
pulp::signal::AlignedBufferT< SampleType >::AlignedBufferT ( const AlignedBufferT< SampleType > & )
delete

Member Function Documentation

◆ begin() [1/2]

template<typename SampleType = float>
SampleType * pulp::signal::AlignedBufferT< SampleType >::begin ( )
inline

◆ begin() [2/2]

template<typename SampleType = float>
const SampleType * pulp::signal::AlignedBufferT< SampleType >::begin ( ) const
inline

◆ clear()

template<typename SampleType = float>
void pulp::signal::AlignedBufferT< SampleType >::clear ( )
inline

Clear buffer to zero.

◆ copy_from()

template<typename SampleType = float>
void pulp::signal::AlignedBufferT< SampleType >::copy_from ( const SampleType * src,
size_t count )
inline

Copy from raw pointer.

◆ data() [1/2]

template<typename SampleType = float>
SampleType * pulp::signal::AlignedBufferT< SampleType >::data ( )
inline

◆ data() [2/2]

template<typename SampleType = float>
const SampleType * pulp::signal::AlignedBufferT< SampleType >::data ( ) const
inline

◆ empty()

template<typename SampleType = float>
bool pulp::signal::AlignedBufferT< SampleType >::empty ( ) const
inline

◆ end() [1/2]

template<typename SampleType = float>
SampleType * pulp::signal::AlignedBufferT< SampleType >::end ( )
inline

◆ end() [2/2]

template<typename SampleType = float>
const SampleType * pulp::signal::AlignedBufferT< SampleType >::end ( ) const
inline

◆ operator=() [1/2]

template<typename SampleType = float>
AlignedBufferT & pulp::signal::AlignedBufferT< SampleType >::operator= ( AlignedBufferT< SampleType > && other)
inlinenoexcept

◆ operator=() [2/2]

template<typename SampleType = float>
AlignedBufferT & pulp::signal::AlignedBufferT< SampleType >::operator= ( const AlignedBufferT< SampleType > & )
delete

◆ operator[]() [1/2]

template<typename SampleType = float>
SampleType & pulp::signal::AlignedBufferT< SampleType >::operator[] ( size_t i)
inline

◆ operator[]() [2/2]

template<typename SampleType = float>
const SampleType & pulp::signal::AlignedBufferT< SampleType >::operator[] ( size_t i) const
inline

◆ resize()

template<typename SampleType = float>
void pulp::signal::AlignedBufferT< SampleType >::resize ( size_t new_size)
inline

Resize (reallocates, does not preserve data).

◆ size()

template<typename SampleType = float>
size_t pulp::signal::AlignedBufferT< SampleType >::size ( ) const
inline

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/simd_buffer.hpp