| 100 | Interpreter::~Interpreter() = default; |
| 101 | |
| 102 | void Interpreter::writeInputTensor(const luci::CircleInput *input_node, const void *data, |
| 103 | size_t data_size) |
| 104 | { |
| 105 | Tensor *tensor = _runtime_module->getInputTensors()[input_node->index()]; |
| 106 | if (tensor == nullptr) |
| 107 | { |
| 108 | const std::string &name = input_node->name(); |
| 109 | throw std::runtime_error("Cannot find tensor for input node named \"" + name + "\"."); |
| 110 | } |
| 111 | if (data != nullptr) |
| 112 | tensor->writeData(data, data_size); |
| 113 | } |
| 114 | |
| 115 | void Interpreter::readOutputTensor(const luci::CircleOutput *output_node, void *data, |
| 116 | size_t data_size) |