Introduce methods for replacing operands for `operation::Node`.
Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
Node::~Node() = default;
+void Node::replaceInput(const operand::Index &from, const operand::Index &to)
+{
+ _inputs.replace(from, to);
+}
+
+void Node::replaceOutput(const operand::Index &from, const operand::Index &to)
+{
+ _outputs.replace(from, to);
+}
+
void Node::lower_info(std::unique_ptr<LowerInfo> &&lower_info)
{
_lower_info = std::move(lower_info);
virtual std::string getName() const = 0;
public:
+ virtual void replaceInput(const operand::Index &from, const operand::Index &to);
+ virtual void replaceOutput(const operand::Index &from, const operand::Index &to);
virtual const operand::IndexSet &getInputs() const { return _inputs; }
virtual const operand::IndexSet &getOutputs() const { return _outputs; }
// It's for only input/output tensors but const data.