Skip to main content

StageExecutor Class

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

Declaration

class simaai::neat::graph::StageExecutor { ... }

Included Headers

#include <StageExecutor.h>

Derived Classes

classFanOut

Stage executor that duplicates each incoming sample to multiple output ports. More...

classJoinBundle

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

classJoinEncodedWithMeta

Stage executor that bundles an encoded payload (e.g., H.264) with associated metadata. More...

classLambdaStage

Generic stage executor whose behavior is supplied by user-provided callbacks. More...

classStageModelExecutor

Stage executor that runs a Model's inference pipeline as a runtime-graph stage. More...

classStampFrameId

Stage executor that assigns a monotonically-increasing frame id per stream. More...

classStreamMetadata

Stage executor that fills in stream metadata defaults on passing samples. More...

classStreamScheduler

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

Public Destructor Index

~StageExecutor ()=default

Virtual destructor — required for the abstract base. More...

Public Member Functions Index

voidset_ports (const StagePorts &)

Provide resolved port ids for caching. Optional — default is a no-op. More...

voidset_emitter (StageEmitter *)

Provide the runtime output emitter. Optional — default is a no-op. More...

voidstart ()

Start any background work. Called once before the first on_input. More...

voidrequest_stop ()

Ask an active stage to cancel long-running work. Optional — default is a no-op. More...

voidstop ()

Tear down. Called once after the last on_input/on_tick. More...

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

Handle one input message. More...

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

Optional periodic tick for timeout-driven stages. More...

Description

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

Subclass this to define a stage's behavior. The runtime owns the lifetime, the threads, the queues, and the routing; the stage just transforms incoming StageMsgs into outgoing StageOutMsgs.

Lifecycle: set_ports()start() → repeated on_input() / on_tick()stop() → destruction.

Threading: the runtime guarantees serial invocation per stage instance — on_input and on_tick will not be called concurrently on the same stage. Stages may keep non-atomic per-instance state without locks.

Definition at line 119 of file StageExecutor.h.

Public Destructor

~StageExecutor()

virtual simaai::neat::graph::StageExecutor::~StageExecutor ()
virtual default

Virtual destructor — required for the abstract base.

Definition at line 122 of file StageExecutor.h.

Public Member Functions

on_input()

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

Handle one input message.

Append zero or more outputs to out.

Parameters
msg

Input arriving on msg.in_port.

out

Append outputs here; the runtime routes them on outgoing edges.

Definition at line 142 of file StageExecutor.h.

on_tick()

virtual void simaai::neat::graph::StageExecutor::on_tick (std::int64_t, std::vector< StageOutMsg > &)
inline virtual

Optional periodic tick for timeout-driven stages.

The first argument is a monotonic timestamp (ns); the second is the same output vector convention as on_input — append outputs to it, the runtime routes them.

Definition at line 150 of file StageExecutor.h.

150 virtual void on_tick(std::int64_t /*now_ns*/, std::vector<StageOutMsg>& /*out*/) {}

request_stop()

virtual void simaai::neat::graph::StageExecutor::request_stop ()
inline virtual

Ask an active stage to cancel long-running work. Optional — default is a no-op.

Definition at line 133 of file StageExecutor.h.

133 virtual void request_stop() {}

set_emitter()

virtual void simaai::neat::graph::StageExecutor::set_emitter (StageEmitter *)
inline virtual

Provide the runtime output emitter. Optional — default is a no-op.

Definition at line 128 of file StageExecutor.h.

128 virtual void set_emitter(StageEmitter* /*emitter*/) {}

set_ports()

virtual void simaai::neat::graph::StageExecutor::set_ports (const StagePorts &)
inline virtual

Provide resolved port ids for caching. Optional — default is a no-op.

Definition at line 125 of file StageExecutor.h.

125 virtual void set_ports(const StagePorts& /*ports*/) {}

start()

virtual void simaai::neat::graph::StageExecutor::start ()
inline virtual

Start any background work. Called once before the first on_input.

Definition at line 131 of file StageExecutor.h.

131 virtual void start() {}

stop()

virtual void simaai::neat::graph::StageExecutor::stop ()
inline virtual

Tear down. Called once after the last on_input/on_tick.

Definition at line 135 of file StageExecutor.h.

135 virtual void stop() {}

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.