MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / set_output_tensor

Method set_output_tensor

src/graph/INode.cpp:76–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void 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
102NodeID INode::id() const
103{

Callers 1

Calls 7

edgeMethod · 0.80
unbind_edgeMethod · 0.80
update_bound_tensorMethod · 0.80
bind_edgeMethod · 0.80
sizeMethod · 0.45
tensorMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected