| 74 | } |
| 75 | |
| 76 | void INode::set_output_tensor(TensorID tid, size_t idx) |
| 77 | { |
| 78 | if (tid != NullTensorID && (idx < _outputs.size()) && (_graph->tensor(tid) != nullptr)) |
| 79 | { |
| 80 | ARM_COMPUTE_ERROR_ON(_graph == nullptr); |
| 81 | Tensor *updated_tensor = _graph->tensor(tid); |
| 82 | _outputs[idx] = tid; |
| 83 | |
| 84 | // Set tensor to all output edges of the node |
| 85 | for (auto &output_edge_id : _output_edges) |
| 86 | { |
| 87 | auto output_edge = _graph->edge(output_edge_id); |
| 88 | if (output_edge != nullptr) |
| 89 | { |
| 90 | // Unbind edge from current tensor |
| 91 | auto current_output_tensor = output_edge->tensor(); |
| 92 | current_output_tensor->unbind_edge(output_edge->id()); |
| 93 | |
| 94 | // Update tensor to edge and rebind tensor |
| 95 | output_edge->update_bound_tensor(updated_tensor); |
| 96 | updated_tensor->bind_edge(output_edge->id()); |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | NodeID INode::id() const |
| 103 | { |
no test coverage detected