From fb14ebbd68e04876809145296af96f6f41857418 Mon Sep 17 00:00:00 2001 From: James Ward Date: Thu, 26 Nov 2020 11:08:12 +0000 Subject: IVGCVSW-5348 Update Doxygen Docu * Update Doxygen Documentation for 20.11 release Signed-off-by: James Ward Change-Id: Ib47edac7923a642a277b1169d1085e5622021dc0 --- 20.11/_test_utils_8hpp.xhtml | 347 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 347 insertions(+) create mode 100644 20.11/_test_utils_8hpp.xhtml (limited to '20.11/_test_utils_8hpp.xhtml') diff --git a/20.11/_test_utils_8hpp.xhtml b/20.11/_test_utils_8hpp.xhtml new file mode 100644 index 0000000000..be3c4f310b --- /dev/null +++ b/20.11/_test_utils_8hpp.xhtml @@ -0,0 +1,347 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/TestUtils.hpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.11 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TestUtils.hpp File Reference
+
+
+
#include <armnn/INetwork.hpp>
+#include <Graph.hpp>
+#include <Runtime.hpp>
+
+

Go to the source code of this file.

+ + + + + +

+Namespaces

 armnn
 Copyright (c) 2020 ARM Limited.
 
+ + + + + + + + + + + + + + + + + +

+Functions

void Connect (armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex=0, unsigned int toIndex=0)
 
template<typename LayerT >
bool IsLayerOfType (const armnn::Layer *const layer)
 
bool CheckSequence (const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last)
 
template<typename U , typename... Us>
bool CheckSequence (const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last, U &&u, Us &&... us)
 Checks each unary function in Us evaluates true for each correspondent layer in the sequence [first, last). More...
 
template<typename LayerT >
bool CheckRelatedLayers (armnn::Graph &graph, const std::list< std::string > &testRelatedLayers)
 
profiling::ProfilingServiceGetProfilingService (armnn::Runtime *runtime)
 
+

Function Documentation

+ +

◆ CheckRelatedLayers()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool CheckRelatedLayers (armnn::Graphgraph,
const std::list< std::string > & testRelatedLayers 
)
+
+ +

Definition at line 34 of file TestUtils.hpp.

+ +

References armnn::GetProfilingService().

+
35 {
36  for (auto& layer : graph)
37  {
38  if (layer->GetType() == armnn::LayerEnumOf<LayerT>())
39  {
40  auto& relatedLayers = layer->GetRelatedLayerNames();
41  if (!std::equal(relatedLayers.begin(), relatedLayers.end(), testRelatedLayers.begin(),
42  testRelatedLayers.end()))
43  {
44  return false;
45  }
46  }
47  }
48 
49  return true;
50 }
+
+
+ +

◆ CheckSequence() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
bool CheckSequence (const armnn::Graph::ConstIterator first,
const armnn::Graph::ConstIterator last 
)
+
+inline
+
+ +

Definition at line 21 of file TestUtils.hpp.

+ +

Referenced by AddBroadcastReshapeLayerOptimizerTest(), BOOST_AUTO_TEST_CASE(), and CheckSequence().

+
22 {
23  return (first == last);
24 }
+
+
+ +

◆ CheckSequence() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool CheckSequence (const armnn::Graph::ConstIterator first,
const armnn::Graph::ConstIterator last,
U && u,
Us &&... us 
)
+
+ +

Checks each unary function in Us evaluates true for each correspondent layer in the sequence [first, last).

+ +

Definition at line 28 of file TestUtils.hpp.

+ +

References CheckSequence().

+
29 {
30  return u(*first) && CheckSequence(std::next(first), last, us...);
31 }
bool CheckSequence(const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last)
Definition: TestUtils.hpp:21
+
+
+
+ +

◆ Connect()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Connect (armnn::IConnectableLayerfrom,
armnn::IConnectableLayerto,
const armnn::TensorInfotensorInfo,
unsigned int fromIndex = 0,
unsigned int toIndex = 0 
)
+
+ +

Definition at line 12 of file TestUtils.cpp.

+ +

References ARMNN_ASSERT, IOutputSlot::Connect(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

+ +

Referenced by BOOST_AUTO_TEST_CASE(), OutputSlot::Connect(), CreatePreluLayerHelper(), CreateStackLayerHelper(), OutputSlot::GetOutputHandler(), CaffeParserBase::ParseBatchNormLayer(), CaffeParserBase::ParseEltwiseLayer(), CaffeParserBase::ParseInnerProductLayer(), CaffeParserBase::ParseLRNLayer(), CaffeParserBase::ParsePoolingLayer(), CaffeParserBase::ParseReluLayer(), CaffeParserBase::ParseScaleLayer(), CaffeParserBase::ParseSoftmaxLayer(), and QLstmEndToEnd().

+
14 {
15  ARMNN_ASSERT(from);
16  ARMNN_ASSERT(to);
17 
18  from->GetOutputSlot(fromIndex).Connect(to->GetInputSlot(toIndex));
19  from->GetOutputSlot(fromIndex).SetTensorInfo(tensorInfo);
20 }
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
+
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
+
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
+
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
+
virtual int Connect(IInputSlot &destination)=0
+
+
+
+ +

◆ IsLayerOfType()

+ +
+
+ + + + + + + + +
bool IsLayerOfType (const armnn::Layer *const layer)
+
+ +

Definition at line 16 of file TestUtils.hpp.

+ +

References Layer::GetType().

+
17 {
18  return (layer->GetType() == armnn::LayerEnumOf<LayerT>());
19 }
LayerType GetType() const
Definition: Layer.hpp:262
+
+
+
+
+
+ + + + -- cgit v1.2.1