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

Method create_layer

arm_compute/graph/frontend/Layers.h:343–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
342 }
343 NodeID create_layer(IStream &s) override
344 {
345 NodeID nid = EmptyNodeID;
346 NodeParams common_params = {name(), s.hints().target_hint};
347 if (_sub_streams.size() == 1 && _sub_streams.at(0) != nullptr)
348 {
349 nid = _sub_streams[0]->tail_node();
350 }
351 else
352 {
353 // Collect tail nodes and concatenate
354 std::vector<NodeIdxPair> nodes;
355 for (auto &ss : _sub_streams)
356 {
357 if (ss && (ss->tail_node() != EmptyNodeID))
358 {
359 const auto tail_node = s.graph().node(ss->tail_node());
360 if (tail_node != nullptr && tail_node->type() != NodeType::Output)
361 {
362 nodes.push_back({ss->tail_node(), 0});
363 }
364 }
365 }
366 nid = GraphBuilder::add_concatenate_node(s.graph(), common_params, nodes, _concat_descriptor);
367 }
368 return nid;
369 }
370
371private:
372 std::vector<std::unique_ptr<SubStream>> _sub_streams;

Callers

nothing calls this directly

Calls 6

tail_nodeMethod · 0.80
nodeMethod · 0.80
graphMethod · 0.80
push_backMethod · 0.80
sizeMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected