std::deque<Output> &getOutputs() { return _outputs; }
const std::deque<Output> &getOutputs() const { return _outputs; }
- Input *getInput(std::size_t index)
+ Output *getInput(std::size_t index)
{
assert(index < _inputs.size());
- return &_inputs[index];
+ return _inputs[index].getProducer();
}
- const Input *getInput(std::size_t index) const
+ const Output *getInput(std::size_t index) const
{
assert(index < _inputs.size());
- return &_inputs[index];
+ return _inputs[index].getProducer();
}
+ // TODO Remove after replacing uses with `getInput`.
Output *getInputProducer(std::size_t index)
{
assert(index < _inputs.size());
return _inputs[index].getProducer();
}
+ // TODO Remove after replacing uses with `getInput`.
const Output *getInputProducer(std::size_t index) const
{
assert(index < _inputs.size());
return &_outputs[index];
}
- const Shape &getInputShape(std::size_t index) const
- {
- return getInputProducer(index)->getShape();
- }
+ const Shape &getInputShape(std::size_t index) const { return getInput(index)->getShape(); }
const Shape &getOutputShape(std::size_t index) const { return getOutput(index)->getShape(); }
auto op2 = new ops::ReshapeOp(op1->getOutput(0), Shape{});
op2->setId(1);
- ASSERT_EQ(op1, op2->getInputProducer(0)->getNode());
+ ASSERT_EQ(op1, op2->getInput(0)->getNode());
delete op1;
delete op2;