Skip to main content

StreamScheduler Class

Stage executor that round-robin-schedules samples across multiple streams. More...

Declaration​

class simaai::neat::graph::nodes::StreamScheduler { ... }

Included Headers​

#include <StreamScheduler.h>

Base class​

classStageExecutor

Actor-style executor base class — implement to add a new runtime-graph stage. More...

Public Constructors Index​

StreamScheduler (StreamSchedulerOptions opt)

Construct a StreamScheduler from the given options. More...

Public Member Functions Index​

voidset_ports (const StagePorts &ports) override

Bind the executor to its runtime ports. More...

voidon_input (StageMsg &&msg, std::vector< StageOutMsg > &out) override

Enqueue the incoming sample into its stream's queue and emit ready samples. More...

Private Member Functions Index​

voidensure_stream_ (const std::string &stream_id)
boolemit_one_ (std::vector< StageOutMsg > &out)

Private Member Attributes Index​

StreamSchedulerOptionsopt_
std::unordered_map< std::string, std::deque< Sample > >queues_
std::deque< std::string >rr_order_
std::unordered_set< std::string >active_
PortIdout_port_ = kInvalidPort

Description​

Stage executor that round-robin-schedules samples across multiple streams.

Maintains a per-stream queue and emits samples in a fair round-robin order across active streams, applying StreamDropPolicy when a stream's queue overflows.

See Also

StreamSchedulerNode

See Also

StreamDropPolicy

See Also

StageExecutor

Definition at line 62 of file StreamScheduler.h.

Public Constructors​

StreamScheduler()​

simaai::neat::graph::nodes::StreamScheduler::StreamScheduler (StreamSchedulerOptions opt)
explicit

Construct a StreamScheduler from the given options.

Definition at line 65 of file StreamScheduler.h.

Public Member Functions​

on_input()​

void simaai::neat::graph::nodes::StreamScheduler::on_input (StageMsg && msg, std::vector< StageOutMsg > & out)
virtual

Enqueue the incoming sample into its stream's queue and emit ready samples.

Definition at line 70 of file StreamScheduler.h.

set_ports()​

void simaai::neat::graph::nodes::StreamScheduler::set_ports (const StagePorts & ports)
virtual

Bind the executor to its runtime ports.

Definition at line 68 of file StreamScheduler.h.

Private Member Functions​

emit_one_()​

bool simaai::neat::graph::nodes::StreamScheduler::emit_one_ (std::vector< StageOutMsg > & out)

Definition at line 74 of file StreamScheduler.h.

ensure_stream_()​

void simaai::neat::graph::nodes::StreamScheduler::ensure_stream_ (const std::string & stream_id)

Definition at line 73 of file StreamScheduler.h.

Private Member Attributes​

active_​

std::unordered_set<std::string> simaai::neat::graph::nodes::StreamScheduler::active_

Definition at line 79 of file StreamScheduler.h.

79 std::unordered_set<std::string> active_;

opt_​

StreamSchedulerOptions simaai::neat::graph::nodes::StreamScheduler::opt_

Definition at line 76 of file StreamScheduler.h.

out_port_​

PortId simaai::neat::graph::nodes::StreamScheduler::out_port_ = kInvalidPort

Definition at line 80 of file StreamScheduler.h.

80 PortId out_port_ = kInvalidPort;

queues_​

std::unordered_map<std::string, std::deque<Sample> > simaai::neat::graph::nodes::StreamScheduler::queues_

Definition at line 77 of file StreamScheduler.h.

77 std::unordered_map<std::string, std::deque<Sample>> queues_;

rr_order_​

std::deque<std::string> simaai::neat::graph::nodes::StreamScheduler::rr_order_

Definition at line 78 of file StreamScheduler.h.

78 std::deque<std::string> rr_order_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.