Skip to main content

Run Class

Runtime handle for pushing inputs and pulling outputs. More...

Declaration

class simaai::neat::Run { ... }

Included Headers

#include <Run.h>

Friends Index

classSession

Public Constructors Index

Run ()=default
Run (const Run &)=delete
Run (Run &&) noexcept

Private Constructors Index

Run (std::shared_ptr< State > state)

Public Destructor Index

~Run ()

Public Operators Index

Run &operator= (const Run &)=delete
Run &operator= (Run &&) noexcept
operator bool () const noexcept

Public Member Functions Index

boolcan_push () const
boolcan_pull () const
boolrunning () const
boolpush (const cv::Mat &input)
booltry_push (const cv::Mat &input)
boolpush (const simaai::neat::Tensor &input)
booltry_push (const simaai::neat::Tensor &input)
boolpush (const Sample &msg)
booltry_push (const Sample &msg)
boolpush_holder (const std::shared_ptr< void > &holder)
booltry_push_holder (const std::shared_ptr< void > &holder)
voidclose_input ()
PullStatuspull (int timeout_ms, Sample &out, PullError *err=nullptr)
std::optional< Sample >pull (int timeout_ms=-1)
std::optional< simaai::neat::Tensor >pull_tensor (int timeout_ms=-1)
simaai::neat::Tensorpull_tensor_or_throw (int timeout_ms=-1)
std::optional< simaai::neat::Tensor >pull_tensor_matching (const std::string &payload_tag, int timeout_ms=-1)
Samplepush_and_pull (const cv::Mat &input, int timeout_ms=-1)
Samplepush_and_pull (const simaai::neat::Tensor &input, int timeout_ms=-1)
Samplepush_and_pull_holder (const std::shared_ptr< void > &holder, int timeout_ms=-1)
Samplerun (const cv::Mat &input, int timeout_ms=-1)
Samplerun (const simaai::neat::Tensor &input, int timeout_ms=-1)
Samplerun (const Sample &input, int timeout_ms=-1)
intwarmup (const cv::Mat &input, int warm=-1, int timeout_ms=-1)
RunStatsstats () const
InputStreamStatsinput_stats () const
RunDiagSnapshotdiag_snapshot () const
std::stringreport (const RunReportOptions &opt={}) const
std::stringlast_error () const
std::stringdiagnostics_summary () const
voidstop ()
voidclose ()

Private Member Functions Index

boolpush_impl (const cv::Mat &input, bool block)
boolpush_impl (const simaai::neat::Tensor &input, bool block)
boolpush_holder_impl (const std::shared_ptr< void > &holder, bool block)
boolpush_message_impl (const Sample &msg, bool block)

Private Member Attributes Index

std::shared_ptr< State >state_
boolowns_ref_ = false

Private Static Functions Index

static Runcreate (InputStream stream, const RunOptions &opt, const struct InputStreamOptions &stream_opt)

Description

Runtime handle for pushing inputs and pulling outputs.

Definition at line 153 of file Run.h.

Friends

Session

friend class Session

Definition at line 214 of file Run.h.

214 friend class Session;

Public Constructors

Run()

simaai::neat::Run::Run ()
default

Definition at line 155 of file Run.h.

Run()

simaai::neat::Run::Run (const Run &)
delete

Definition at line 156 of file Run.h.

Run()

simaai::neat::Run::Run (Run &&)
noexcept

Definition at line 159 of file Run.h.

Private Constructors

Run()

simaai::neat::Run::Run (std::shared_ptr< State > state)
explicit

Definition at line 207 of file Run.h.

Public Destructor

~Run()

simaai::neat::Run::~Run ()

Definition at line 161 of file Run.h.

Public Operators

operator bool()

simaai::neat::Run::operator bool ()
explicit noexcept

Definition at line 163 of file Run.h.

operator=()

Run& simaai::neat::Run::operator= (const Run &)
delete

Definition at line 157 of file Run.h.

operator=()

Run& simaai::neat::Run::operator= (Run &&)
noexcept

Definition at line 160 of file Run.h.

Public Member Functions

can_pull()

bool simaai::neat::Run::can_pull ()

Definition at line 165 of file Run.h.

can_push()

bool simaai::neat::Run::can_push ()

Definition at line 164 of file Run.h.

close()

void simaai::neat::Run::close ()

Definition at line 200 of file Run.h.

close_input()

void simaai::neat::Run::close_input ()

Definition at line 177 of file Run.h.

diag_snapshot()

RunDiagSnapshot simaai::neat::Run::diag_snapshot ()

Definition at line 194 of file Run.h.

diagnostics_summary()

std::string simaai::neat::Run::diagnostics_summary ()

Definition at line 197 of file Run.h.

input_stats()

InputStreamStats simaai::neat::Run::input_stats ()

Definition at line 193 of file Run.h.

last_error()

std::string simaai::neat::Run::last_error ()

Definition at line 196 of file Run.h.

pull()

PullStatus simaai::neat::Run::pull (int timeout_ms, Sample & out, PullError * err=nullptr)

Definition at line 178 of file Run.h.

pull()

std::optional<Sample> simaai::neat::Run::pull (int timeout_ms=-1)

Definition at line 179 of file Run.h.

pull_tensor()

std::optional<simaai::neat::Tensor> simaai::neat::Run::pull_tensor (int timeout_ms=-1)

Definition at line 180 of file Run.h.

pull_tensor_matching()

std::optional<simaai::neat::Tensor> simaai::neat::Run::pull_tensor_matching (const std::string & payload_tag, int timeout_ms=-1)

Definition at line 182 of file Run.h.

pull_tensor_or_throw()

simaai::neat::Tensor simaai::neat::Run::pull_tensor_or_throw (int timeout_ms=-1)

Definition at line 181 of file Run.h.

push()

bool simaai::neat::Run::push (const cv::Mat & input)

Definition at line 168 of file Run.h.

push()

bool simaai::neat::Run::push (const simaai::neat::Tensor & input)

Definition at line 170 of file Run.h.

push()

bool simaai::neat::Run::push (const Sample & msg)

Definition at line 172 of file Run.h.

push_and_pull()

Sample simaai::neat::Run::push_and_pull (const cv::Mat & input, int timeout_ms=-1)

Definition at line 184 of file Run.h.

push_and_pull()

Sample simaai::neat::Run::push_and_pull (const simaai::neat::Tensor & input, int timeout_ms=-1)

Definition at line 185 of file Run.h.

push_and_pull_holder()

Sample simaai::neat::Run::push_and_pull_holder (const std::shared_ptr< void > & holder, int timeout_ms=-1)

Definition at line 186 of file Run.h.

push_holder()

bool simaai::neat::Run::push_holder (const std::shared_ptr< void > & holder)

Definition at line 175 of file Run.h.

report()

std::string simaai::neat::Run::report (const RunReportOptions & opt={})

Definition at line 195 of file Run.h.

run()

Sample simaai::neat::Run::run (const cv::Mat & input, int timeout_ms=-1)

Definition at line 187 of file Run.h.

run()

Sample simaai::neat::Run::run (const simaai::neat::Tensor & input, int timeout_ms=-1)

Definition at line 188 of file Run.h.

run()

Sample simaai::neat::Run::run (const Sample & input, int timeout_ms=-1)

Definition at line 189 of file Run.h.

running()

bool simaai::neat::Run::running ()

Definition at line 166 of file Run.h.

stats()

RunStats simaai::neat::Run::stats ()

Definition at line 192 of file Run.h.

stop()

void simaai::neat::Run::stop ()

Definition at line 199 of file Run.h.

try_push()

bool simaai::neat::Run::try_push (const cv::Mat & input)

Definition at line 169 of file Run.h.

try_push()

bool simaai::neat::Run::try_push (const simaai::neat::Tensor & input)

Definition at line 171 of file Run.h.

try_push()

bool simaai::neat::Run::try_push (const Sample & msg)

Definition at line 173 of file Run.h.

try_push_holder()

bool simaai::neat::Run::try_push_holder (const std::shared_ptr< void > & holder)

Definition at line 176 of file Run.h.

warmup()

int simaai::neat::Run::warmup (const cv::Mat & input, int warm=-1, int timeout_ms=-1)

Definition at line 190 of file Run.h.

Private Member Functions

push_holder_impl()

bool simaai::neat::Run::push_holder_impl (const std::shared_ptr< void > & holder, bool block)

Definition at line 210 of file Run.h.

push_impl()

bool simaai::neat::Run::push_impl (const cv::Mat & input, bool block)

Definition at line 208 of file Run.h.

push_impl()

bool simaai::neat::Run::push_impl (const simaai::neat::Tensor & input, bool block)

Definition at line 209 of file Run.h.

push_message_impl()

bool simaai::neat::Run::push_message_impl (const Sample & msg, bool block)

Definition at line 211 of file Run.h.

Private Member Attributes

owns_ref_

bool simaai::neat::Run::owns_ref_ = false

Definition at line 205 of file Run.h.

205 bool owns_ref_ = false;

state_

std::shared_ptr<State> simaai::neat::Run::state_

Definition at line 204 of file Run.h.

203 struct State;

Private Static Functions

create()

Run simaai::neat::Run::create (InputStream stream, const RunOptions & opt, const struct InputStreamOptions & stream_opt)
static

Definition at line 212 of file Run.h.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.