MCPcopy Create free account
hub / github.com/ARM-software/armnn / ForEachLayerInput

Function ForEachLayerInput

src/armnn/SubgraphViewSelector.cpp:277–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276template<typename Delegate>
277void ForEachLayerInput(LayerSelectionInfo::LayerInfoContainer& layerInfos,
278 LayerSelectionInfo& layerInfo,
279 Delegate function)
280{
281 Layer& layer = *PolymorphicDowncast<Layer*>(layerInfo.m_Layer);
282
283 for (auto inputSlot : layer.GetInputSlots())
284 {
285 auto connectedInput = PolymorphicDowncast<OutputSlot*>(inputSlot.GetConnection());
286 if (!connectedInput)
287 {
288 throw armnn::Exception("Dangling input slot detected.");
289 }
290 Layer& inputLayer = connectedInput->GetOwningLayer();
291
292 auto parentInfo = layerInfos.find(&inputLayer);
293 if (parentInfo != layerInfos.end())
294 {
295 function(parentInfo->second);
296 }
297 }
298}
299
300template<typename Delegate>
301void ForEachLayerOutput(LayerSelectionInfo::LayerInfoContainer& layerInfos,

Callers 2

AssignSplitIdFunction · 0.85

Calls 3

GetConnectionMethod · 0.60
ExceptionClass · 0.50
endMethod · 0.45

Tested by

no test coverage detected