interface InferenceEngine::IVariableState

Overview

Manages data for reset operations. More…

#include <ie_imemory_state.hpp>

template IVariableState
{
    // typedefs

    typedef std::shared_ptr<IVariableState> Ptr;

    // methods

    virtual StatusCode GetName(char* name, size_t len, ResponseDesc* resp) const = 0;
    virtual StatusCode Reset(ResponseDesc* resp) = 0;
    virtual StatusCode SetState(Blob::Ptr newState, ResponseDesc* resp) = 0;
    virtual StatusCode GetLastState(Blob::CPtr& state, ResponseDesc* resp) const;
    virtual StatusCode GetState(Blob::CPtr& state, ResponseDesc* resp) const = 0;
};

Detailed Documentation

Manages data for reset operations.

Deprecated Use InferenceEngine::VariableState C++ wrapper instead

Typedefs

typedef std::shared_ptr<IVariableState> Ptr

A shared pointer to the IVariableState interface.

Methods

virtual StatusCode GetName(char* name, size_t len, ResponseDesc* resp) const = 0

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.

Parameters:

name

preallocated buffer for receiving name

len

Length of the buffer

resp

Optional: pointer to an already allocated object to contain information in case of failure

Returns:

Status code of the operation: InferenceEngine::OK (0) for success

virtual StatusCode Reset(ResponseDesc* resp) = 0

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

Parameters:

resp

Optional: pointer to an already allocated object to contain information in case of failure

Returns:

Status code of the operation: InferenceEngine::OK (0) for success*

virtual StatusCode SetState(Blob::Ptr newState, ResponseDesc* resp) = 0

Sets the new state for the next inference.

This method can fail if Blob size does not match the internal state size or precision

Parameters:

newState

The data to use as new state

resp

Optional: pointer to an already allocated object to contain information in case of failure

Returns:

Status code of the operation: InferenceEngine::OK (0) for success

virtual StatusCode GetLastState(Blob::CPtr& state, ResponseDesc* resp) const

Returns the value of the variable state.

Parameters:

state

A reference to a blob containing a variable state

resp

Optional: pointer to an already allocated object to contain information in case of failure

Returns:

Status code of the operation: InferenceEngine::OK (0) for success

virtual StatusCode GetState(Blob::CPtr& state, ResponseDesc* resp) const = 0

Returns the value of the variable state.

Parameters:

state

A reference to a blob containing a variable state

resp

Optional: pointer to an already allocated object to contain information in case of failure

Returns:

Status code of the operation: InferenceEngine::OK (0) for success