Skip to main content

DigitalEventStorageCache

DigitalEventStorageCache

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

#include <DigitalEventStorageCache.hpp>

Public Functions

Name
bool isValid() const
Check if the cache is valid for fast-path access.
TimeFrameIndex getEvent(size_t idx) const
ClockTicks getRelativeEvent(size_t idx) const
EntityId getEntityId(size_t idx) const

Public Attributes

Name
DigitalEventTimeDomain time_domain
TimeFrameIndex const * events_ptr
ClockTicks const * relative_events_ptr
EntityId const * entity_ids_ptr
size_t cache_size
bool is_contiguous
True if storage is contiguous (owning).

Detailed Description

struct DigitalEventStorageCache;

Cache structure for fast-path access to contiguous digital event storage.

Note: Digital events are always sorted by time.

Digital events store TimeFrameIndex values (event times) with associated EntityIds. The storage is organized as parallel arrays:

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 polymorphic access)

function getEvent

inline TimeFrameIndex getEvent(
    size_t idx
) const

function getRelativeEvent

inline ClockTicks getRelativeEvent(
    size_t idx
) const

function getEntityId

inline EntityId getEntityId(
    size_t idx
) const

Public Attributes Documentation

variable time_domain

DigitalEventTimeDomain time_domain = DigitalEventTimeDomain::TimeFrameIndex;

variable events_ptr

TimeFrameIndex const  * events_ptr = nullptr;

variable relative_events_ptr

ClockTicks const  * relative_events_ptr = nullptr;

variable entity_ids_ptr

EntityId const  * entity_ids_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