Long-lived execution handle returned by Model::build(...). More...
Declaration
class simaai::neat::Model::Runner { ... }
#include <Model.h>
Friends Index
Public Constructors Index
| Runner ()=default |
|
Construct an empty Runner; assign from a built Runner before use. More...
|
|
| Runner (simaai::neat::Run run) |
|
Wrap a Run handle with no special tensor/ingress configuration. More...
|
|
| Runner (simaai::neat::Run run, const simaai::neat::InputOptions &tensor_input_opt) |
|
Wrap a Run handle that was built for tensor-mode input with the given InputOptions. More...
|
|
| Runner (simaai::neat::Run run, const simaai::neat::InputOptions &tensor_input_opt, std::vector< std::string > ingress_names) |
|
Wrap a Run handle with tensor input options and explicit ingress port names (multi-input models). More...
|
|
| Runner (simaai::neat::Run run, std::vector< std::string > ingress_names) |
|
Wrap a Run handle with explicit ingress port names (multi-input, non-tensor mode). More...
|
|
Public Operators Index
Public Member Functions Index
Private Member Attributes Index
Description
Long-lived execution handle returned by Model::build(...).
Wraps an underlying Run plus the bookkeeping needed to convert user-friendly input types (cv::Mat, TensorList, Sample) into the right Sample shape for the model's appsrc. Use the Runner for streaming workloads; use the convenience Model::run() overloads for one-shot inference.
neat::Model model("yolo.tar.gz");
auto runner = model.build();
while (have_input) {
runner.push(next_frame);
auto sample = runner.pull(/ * timeout_ms = * / 100);
if (!sample.empty()) handle(sample);
}
runner.close();
Definition at line 477 of file Model.h.
Friends
internal::ModelAccess
| friend struct internal::ModelAccess |
|
Definition at line 529 of file Model.h.
Public Constructors
Runner()
| simaai::neat::Model::Runner::Runner () |
|
default
|
Construct an empty Runner; assign from a built Runner before use.
Definition at line 480 of file Model.h.
Runner()
Wrap a Run handle with no special tensor/ingress configuration.
Definition at line 482 of file Model.h.
Runner()
Wrap a Run handle that was built for tensor-mode input with the given InputOptions.
Definition at line 484 of file Model.h.
Runner()
Wrap a Run handle with tensor input options and explicit ingress port names (multi-input models).
Definition at line 487 of file Model.h.
Runner()
| simaai::neat::Model::Runner::Runner (simaai::neat::Run run, std::vector< std::string > ingress_names) |
|
Wrap a Run handle with explicit ingress port names (multi-input, non-tensor mode).
Definition at line 490 of file Model.h.
Public Operators
operator bool()
| simaai::neat::Model::Runner::operator bool () |
|
explicit
noexcept
|
Returns true if the underlying Run is alive and ready to push/pull.
Definition at line 493 of file Model.h.
Public Member Functions
close()
| void simaai::neat::Model::Runner::close () |
|
Close input (sends EOS) and release the underlying Run.
Definition at line 524 of file Model.h.
close_input()
| void simaai::neat::Model::Runner::close_input () |
|
Send EOS into the input queue without releasing the Run (lets pull drain in flight).
Definition at line 526 of file Model.h.
pull()
| simaai::neat::Sample simaai::neat::Model::Runner::pull (int timeout_ms=-1) |
|
Pull the next produced output Sample list.
- Parameters
-
| timeout_ms | Maximum time to wait, in milliseconds; -1 means wait forever; 0 is non-blocking. |
- Returns
The next Sample. Empty if the timeout elapsed or the pipeline closed.
Definition at line 511 of file Model.h.
push()
Push a list of Tensor inputs (one per ingress port).
Definition at line 502 of file Model.h.
push()
Push a list of Sample inputs (full Samples carry per-buffer metadata).
Definition at line 504 of file Model.h.
run()
One-shot synchronous push+pull from Tensor inputs.
Definition at line 517 of file Model.h.
run()
| simaai::neat::Sample simaai::neat::Model::Runner::run (const simaai::neat::Sample & inputs, int timeout_ms=-1) |
|
One-shot synchronous push+pull from Sample inputs.
Definition at line 519 of file Model.h.
start_measurement()
Start observing caller-owned push/pull code without consuming outputs.
Definition at line 522 of file Model.h.
Private Member Attributes
ingress_names_
| std::vector<std::string> simaai::neat::Model::Runner::ingress_names_ |
|
Definition at line 532 of file Model.h.
run_
| simaai::neat::Run simaai::neat::Model::Runner::run_ {} |
|
Definition at line 530 of file Model.h.
tensor_input_opt_for_cv_
| std::optional<simaai::neat::InputOptions> simaai::neat::Model::Runner::tensor_input_opt_for_cv_ {} |
|
Definition at line 531 of file Model.h.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.