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

Method ParseCast

src/armnnDeserializer/Deserializer.cpp:1461–1480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1459}
1460
1461void IDeserializer::DeserializerImpl::ParseCast(GraphPtr graph, unsigned int layerIndex)
1462{
1463 CHECK_LAYERS(graph, 0, layerIndex);
1464 TensorRawPtrVector inputs = GetInputs(graph, layerIndex);
1465 CHECK_LOCATION();
1466 CHECK_VALID_SIZE(inputs.size(), 1);
1467
1468 TensorRawPtrVector outputs = GetOutputs(graph, layerIndex);
1469 CHECK_VALID_SIZE(outputs.size(), 1);
1470
1471 auto layerName = GetLayerName(graph, layerIndex);
1472
1473 IConnectableLayer* layer = m_Network->AddCastLayer(layerName.c_str());
1474
1475 armnn::TensorInfo outputTensorInfo = ToTensorInfo(outputs[0]);
1476 layer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo);
1477
1478 RegisterInputSlots(graph, layerIndex, layer);
1479 RegisterOutputSlots(graph, layerIndex, layer);
1480}
1481
1482void IDeserializer::DeserializerImpl::ParseConstant(GraphPtr graph, unsigned int layerIndex)
1483{

Callers

nothing calls this directly

Calls 7

AddCastLayerMethod · 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