17#ifndef __ONERT_IR_GRAPH_H__
18#define __ONERT_IR_GRAPH_H__
21#include <unordered_map>
97 bool checkOperandsForOperation(
const IOperation &operation);
99 void initializeUseDef();
102 void sweepGarbageOperands();
126 std::unordered_map<std::string, IOIndex> _name_to_input;
127 std::unordered_map<std::string, IOIndex> _name_to_output;
Operations & operations()
IOIndex getInputIndex(const std::string &name) const override
std::vector< ir::OperationIndex > topolSortOperations() const
OperandIndex addOperand(const Shape &shape, const TypeInfo &type)
void removeOperand(const OperandIndex &ind)
OperationIndex addOperation(std::unique_ptr< IOperation > &&node)
void setOperandValue(const OperandIndex &ind, std::shared_ptr< Data > data)
void changeShape(const OperandIndex &ind, const ir::Shape &new_shape) override
void addOutput(const OperandIndex &ind, const std::string &name="")
IOIndex getOutputIndex(const std::string &name) const override
const Operands & operands() const override
OperandIndexSequence & getOutputs()
const OperandIndexSequence & getInputs() const override
OperationIndex replaceOperation(OperationIndex index, std::unique_ptr< IOperation > &&operation)
Replace an operation which the graph already has.
const Operations & operations() const override
OperandIndexSequence & getInputs()
void addInput(const OperandIndex &ind, const std::string &name="")
const OperandIndexSequence & getOutputs() const override
void remove(const Index &index)
Remove the object that is associated with the given index.