class ov::op::util::VariableValue

Overview

VariableValue stores data and state (reset flag) for a Variable, and provides an interface for changing them. More…

#include <variable_value.hpp>

class VariableValue
{
public:
    // typedefs

    typedef std::shared_ptr<VariableValue> Ptr;

    // construction

    VariableValue();
    VariableValue(ngraph::HostTensorPtr value);
    VariableValue(ngraph::HostTensorPtr value, bool reset);

    // methods

    void set_reset(bool reset);
    bool get_reset() const;
    const ngraph::HostTensorPtr& get_value() const;
    void set_value(const ngraph::HostTensorPtr& value);
};

Detailed Documentation

VariableValue stores data and state (reset flag) for a Variable, and provides an interface for changing them.

Construction

VariableValue()

Constructs an uninitialized VariableValue.

VariableValue(ngraph::HostTensorPtr value)

Constructor for VariableValue.

Parameters:

value

The data for Variable.

VariableValue(ngraph::HostTensorPtr value, bool reset)

Constructor for VariableValue.

Parameters:

value

Data for Variable.

reset

The current state of the reset flag.

Methods

void set_reset(bool reset)

Sets the reset flag to a new state.

Parameters:

reset

The new state of the reset flag.

bool get_reset() const

Returns the current reset flag state.

const ngraph::HostTensorPtr& get_value() const

Returns the current stored data.

void set_value(const ngraph::HostTensorPtr& value)

Sets new values for Variable.

Parameters:

value

New data for Variable.