Skip to main content

VectorAnalogDataStorage

VectorAnalogDataStorage

Contiguous vector-based analog data storage using CRTP. More…

#include <VectorAnalogDataStorage.hpp>

Inherits from AnalogDataStorageBase< VectorAnalogDataStorage >

Public Functions

Name
VectorAnalogDataStorage(std::vector< float > data)
Construct storage from a vector of float values.
~VectorAnalogDataStorage() =default
float getValueAtImpl(std::size_t index) const
std::size_t sizeImpl() const
std::span< float const > getSpanImpl() const
std::span< float const > getSpanRangeImpl(std::size_t start, std::size_t end) const
bool isContiguousImpl() const
AnalogStorageType getStorageTypeImpl() const
AnalogDataStorageCache tryGetCacheImpl() const
std::vector< float > const & getVector() const
Get direct access to the underlying vector.
float const * data() const
Get raw pointer to contiguous data.

Additional inherited members

Public Functions inherited from AnalogDataStorageBase< VectorAnalogDataStorage >

Name
std::size_t size() const
Get the number of samples in storage.
bool empty() const
Check if storage is empty.
float getValueAt(std::size_t index) const
Get the value at a specific index.
std::span< float const > getSpan() const
Get a span over all data (if contiguous).
std::span< float const > getSpanRange(std::size_t start, std::size_t end) const
Get a span over a sub-range of data (if contiguous).
bool isContiguous() const
Check if data is stored contiguously in memory.
AnalogStorageType getStorageType() const
Get the storage type identifier.
bool isView() const
Check if this storage is a view (non-owning).
bool isLazy() const
Check if this storage is lazy-evaluated.
AnalogDataStorageCache tryGetCache() const
Try to get a cache for fast-path contiguous access.

Protected Functions inherited from AnalogDataStorageBase< VectorAnalogDataStorage >

Name
~AnalogDataStorageBase() =default

Detailed Description

class VectorAnalogDataStorage;

Contiguous vector-based analog data storage using CRTP.

High-performance implementation for in-memory contiguous data. Provides zero-overhead access when the concrete type is known at compile time and efficient span-based operations for contiguous data.

Public Functions Documentation

function VectorAnalogDataStorage

inline explicit VectorAnalogDataStorage(
    std::vector< float > data
)

Construct storage from a vector of float values.

Parameters:

  • data Vector of analog data values (moved into storage).

function ~VectorAnalogDataStorage

~VectorAnalogDataStorage() =default

function getValueAtImpl

inline float getValueAtImpl(
    std::size_t index
) const

function sizeImpl

inline std::size_t sizeImpl() const

function getSpanImpl

inline std::span< float const > getSpanImpl() const

function getSpanRangeImpl

inline std::span< float const > getSpanRangeImpl(
    std::size_t start,
    std::size_t end
) const

function isContiguousImpl

inline bool isContiguousImpl() const

function getStorageTypeImpl

inline AnalogStorageType getStorageTypeImpl() const

function tryGetCacheImpl

inline AnalogDataStorageCache tryGetCacheImpl() const

function getVector

inline std::vector< float > const & getVector() const

Get direct access to the underlying vector.

function data

inline float const * data() const

Get raw pointer to contiguous data.


Updated on 2026-11-13 at 20:25:39 +0000