Run Class
Live pipeline handle: push inputs in, pull outputs out. More...
Declaration
Included Headers
Friends Index
| class | MeasureScope |
| class | Graph |
Public Constructors Index
| Run ()=default | |
|
Construct an empty Run; assign from Graph::build() before use. More... | |
| Run (const Run &)=delete | |
|
Non-copyable. More... | |
| Run (Run &&) noexcept | |
|
Move-constructible. More... | |
Private Constructors Index
| Run (std::shared_ptr< runtime::RunCore > core) | |
Public Destructor Index
| ~Run () | |
|
Cleanly tears down the pipeline. More... | |
Public Operators Index
| Run & | operator= (const Run &)=delete |
|
Non-copyable. More... | |
| Run & | operator= (Run &&) noexcept |
|
Move-assignable. More... | |
| operator bool () const noexcept | |
|
Returns true if the Run is alive (constructed by Graph::build, not yet stopped). More... | |
Public Member Functions Index
| bool | can_push () const |
|
Returns true if the input side accepts pushes (not closed). More... | |
| bool | can_pull () const |
|
Returns true if the output side may produce more samples (pipeline not at EOS). More... | |
| bool | running () const |
|
Returns true if the pipeline is in PLAYING state. More... | |
| std::vector< std::string > | input_names () const |
|
Names accepted by push(name, ...) for graph-backed Runs. Empty for unnamed/linear Runs. More... | |
| std::vector< std::string > | output_names () const |
|
Names accepted by pull(name, ...) for graph-backed Runs. Empty for unnamed/linear Runs. More... | |
| bool | push (const std::vector< cv::Mat > &inputs) |
|
Push cv::Mat inputs into the pipeline. More... | |
| bool | push (std::string_view input_name, const std::vector< cv::Mat > &inputs) |
|
Push cv::Mat inputs into a named graph ingress. Use for multi-input graphs. More... | |
| bool | try_push (const std::vector< cv::Mat > &inputs) |
|
Non-blocking variant of push; returns false immediately if the queue is full. More... | |
| bool | try_push (std::string_view input_name, const std::vector< cv::Mat > &inputs) |
|
Non-blocking named-ingress variant. More... | |
| bool | push (const TensorList &inputs) |
| bool | push (std::string_view input_name, const TensorList &inputs) |
|
Push Tensor inputs into a named graph ingress. Use for multi-input graphs. More... | |
| bool | try_push (const TensorList &inputs) |
|
Non-blocking variant. More... | |
| bool | try_push (std::string_view input_name, const TensorList &inputs) |
|
Non-blocking named-ingress variant. More... | |
| bool | push (const Sample &msgs) |
|
Push full Sample inputs (carrying per-buffer metadata). More... | |
| bool | push (std::string_view input_name, const Sample &msgs) |
|
Push full Sample inputs into a named graph ingress. Use for multi-input graphs. More... | |
| bool | try_push (const Sample &msgs) |
|
Non-blocking variant. More... | |
| bool | try_push (std::string_view input_name, const Sample &msgs) |
|
Non-blocking named-ingress variant. More... | |
| bool | push_holder (const std::shared_ptr< void > &holder) |
|
Internal: pushes a GstBuffer held by a tensor ref to preserve plugin metadata. More... | |
| bool | try_push_holder (const std::shared_ptr< void > &holder) |
|
Non-blocking variant of push_holder. More... | |
| void | close_input () |
|
Send EOS into the pipeline. More... | |
| PullStatus | pull (int timeout_ms, Sample &out, PullError *err=nullptr) |
|
Pull the next output sample with a structured status return. More... | |
| PullStatus | pull (std::string_view output_name, int timeout_ms, Sample &out, PullError *err=nullptr) |
|
Pull from a named graph output with structured status. More... | |
| std::optional< Sample > | pull (int timeout_ms=-1) |
|
Convenience pull returning an optional Sample (empty on timeout/closed; throws on error). More... | |
| std::optional< Sample > | pull (std::string_view output_name, int timeout_ms=-1) |
|
Convenience named-output pull (empty on timeout/closed; throws on error). More... | |
| TensorList | pull_tensors (int timeout_ms=-1) |
|
Pull and unpack the next sample as a TensorList. More... | |
| TensorList | pull_tensors (std::string_view output_name, int timeout_ms=-1) |
|
Pull and unpack from a named graph output as a TensorList. More... | |
| Sample | pull_samples (int timeout_ms=-1) |
|
Pull the next sample as a Sample (preserves per-sample metadata). More... | |
| Sample | pull_samples (std::string_view output_name, int timeout_ms=-1) |
|
Pull samples from a named graph output (preserves per-sample metadata). More... | |
| TensorList | run (const std::vector< cv::Mat > &inputs, int timeout_ms=-1) |
|
One-shot synchronous push+pull from cv::Mat inputs. More... | |
| TensorList | run (const TensorList &inputs, int timeout_ms=-1) |
| Sample | run (const Sample &inputs, int timeout_ms=-1) |
| MeasureScope | start_measurement (const MeasureOptions &opt={}) |
|
Start observing a caller-owned push/pull interval without consuming outputs. More... | |
| int | warmup (const std::vector< cv::Mat > &inputs, int warm=-1, int timeout_ms=-1) |
|
Run warm warm-up inferences before measurement begins. More... | |
| RunStats | stats () const |
|
Returns end-to-end push/pull/latency stats. More... | |
| InputStreamStats | input_stats () const |
|
Returns input-side telemetry (push counts, drops, timing). More... | |
| RunDiagSnapshot | diag_snapshot () const |
|
Returns the full diagnostic snapshot (per-stage, per-element, per-pad). More... | |
| PowerSummary | power_summary () const |
|
Returns the optional SOM power telemetry summary for this Run. More... | |
| RunMeasurementSummary | measurement_summary () const |
|
Returns latency, throughput, input stats, and optional power telemetry in one call. More... | |
| RuntimeMetrics | metrics (const RuntimeMetricsOptions &opt={}) const |
|
Returns the preferred unified runtime metrics surface. More... | |
| std::string | metrics_report (const RuntimeMetricsOptions &opt={}, RuntimeMetricsFormat format=RuntimeMetricsFormat::Text) const |
|
Render unified runtime metrics in the requested format. More... | |
| std::string | metrics_report (RuntimeMetricsFormat format) const |
|
Convenience overload for selecting the output format with default options. More... | |
| std::string | report (const RunReportOptions &opt={}) const |
|
Returns a human-readable formatted report combining stats and diagnostics. More... | |
| std::string | last_error () const |
|
Returns the most recent runtime error string (empty if no error occurred). More... | |
| std::string | diagnostics_summary () const |
|
Returns a short diagnostics summary suitable for logging or error reports. More... | |
| void | stop () |
|
Stop the pipeline immediately (transitions to NULL). After stop, the Run is no longer running. More... | |
| void | close () |