Skip to main content

RaggedAnalogStorageCache

RaggedAnalogStorageCache

Cache structure for fast-path access to contiguous analog storage. More…

#include <RaggedAnalogStorage.hpp>

Public Functions

Name
bool isValid() const
Check if the cache is valid for fast-path access.
TimeFrameIndex getTime(size_t idx) const
float getValue(size_t idx) const

Public Attributes

Name
TimeFrameIndex const * times_ptr
float const * values_ptr
size_t cache_size
bool is_contiguous
True if storage is contiguous (owning).

Detailed Description

struct RaggedAnalogStorageCache;

Cache structure for fast-path access to contiguous analog storage.

Note: This is simpler than RaggedStorageCache since we don’t need EntityId support.

Unlike RaggedTimeSeries which has EntityIds, RaggedAnalogTimeSeries only needs time and value pointers. The storage is organized as:

  • times[i] - TimeFrameIndex for entry i
  • values[i] - float value at entry i

Public Functions Documentation

function isValid

inline bool isValid() const

Check if the cache is valid for fast-path access.

Return:

  • true if storage is contiguous (can use direct pointer access)
  • false if storage is non-contiguous (must use virtual dispatch)

function getTime

inline TimeFrameIndex getTime(
    size_t idx
) const

function getValue

inline float getValue(
    size_t idx
) const

Public Attributes Documentation

variable times_ptr

TimeFrameIndex const  * times_ptr = nullptr;

variable values_ptr

float const  * values_ptr = nullptr;

variable cache_size

size_t cache_size = 0;

variable is_contiguous

bool is_contiguous = false;

True if storage is contiguous (owning).


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