Skip to main content

YoloTokenStore Class

Per-stream queue of yolo (or other detection) tokens awaiting a matching frame. More...

Declaration

class simaai::neat::graph::strict_sync::YoloTokenStore { ... }

Included Headers

#include <StrictSync.h>

Public Constructors Index

YoloTokenStore (size_t streams)

Create a store sized for streams distinct stream slots. More...

Public Member Functions Index

voidenqueue (size_t idx, int64_t frame_id)

Enqueue a token for stream idx with the given frame_id. More...

std::optional< OrderedToken >take_ordered ()

Pop the oldest token across all streams in arrival order. More...

std::optional< Token >take (size_t idx)

Pop the oldest token from a specific stream. More...

Statsstats (size_t idx) const

Snapshot of the per-stream stats. More...

Private Member Attributes Index

std::mutexorder_mu_
std::deque< OrderedToken >order_q_
std::vector< State >states_

Private Static Functions Index

static int64_tnow_ms_i64 ()

Description

Per-stream queue of yolo (or other detection) tokens awaiting a matching frame.

Counterpart of PendingVideoStore: detection tokens land here and are paired with the corresponding video frame. Also exposes a global ordered queue (take_ordered) so a downstream consumer can drain tokens in arrival order across all streams.

See Also

PendingVideoStore

Definition at line 94 of file StrictSync.h.

Public Constructors

YoloTokenStore()

simaai::neat::graph::strict_sync::YoloTokenStore::YoloTokenStore (size_t streams)
explicit

Create a store sized for streams distinct stream slots.

Definition at line 119 of file StrictSync.h.

Public Member Functions

enqueue()

void simaai::neat::graph::strict_sync::YoloTokenStore::enqueue (size_t idx, int64_t frame_id)

Enqueue a token for stream idx with the given frame_id.

Definition at line 122 of file StrictSync.h.

stats()

Stats simaai::neat::graph::strict_sync::YoloTokenStore::stats (size_t idx)

Snapshot of the per-stream stats.

Definition at line 128 of file StrictSync.h.

take()

std::optional< Token > simaai::neat::graph::strict_sync::YoloTokenStore::take (size_t idx)

Pop the oldest token from a specific stream.

Definition at line 126 of file StrictSync.h.

take_ordered()

std::optional< OrderedToken > simaai::neat::graph::strict_sync::YoloTokenStore::take_ordered ()

Pop the oldest token across all streams in arrival order.

Definition at line 124 of file StrictSync.h.

Private Member Attributes

order_mu_

std::mutex simaai::neat::graph::strict_sync::YoloTokenStore::order_mu_
mutable

Definition at line 140 of file StrictSync.h.

140 mutable std::mutex order_mu_;

order_q_

std::deque<OrderedToken> simaai::neat::graph::strict_sync::YoloTokenStore::order_q_

Definition at line 141 of file StrictSync.h.

141 std::deque<OrderedToken> order_q_;

states_

std::vector<State> simaai::neat::graph::strict_sync::YoloTokenStore::states_

Definition at line 142 of file StrictSync.h.

142 std::vector<State> states_;

Private Static Functions

now_ms_i64()

int64_t simaai::neat::graph::strict_sync::YoloTokenStore::now_ms_i64 ()
static

Definition at line 138 of file StrictSync.h.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.