24.02
|
Go to the documentation of this file.
12 for (
auto&& layer : graph)
14 if (layer->GetName() == name)
24 for (
auto&& layer : graph)
26 if (layer->GetNameStr() == name)
45 unsigned int srcSlot,
unsigned int destSlot,
50 if (expectedTensorInfo != tensorInfo)
55 for (
unsigned int c = 0; c < numConnections; ++c)
57 auto inputSlot = armnn::PolymorphicDowncast<const armnn::InputSlot*>(outputSlot.
GetConnection(c));
58 if (inputSlot->GetOwningLayer().GetNameStr() == destLayer->
GetNameStr() &&
59 inputSlot->GetSlotIndex() == destSlot)
74 auto firstPos = std::find(order.begin(), order.end(), first);
75 auto secondPos = std::find(firstPos, order.end(), second);
77 return (secondPos != order.end());
bool GraphHasNamedLayer(const armnn::Graph &graph, const std::string &name)
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
armnn::Layer * GetFirstLayerWithName(armnn::Graph &graph, const std::string &name)
bool CheckNumberOfOutputSlot(armnn::Layer *layer, unsigned int num)
virtual const TensorInfo & GetTensorInfo() const =0
bool CheckNumberOfInputSlot(armnn::Layer *layer, unsigned int num)
An output connection slot for a layer.
virtual const IInputSlot * GetConnection(unsigned int index) const =0
bool IsConnected(armnn::Layer *srcLayer, armnn::Layer *destLayer, unsigned int srcSlot, unsigned int destSlot, const armnn::TensorInfo &expectedTensorInfo)
Status Print(bool extended=false) const
unsigned int GetNumOutputSlots() const override
Returns the number of connectable output slots.
const std::string & GetNameStr() const
unsigned int GetNumInputSlots() const override
Returns the number of connectable input slots.
Graph & TopologicalSort()
Sorts layers in topological order and return this.
virtual unsigned int GetNumConnections() const =0
bool CheckOrder(const armnn::Graph &graph, const armnn::Layer *first, const armnn::Layer *second)
Checks that first comes before second in the order.