Skip to main content

Session Class

Build, validate, and run deterministic GStreamer pipelines. More...

Declaration

class simaai::neat::Session { ... }

Included Headers

#include <Session.h>

Public Member Typedefs Index

usingTensorCallback = std::function< bool(const simaai::neat::Tensor &)>

Public Constructors Index

Session (const SessionOptions &opt={})
Session (const Session &)=delete
Session (Session &&) noexcept

Public Destructor Index

~Session ()

Public Operators Index

Session &operator= (const Session &)=delete
Session &operator= (Session &&) noexcept

Public Member Functions Index

Session &add (std::shared_ptr< Node > node)
Session &add (const NodeGroup &group)
Session &add (NodeGroup &&group)
Session &custom (std::string fragment)
Session &custom (std::string fragment, InputRole role)
voidrun ()
Samplerun (const cv::Mat &input, const RunOptions &opt={})
Samplerun (const simaai::neat::Tensor &input, const RunOptions &opt={})
Runbuild (const cv::Mat &input, RunMode mode=RunMode::Async, const RunOptions &opt={})
Runbuild (const simaai::neat::Tensor &input, RunMode mode=RunMode::Async, const RunOptions &opt={})
Runbuild (const Sample &input, RunMode mode=RunMode::Async, const RunOptions &opt={})
SessionReportvalidate (const ValidateOptions &opt, const cv::Mat &input) const
RtspServerHandlerun_rtsp (const RtspServerOptions &opt)
SessionReportvalidate (const ValidateOptions &opt={}) const
Session &add_output_tensor (const OutputTensorOptions &opt={})
std::stringdescribe (const GraphPrinter::Options &opt={}) const
std::stringdescribe_backend (bool insert_boundaries=false) const
voidset_guard (std::shared_ptr< void > guard)
voidset_tensor_callback (TensorCallback cb)
voidsave (const std::string &path) const
Runbuild (const RunOptions &opt={})
const std::string &last_pipeline () const

Private Member Functions Index

voidbuild_cached_source ()

Private Member Attributes Index

std::vector< std::shared_ptr< Node > >nodes_
std::vector< GroupMeta >groups_
std::stringlast_pipeline_
std::shared_ptr< void >guard_
SessionOptionsopt_ {}
TensorCallbacktensor_cb_
std::stringlast_sima_manifest_json_
std::atomic< uint64_t >nodes_version_ {0}
std::unique_ptr< BuiltState >built_
std::unique_ptr< RunCache >run_cache_
uint64_tbuilt_version_ = 0

Public Static Functions Index

static Sessionload (const std::string &path)

Description

Build, validate, and run deterministic GStreamer pipelines.

Session assembles Nodes/NodeGroups into a reproducible pipeline string and returns Run handles for push/pull execution.

Definition at line 76 of file Session.h.

Public Member Typedefs

TensorCallback

using simaai::neat::Session::TensorCallback = std::function<bool(const simaai::neat::Tensor&)>

Definition at line 78 of file Session.h.

78 using TensorCallback = std::function<bool(const simaai::neat::Tensor&)>;

Public Constructors

Session()

simaai::neat::Session::Session (const SessionOptions & opt={})
explicit

Definition at line 80 of file Session.h.

Session()

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

Definition at line 82 of file Session.h.

Session()

simaai::neat::Session::Session (Session &&)
noexcept

Definition at line 84 of file Session.h.

Public Destructor

~Session()

simaai::neat::Session::~Session ()

Definition at line 81 of file Session.h.

Public Operators

operator=()

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

Definition at line 83 of file Session.h.

operator=()

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

Definition at line 85 of file Session.h.

Public Member Functions

add()

Session& simaai::neat::Session::add (std::shared_ptr< Node > node)

Definition at line 88 of file Session.h.

add()

Session& simaai::neat::Session::add (const NodeGroup & group)

Definition at line 89 of file Session.h.

add()

Session& simaai::neat::Session::add (NodeGroup && group)

Definition at line 90 of file Session.h.

add_output_tensor()

Session& simaai::neat::Session::add_output_tensor (const OutputTensorOptions & opt={})

Definition at line 113 of file Session.h.

build()

Run simaai::neat::Session::build (const cv::Mat & input, RunMode mode=RunMode::Async, const RunOptions & opt={})

Definition at line 100 of file Session.h.

build()

Run simaai::neat::Session::build (const simaai::neat::Tensor & input, RunMode mode=RunMode::Async, const RunOptions & opt={})

Definition at line 101 of file Session.h.

build()

Run simaai::neat::Session::build (const Sample & input, RunMode mode=RunMode::Async, const RunOptions & opt={})

Definition at line 103 of file Session.h.

build()

Run simaai::neat::Session::build (const RunOptions & opt={})

Definition at line 131 of file Session.h.

custom()

Session& simaai::neat::Session::custom (std::string fragment)

Definition at line 93 of file Session.h.

custom()

Session& simaai::neat::Session::custom (std::string fragment, InputRole role)

Definition at line 94 of file Session.h.

describe()

std::string simaai::neat::Session::describe (const GraphPrinter::Options & opt={})

Definition at line 116 of file Session.h.

describe_backend()

std::string simaai::neat::Session::describe_backend (bool insert_boundaries=false)

Definition at line 117 of file Session.h.

last_pipeline()

const std::string& simaai::neat::Session::last_pipeline ()
inline

Definition at line 133 of file Session.h.

133 const std::string& last_pipeline() const {
134 return last_pipeline_;
135 }

run()

void simaai::neat::Session::run ()

Definition at line 97 of file Session.h.

run()

Sample simaai::neat::Session::run (const cv::Mat & input, const RunOptions & opt={})

Definition at line 98 of file Session.h.

run()

Sample simaai::neat::Session::run (const simaai::neat::Tensor & input, const RunOptions & opt={})

Definition at line 99 of file Session.h.

run_rtsp()

RtspServerHandle simaai::neat::Session::run_rtsp (const RtspServerOptions & opt)

Definition at line 107 of file Session.h.

save()

void simaai::neat::Session::save (const std::string & path)

Definition at line 126 of file Session.h.

set_guard()

void simaai::neat::Session::set_guard (std::shared_ptr< void > guard)

Definition at line 120 of file Session.h.

set_tensor_callback()

void simaai::neat::Session::set_tensor_callback (TensorCallback cb)

Definition at line 123 of file Session.h.

validate()

SessionReport simaai::neat::Session::validate (const ValidateOptions & opt, const cv::Mat & input)

Definition at line 104 of file Session.h.

validate()

SessionReport simaai::neat::Session::validate (const ValidateOptions & opt={})

Definition at line 110 of file Session.h.

Private Member Functions

build_cached_source()

void simaai::neat::Session::build_cached_source ()

Definition at line 163 of file Session.h.

Private Member Attributes

built_

std::unique_ptr<BuiltState> simaai::neat::Session::built_

Definition at line 159 of file Session.h.

159 std::unique_ptr<BuiltState> built_;

built_version_

uint64_t simaai::neat::Session::built_version_ = 0

Definition at line 161 of file Session.h.

161 uint64_t built_version_ = 0;

groups_

std::vector<GroupMeta> simaai::neat::Session::groups_

Definition at line 152 of file Session.h.

152 std::vector<GroupMeta> groups_;

guard_

std::shared_ptr<void> simaai::neat::Session::guard_

Definition at line 154 of file Session.h.

154 std::shared_ptr<void> guard_;

last_pipeline_

std::string simaai::neat::Session::last_pipeline_

Definition at line 153 of file Session.h.

153 std::string last_pipeline_;

last_sima_manifest_json_

std::string simaai::neat::Session::last_sima_manifest_json_

Definition at line 157 of file Session.h.

157 std::string last_sima_manifest_json_;

nodes_

std::vector<std::shared_ptr<Node> > simaai::neat::Session::nodes_

Definition at line 151 of file Session.h.

151 std::vector<std::shared_ptr<Node>> nodes_;

nodes_version_

std::atomic<uint64_t> simaai::neat::Session::nodes_version_ {0}

Definition at line 158 of file Session.h.

158 std::atomic<uint64_t> nodes_version_{0};

opt_

SessionOptions simaai::neat::Session::opt_ {}

Definition at line 155 of file Session.h.

155 SessionOptions opt_{};

run_cache_

std::unique_ptr<RunCache> simaai::neat::Session::run_cache_

Definition at line 160 of file Session.h.

160 std::unique_ptr<RunCache> run_cache_;

tensor_cb_

TensorCallback simaai::neat::Session::tensor_cb_

Definition at line 156 of file Session.h.

156 TensorCallback tensor_cb_;

Public Static Functions

load()

Session simaai::neat::Session::load (const std::string & path)
static

Definition at line 127 of file Session.h.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.