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

Function GetConnection

src/armnn/test/SubgraphViewTests.cpp:2063–2083  ·  view source on GitHub ↗

Workaround function used to get the original OutputSlot connected to the InputSlot of a SubgraphView As working copy SubgraphViews do not have connections on boundary it finds the corresponding InputSlot on the Original SubgraphView and then returns the OutputSlot connected to it. Using this function to test against the simpler API: SubgraphView::GetOriginalInputSlots().

Source from the content-addressed store, hash-verified

2061// on the Original SubgraphView and then returns the OutputSlot connected to it.
2062// Using this function to test against the simpler API: SubgraphView::GetOriginalInputSlots().
2063const IOutputSlot* GetConnection(IInputSlot* inputSlot,
2064 const SubgraphView& workingCopy,
2065 const SubgraphView& original)
2066{
2067 const IOutputSlot* res = inputSlot->GetConnection();
2068 if (res)
2069 {
2070 return res;
2071 }
2072
2073 const SubgraphView::IInputSlots& workingCopyInputSlots = workingCopy.GetIInputSlots();
2074 const SubgraphView::IInputSlots& originalInputSlots = original.GetIInputSlots();
2075 for (SubgraphView::InputSlots::size_type i = 0; i < workingCopyInputSlots.size(); i++)
2076 {
2077 if (workingCopyInputSlots[i] == inputSlot)
2078 {
2079 return originalInputSlots[i]->GetConnection();
2080 }
2081 }
2082 return nullptr;
2083}
2084
2085// Workaround function used to get the original InputSlot connected to the OutputSlot of a SubgraphView
2086// As working copy SubgraphViews do not have connections on boundary it finds the corresponding OutputSlot

Callers 6

DisconnectAllMethod · 0.85
MoveAllConnectionsMethod · 0.85
operator==Method · 0.85
Layer.cppFile · 0.85
IsTensorInfoSetMethod · 0.85

Calls 3

GetNumConnectionsMethod · 0.80
GetConnectionMethod · 0.60
sizeMethod · 0.45

Tested by

no test coverage detected