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

Method ParseSwitch

src/armnnDeserializer/Deserializer.cpp:3683–3704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3681}
3682
3683void IDeserializer::DeserializerImpl::ParseSwitch(GraphPtr graph, unsigned int layerIndex)
3684{
3685 CHECK_LAYERS(graph, 0, layerIndex);
3686 auto inputs = GetInputs(graph, layerIndex);
3687 CHECK_LOCATION();
3688 CHECK_VALID_SIZE(inputs.size(), 2);
3689
3690 auto outputs = GetOutputs(graph, layerIndex);
3691 CHECK_VALID_SIZE(outputs.size(), 2);
3692
3693 auto layerName = GetLayerName(graph, layerIndex);
3694 IConnectableLayer* layer = m_Network->AddSwitchLayer(layerName.c_str());
3695
3696 armnn::TensorInfo output0TensorInfo = ToTensorInfo(outputs[0]);
3697 layer->GetOutputSlot(0).SetTensorInfo(output0TensorInfo);
3698
3699 armnn::TensorInfo output1TensorInfo = ToTensorInfo(outputs[1]);
3700 layer->GetOutputSlot(1).SetTensorInfo(output1TensorInfo);
3701
3702 RegisterInputSlots(graph, layerIndex, layer);
3703 RegisterOutputSlots(graph, layerIndex, layer);
3704}
3705
3706void IDeserializer::DeserializerImpl::ParseTile(GraphPtr graph, unsigned int layerIndex)
3707{

Callers

nothing calls this directly

Calls 7

AddSwitchLayerMethod · 0.80
GetOutputSlotMethod · 0.80
ToTensorInfoFunction · 0.70
GetLayerNameFunction · 0.50
sizeMethod · 0.45
c_strMethod · 0.45
SetTensorInfoMethod · 0.45

Tested by

no test coverage detected