From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/_graph_utils_8hpp.xhtml | 327 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 327 insertions(+) create mode 100644 20.02/_graph_utils_8hpp.xhtml (limited to '20.02/_graph_utils_8hpp.xhtml') diff --git a/20.02/_graph_utils_8hpp.xhtml b/20.02/_graph_utils_8hpp.xhtml new file mode 100644 index 0000000000..623e4c535f --- /dev/null +++ b/20.02/_graph_utils_8hpp.xhtml @@ -0,0 +1,327 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/GraphUtils.hpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
GraphUtils.hpp File Reference
+
+
+
#include <Graph.hpp>
+#include <string>
+
+

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)
 
+

Function Documentation

+ +

◆ CheckNumberOfInputSlot()

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

Definition at line 32 of file GraphUtils.cpp.

+ +

References Layer::GetNumInputSlots().

+ +

Referenced by BOOST_FIXTURE_TEST_CASE().

+
33 {
34  return layer->GetNumInputSlots() == num;
35 }
unsigned int GetNumInputSlots() const override
Returns the number of connectable input slots.
Definition: Layer.hpp:307
+
+
+
+ +

◆ CheckNumberOfOutputSlot()

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

Definition at line 37 of file GraphUtils.cpp.

+ +

References Layer::GetNumOutputSlots().

+ +

Referenced by BOOST_FIXTURE_TEST_CASE().

+
38 {
39  return layer->GetNumOutputSlots() == num;
40 }
unsigned int GetNumOutputSlots() const override
Returns the number of connectable output slots.
Definition: Layer.hpp:308
+
+
+
+ +

◆ GetFirstLayerWithName()

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

Definition at line 20 of file GraphUtils.cpp.

+ +

Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().

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

◆ GraphHasNamedLayer()

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

Definition at line 8 of file GraphUtils.cpp.

+ +

Referenced by BOOST_AUTO_TEST_CASE().

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

◆ IsConnected()

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

Definition at line 42 of file GraphUtils.cpp.

+ +

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

+ +

Referenced by BOOST_FIXTURE_TEST_CASE().

+
45 {
46  const armnn::IOutputSlot& outputSlot = srcLayer->GetOutputSlot(srcSlot);
47  const armnn::TensorInfo& tensorInfo = outputSlot.GetTensorInfo();
48  if (expectedTensorInfo != tensorInfo)
49  {
50  return false;
51  }
52  const unsigned int numConnections = outputSlot.GetNumConnections();
53  for (unsigned int c = 0; c < numConnections; ++c)
54  {
55  auto inputSlot = boost::polymorphic_downcast<const armnn::InputSlot*>(outputSlot.GetConnection(c));
56  if (inputSlot->GetOwningLayer().GetNameStr() == destLayer->GetNameStr() &&
57  inputSlot->GetSlotIndex() == destSlot)
58  {
59  return true;
60  }
61  }
62  return false;
63 }
+
virtual const IInputSlot * GetConnection(unsigned int index) const =0
+
An output connection slot for a layer.
Definition: INetwork.hpp:37
+
const std::string & GetNameStr() const
Definition: Layer.hpp:216
+
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
Definition: Layer.hpp:312
+
virtual const TensorInfo & GetTensorInfo() const =0
+
virtual unsigned int GetNumConnections() const =0
+
+
+
+
+
+ + + + -- cgit v1.2.1