class InferenceEngine::VariableState¶
Overview¶
C++ exception based error reporting wrapper of API class IVariableState. More…
#include <ie_memory_state.hpp>
class VariableState
{
public:
// construction
VariableState();
VariableState(
std::shared_ptr<IVariableState> pState,
std::shared_ptr<details::SharedObjectLoader> plg = {}
);
// methods
void Reset();
std::string GetName() const;
Blob::CPtr GetState() const;
Blob::CPtr GetLastState() const;
void SetState(Blob::Ptr state);
};
Detailed Documentation¶
C++ exception based error reporting wrapper of API class IVariableState.
Construction¶
VariableState()
Default constructor.
VariableState(
std::shared_ptr<IVariableState> pState,
std::shared_ptr<details::SharedObjectLoader> plg = {}
)
constructs VariableState from the initialized std::shared_ptr
Deprecated This ctor will be removed in 2022.1
Parameters:
pState |
Initialized shared pointer |
plg |
Optional: Plugin to use. This is required to ensure that VariableState can work properly even if plugin object is destroyed. |
Methods¶
void Reset()
Reset internal variable state for relevant infer request, to a value specified as default for according ReadValue node.
Wraps IVariableState::Reset
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.
Wraps IVariableState::GetName
Returns:
A string representing a state name
Blob::CPtr GetState() const
Returns the value of the variable state.
Wraps IVariableState::GetState
Returns:
A blob representing a state
Blob::CPtr GetLastState() const
Returns the value of the variable state.
Deprecated Use IVariableState::SetState instead
Wraps IVariableState::GetLastState
Returns:
A blob representing a last state
void SetState(Blob::Ptr state)
Sets the new state for the next inference.
Wraps IVariableState::SetState
Parameters:
state |
The current state to set |