Public Member Functions
InferenceEngine::VariableState Class Reference

C++ exception based error reporting wrapper of API class IVariableState. More...

#include <ie_memory_state.hpp>

Public Member Functions

 VariableState (IVariableState::Ptr pState, details::SharedObjectLoader::Ptr plg={})
 constructs VariableState from the initialized shared_pointer More...
 
void Reset ()
 Reset internal variable state for relevant infer request, to a value specified as default for according ReadValue node. More...
 
std::string GetName () const
 Gets name of current variable state, if length of array is not enough name is truncated by len, null terminator is inserted as well. As variable state name variable_id from according ReadValue used. More...
 
Blob::CPtr GetState () const
 Returns the value of the variable state. More...
 
Blob::CPtr GetLastState () const
 Returns the value of the variable state. More...
 
void SetState (Blob::Ptr state)
 Sets the new state for the next inference. More...
 

Detailed Description

C++ exception based error reporting wrapper of API class IVariableState.

Constructor & Destructor Documentation

◆ VariableState()

InferenceEngine::VariableState::VariableState ( IVariableState::Ptr  pState,
details::SharedObjectLoader::Ptr  plg = {} 
)
inlineexplicit

constructs VariableState from the initialized shared_pointer

Parameters
pStateInitialized shared pointer
plgOptional: Plugin to use. This is required to ensure that VariableState can work properly even if plugin object is destroyed.

Member Function Documentation

◆ GetLastState()

Blob::CPtr InferenceEngine::VariableState::GetLastState ( ) const
inline

Returns the value of the variable state.

Deprecated:
Use IVariableState::SetState instead

Wraps IVariableState::GetLastState

Returns
A blob representing a last state

◆ GetName()

std::string InferenceEngine::VariableState::GetName ( ) const
inline

Gets name of current variable state, if length of array is not enough name is truncated by len, null terminator is inserted as well. As variable state name variable_id from according ReadValue used.

Wraps IVariableState::GetName

Returns
A string representing a state name

◆ GetState()

Blob::CPtr InferenceEngine::VariableState::GetState ( ) const
inline

Returns the value of the variable state.

Wraps IVariableState::GetState

Returns
A blob representing a state

◆ Reset()

void InferenceEngine::VariableState::Reset ( )
inline

Reset internal variable state for relevant infer request, to a value specified as default for according ReadValue node.

Wraps IVariableState::Reset

◆ SetState()

void InferenceEngine::VariableState::SetState ( Blob::Ptr  state)
inline

Sets the new state for the next inference.

Wraps IVariableState::SetState

Parameters
stateThe current state to set

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