NNContext

Type Alias 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ยง

#[repr(C)]
pub struct NNContext { /* private fields */ }