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

Method add_node

arm_compute/graph/Graph.h:238–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236
237template <typename NT, typename... Ts>
238inline NodeID Graph::add_node(Ts &&...args)
239{
240 arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
241
242 // Create node
243 NodeID nid = _nodes.size();
244 auto node = std::make_unique<NT>(std::forward<Ts>(args)...);
245 node->set_graph(this);
246 node->set_id(nid);
247
248 // Keep track of input nodes
249 _tagged_nodes[node->type()].push_back(nid);
250
251 // Associate a new tensor with each output
252 for (auto &output : node->_outputs)
253 {
254 output = create_tensor();
255 }
256
257 // Propagate node shape if possible
258 node->forward_descriptors();
259
260 // Add node to the graph nodes
261 _nodes.push_back(std::move(node));
262
263 return nid;
264}
265} // namespace graph
266} // namespace arm_compute
267#endif // ACL_ARM_COMPUTE_GRAPH_GRAPH_H

Callers

nothing calls this directly

Calls 7

create_tensorFunction · 0.85
set_graphMethod · 0.80
set_idMethod · 0.80
push_backMethod · 0.80
sizeMethod · 0.45
typeMethod · 0.45
forward_descriptorsMethod · 0.45

Tested by

no test coverage detected