19 #include "ngraph/op/sink.hpp"
20 #include "ngraph/op/util/variable.hpp"
29 NGRAPH_RTTI_DECLARATION;
38 virtual std::shared_ptr<ngraph::Variable>
get_variable()
const {
return m_variable; }
42 virtual void set_variable(
const std::shared_ptr<ngraph::Variable>& variable)
44 m_variable = variable;
56 std::shared_ptr<ngraph::Variable> m_variable;
65 NGRAPH_RTTI_DECLARATION;
78 m_variable_id = variable_id;
82 clone_with_new_inputs(
const OutputVector& new_args)
const override;
87 std::string m_variable_id;
96 NGRAPH_RTTI_DECLARATION;
109 std::shared_ptr<Node>
110 clone_with_new_inputs(
const OutputVector& new_args)
const override;
116 NGRAPH_CHECK(m_variable,
117 "Variable is not initialized. Variable_id is unavailable");
118 return m_variable->get_info().variable_id;
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:71
A handle for one of a node's outputs.
Definition: node_output.hpp:42
Definition: assign.hpp:27
AssignBase(const OutputVector &arguments)
Constructs an AssignBase operation.
Definition: assign.hpp:32
virtual std::shared_ptr< ngraph::Variable > get_variable() const
Returns variable connected to this node.
Definition: assign.hpp:38
virtual std::string get_variable_id() const =0
Returns the identifier of corresponding variable.
virtual void set_variable_id(const std::string &variable_id)
Sets the identifier of corresponding variable.
Definition: assign.hpp:50
virtual void set_variable(const std::shared_ptr< ngraph::Variable > &variable)
Sets a new variable to be connected to this node.
Definition: assign.hpp:42
Root of nodes that can be sink nodes.
Definition: sink.hpp:29
Assign operation sets an input value to the variable with variable_id
Definition: assign.hpp:63
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
void set_variable_id(const std::string &variable_id) override
Sets the identifier of corresponding variable.
Definition: assign.hpp:76
std::string get_variable_id() const override
Returns the identifier of corresponding variable.
Definition: assign.hpp:75
Assign(const Output< Node > &new_value, const std::string &variable_id)
Constructs an Assign operation.
Assign operation sets an input value to the variable with variable_id
Definition: assign.hpp:94
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
Assign(const Output< Node > &new_value, const std::shared_ptr< Variable > &variable)
Constructs an Assign operation.
std::string get_variable_id() const override
Returns the identifier of corresponding variable.
Definition: assign.hpp:114
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28