Type Alias deepviewrt_sys::NNContext

source ·
pub type NNContext = nn_context;
Expand description

@struct NNContext

DeepViewRT models can be loaded with an NNContext and numerous contexts can be loaded at once. The context manages the runtime portion of the model including the tensors required to hold intermediate buffers.

A context itself requires @ref NN_CONTEXT_SIZEOF bytes though it will also allocate on the heap additional tensor handles required to support models on @ref nn_context_model_load() and these will then be released on a call to @ref nn_context_model_unload().

When a context is created an @ref NNEngine plugin may optionally be provided which will take over the management of tensors through the engine plugin and attempting to run models and operators on the compute device enabled by this engine plugin. If an engine is not provided DeepViewRT will use the default implementation which is optimized for CPU and MCU devices.

Aliased Type§

struct NNContext { /* private fields */ }

Trait Implementations§

source§

impl Clone for nn_context

source§

fn clone(&self) -> nn_context

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for nn_context

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for nn_context