operand::Index Graph::addOperand(const ::internal::tflite::operand::Shape &shape)
{
+ assert(_phase == Phase::BUILDING);
return _operands.append(shape);
}
operation::Index Graph::addOperation(std::unique_ptr<operation::Node> &&node)
{
-
+ assert(_phase == Phase::BUILDING);
return _operations.append(std::move(node));
}
void Graph::setOperandValue(const operand::Index &ind,
std::unique_ptr<::internal::tflite::operand::Data> &&data)
{
+ assert(_phase == Phase::BUILDING);
assert(_operands.exist(ind));
_operands.at(ind).data(std::move(data));
}
-void Graph::addInput(const operand::Index &ind) { _inputs.append(ind); }
+void Graph::addInput(const operand::Index &ind)
+{
+ assert(_phase == Phase::BUILDING);
+ _inputs.append(ind);
+}
-void Graph::addOutput(const operand::Index &ind) { _outputs.append(ind); }
+void Graph::addOutput(const operand::Index &ind)
+{
+ assert(_phase == Phase::BUILDING);
+ _outputs.append(ind);
+}
void Graph::finishBuilding(void)
{