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

Method create_layer

arm_compute/graph/frontend/Layers.h:1397–1423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1395 _sub_streams.push_back(std::make_unique<SubStream>(std::move(sub_stream)));
1396 }
1397 NodeID create_layer(IStream &s) override
1398 {
1399 NodeID nid = EmptyNodeID;
1400 NodeParams common_params = {name(), s.hints().target_hint};
1401 if (_sub_streams.size() == 1 && _sub_streams.at(0) != nullptr)
1402 {
1403 nid = _sub_streams[0]->tail_node();
1404 }
1405 else
1406 {
1407 // Collect tail nodes and stack
1408 std::vector<NodeIdxPair> nodes;
1409 for (auto &ss : _sub_streams)
1410 {
1411 if (ss && (ss->tail_node() != EmptyNodeID))
1412 {
1413 const auto tail_node = s.graph().node(ss->tail_node());
1414 if (tail_node != nullptr && tail_node->type() != NodeType::Output)
1415 {
1416 nodes.push_back({ss->tail_node(), 0});
1417 }
1418 }
1419 }
1420 nid = GraphBuilder::add_stack_node(s.graph(), common_params, nodes, _axis);
1421 }
1422 return nid;
1423 }
1424
1425private:
1426 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