From 6f92c8e9f8bb38dcf5dccf8deeff5112ecd8e37c Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Wed, 22 Nov 2023 11:41:15 +0000 Subject: Update Doxygen for 23.11 Signed-off-by: Nikhil Raj Change-Id: I47cd933f5002cb94a73aa97689d7b3d9c93cb849 --- 23.11/_graph_utils_8cpp.html | 421 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 421 insertions(+) create mode 100644 23.11/_graph_utils_8cpp.html (limited to '23.11/_graph_utils_8cpp.html') diff --git a/23.11/_graph_utils_8cpp.html b/23.11/_graph_utils_8cpp.html new file mode 100644 index 0000000000..8a44854589 --- /dev/null +++ b/23.11/_graph_utils_8cpp.html @@ -0,0 +1,421 @@ + + + + + + + + +Arm NN: src/armnnTestUtils/GraphUtils.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  23.11 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
GraphUtils.cpp File Reference
+
+
+
+Include dependency graph for GraphUtils.cpp:
+
+
+
+
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + +

+Functions

bool GraphHasNamedLayer (const armnn::Graph &graph, const std::string &name)
 
armnn::LayerGetFirstLayerWithName (armnn::Graph &graph, const std::string &name)
 
bool CheckNumberOfInputSlot (armnn::Layer *layer, unsigned int num)
 
bool CheckNumberOfOutputSlot (armnn::Layer *layer, unsigned int num)
 
bool IsConnected (armnn::Layer *srcLayer, armnn::Layer *destLayer, unsigned int srcSlot, unsigned int destSlot, const armnn::TensorInfo &expectedTensorInfo)
 
bool CheckOrder (const armnn::Graph &graph, const armnn::Layer *first, const armnn::Layer *second)
 Checks that first comes before second in the order. More...
 
+

Function Documentation

+ +

◆ CheckNumberOfInputSlot()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool CheckNumberOfInputSlot (armnn::Layerlayer,
unsigned int num 
)
+
+ +

Definition at line 34 of file GraphUtils.cpp.

+
35 {
+
36  return layer->GetNumInputSlots() == num;
+
37 }
+
+

References Layer::GetNumInputSlots().

+ +
+
+ +

◆ CheckNumberOfOutputSlot()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool CheckNumberOfOutputSlot (armnn::Layerlayer,
unsigned int num 
)
+
+ +

Definition at line 39 of file GraphUtils.cpp.

+
40 {
+
41  return layer->GetNumOutputSlots() == num;
+
42 }
+
+

References Layer::GetNumOutputSlots().

+ +
+
+ +

◆ CheckOrder()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool CheckOrder (const armnn::Graphgraph,
const armnn::Layerfirst,
const armnn::Layersecond 
)
+
+ +

Checks that first comes before second in the order.

+ +

Definition at line 68 of file GraphUtils.cpp.

+
69 {
+
70  graph.Print();
+
71 
+
72  const auto& order = graph.TopologicalSort();
+
73 
+
74  auto firstPos = std::find(order.begin(), order.end(), first);
+
75  auto secondPos = std::find(firstPos, order.end(), second);
+
76 
+
77  return (secondPos != order.end());
+
78 }
+
+

References Graph::Print(), and Graph::TopologicalSort().

+ +
+
+ +

◆ GetFirstLayerWithName()

+ +
+
+ + + + + + + + + + + + + + + + + + +
armnn::Layer* GetFirstLayerWithName (armnn::Graphgraph,
const std::string & name 
)
+
+ +

Definition at line 22 of file GraphUtils.cpp.

+
23 {
+
24  for (auto&& layer : graph)
+
25  {
+
26  if (layer->GetNameStr() == name)
+
27  {
+
28  return layer;
+
29  }
+
30  }
+
31  return nullptr;
+
32 }
+
+
+
+ +

◆ GraphHasNamedLayer()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool GraphHasNamedLayer (const armnn::Graphgraph,
const std::string & name 
)
+
+ +

Definition at line 10 of file GraphUtils.cpp.

+
11 {
+
12  for (auto&& layer : graph)
+
13  {
+
14  if (layer->GetName() == name)
+
15  {
+
16  return true;
+
17  }
+
18  }
+
19  return false;
+
20 }
+
+
+
+ +

◆ IsConnected()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool IsConnected (armnn::LayersrcLayer,
armnn::LayerdestLayer,
unsigned int srcSlot,
unsigned int destSlot,
const armnn::TensorInfoexpectedTensorInfo 
)
+
+ +

Definition at line 44 of file GraphUtils.cpp.

+
47 {
+
48  const armnn::IOutputSlot& outputSlot = srcLayer->GetOutputSlot(srcSlot);
+
49  const armnn::TensorInfo& tensorInfo = outputSlot.GetTensorInfo();
+
50  if (expectedTensorInfo != tensorInfo)
+
51  {
+
52  return false;
+
53  }
+
54  const unsigned int numConnections = outputSlot.GetNumConnections();
+
55  for (unsigned int c = 0; c < numConnections; ++c)
+
56  {
+
57  auto inputSlot = armnn::PolymorphicDowncast<const armnn::InputSlot*>(outputSlot.GetConnection(c));
+
58  if (inputSlot->GetOwningLayer().GetNameStr() == destLayer->GetNameStr() &&
+
59  inputSlot->GetSlotIndex() == destSlot)
+
60  {
+
61  return true;
+
62  }
+
63  }
+
64  return false;
+
65 }
+
+

References IOutputSlot::GetConnection(), Layer::GetNameStr(), IOutputSlot::GetNumConnections(), Layer::GetOutputSlot(), and IOutputSlot::GetTensorInfo().

+ +
+
+
+
+ +
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
Definition: Layer.hpp:339
+
virtual const TensorInfo & GetTensorInfo() const =0
+
An output connection slot for a layer.
Definition: INetwork.hpp:53
+
virtual const IInputSlot * GetConnection(unsigned int index) const =0
+
Status Print(bool extended=false) const
Definition: Graph.cpp:68
+
unsigned int GetNumOutputSlots() const override
Returns the number of connectable output slots.
Definition: Layer.hpp:335
+
const std::string & GetNameStr() const
Definition: Layer.hpp:240
+
unsigned int GetNumInputSlots() const override
Returns the number of connectable input slots.
Definition: Layer.hpp:334
+
Graph & TopologicalSort()
Sorts layers in topological order and return this.
Definition: Graph.hpp:184
+
virtual unsigned int GetNumConnections() const =0
+ + + + -- cgit v1.2.1