Skip to main content

JoinBundle Class

Stage executor that joins samples from multiple input ports into a single bundled output. More...

Declaration

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

Included Headers

#include <JoinBundle.h>

Base class

classStageExecutor

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

Public Constructors Index

JoinBundle (JoinBundleOptions opt)

Construct a JoinBundle 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

Buffer the incoming sample under its join key, emit a bundle if ready. More...

voidon_tick (std::int64_t now_ns, std::vector< StageOutMsg > &out) override

Periodic tick used to evict timed-out pending keys. More...

Private Member Functions Index

std::stringmake_key_ (const Sample &sample) const
voidtouch_key_ (const std::string &key)
voidevict_expired_ (std::int64_t now_ns)
voidevict_oldest_ ()
boolready_ (const Pending &pending) const
voiderase_key_ (const std::string &key)

Private Member Attributes Index

JoinBundleOptionsopt_
std::vector< std::string >input_names_
std::unordered_map< PortId, std::string >port_names_
std::unordered_map< std::string, PortId >name_to_port_
std::unordered_set< PortId >required_ports_
std::unordered_map< std::string, Pending >pending_
std::deque< std::string >order_
PortIdout_port_ = kInvalidPort

Description

Stage executor that joins samples from multiple input ports into a single bundled output.

Buffers samples per join key (selected by JoinKeyPolicy) and emits a bundle once the required inputs are present (or once emit_partial allows). Unmatched keys are evicted by capacity (max_pending_keys) or by timeout (timeout_ms).

See Also

JoinBundleNode

See Also

JoinKeyPolicy

See Also

StageExecutor

Definition at line 67 of file JoinBundle.h.

Public Constructors

JoinBundle()

simaai::neat::graph::nodes::JoinBundle::JoinBundle (JoinBundleOptions opt)
explicit

Construct a JoinBundle from the given options.

Definition at line 70 of file JoinBundle.h.

Public Member Functions

on_input()

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

Buffer the incoming sample under its join key, emit a bundle if ready.

Definition at line 75 of file JoinBundle.h.

on_tick()

void simaai::neat::graph::nodes::JoinBundle::on_tick (std::int64_t now_ns, std::vector< StageOutMsg > & out)
virtual

Periodic tick used to evict timed-out pending keys.

Definition at line 77 of file JoinBundle.h.

set_ports()

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

Bind the executor to its runtime ports.

Definition at line 73 of file JoinBundle.h.

Private Member Functions

erase_key_()

void simaai::neat::graph::nodes::JoinBundle::erase_key_ (const std::string & key)

Definition at line 92 of file JoinBundle.h.

evict_expired_()

void simaai::neat::graph::nodes::JoinBundle::evict_expired_ (std::int64_t now_ns)

Definition at line 89 of file JoinBundle.h.

evict_oldest_()

void simaai::neat::graph::nodes::JoinBundle::evict_oldest_ ()

Definition at line 90 of file JoinBundle.h.

make_key_()

std::string simaai::neat::graph::nodes::JoinBundle::make_key_ (const Sample & sample)

Definition at line 87 of file JoinBundle.h.

ready_()

bool simaai::neat::graph::nodes::JoinBundle::ready_ (const Pending & pending)

Definition at line 91 of file JoinBundle.h.

touch_key_()

void simaai::neat::graph::nodes::JoinBundle::touch_key_ (const std::string & key)

Definition at line 88 of file JoinBundle.h.

Private Member Attributes

input_names_

std::vector<std::string> simaai::neat::graph::nodes::JoinBundle::input_names_

Definition at line 95 of file JoinBundle.h.

95 std::vector<std::string> input_names_;

name_to_port_

std::unordered_map<std::string, PortId> simaai::neat::graph::nodes::JoinBundle::name_to_port_

Definition at line 97 of file JoinBundle.h.

97 std::unordered_map<std::string, PortId> name_to_port_;

opt_

JoinBundleOptions simaai::neat::graph::nodes::JoinBundle::opt_

Definition at line 94 of file JoinBundle.h.

order_

std::deque<std::string> simaai::neat::graph::nodes::JoinBundle::order_

Definition at line 100 of file JoinBundle.h.

100 std::deque<std::string> order_;

out_port_

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

Definition at line 101 of file JoinBundle.h.

101 PortId out_port_ = kInvalidPort;

pending_

std::unordered_map<std::string, Pending> simaai::neat::graph::nodes::JoinBundle::pending_

Definition at line 99 of file JoinBundle.h.

99 std::unordered_map<std::string, Pending> pending_;

port_names_

std::unordered_map<PortId, std::string> simaai::neat::graph::nodes::JoinBundle::port_names_

Definition at line 96 of file JoinBundle.h.

96 std::unordered_map<PortId, std::string> port_names_;

required_ports_

std::unordered_set<PortId> simaai::neat::graph::nodes::JoinBundle::required_ports_

Definition at line 98 of file JoinBundle.h.

98 std::unordered_set<PortId> required_ports_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.