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/_test_utils_8hpp_source.xhtml | 125 ++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 20.02/_test_utils_8hpp_source.xhtml (limited to '20.02/_test_utils_8hpp_source.xhtml') diff --git a/20.02/_test_utils_8hpp_source.xhtml b/20.02/_test_utils_8hpp_source.xhtml new file mode 100644 index 0000000000..b50f21ed31 --- /dev/null +++ b/20.02/_test_utils_8hpp_source.xhtml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/TestUtils.hpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TestUtils.hpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <armnn/INetwork.hpp>
9 #include <Graph.hpp>
10 
12  unsigned int fromIndex = 0, unsigned int toIndex = 0);
13 
14 template <typename LayerT>
15 bool IsLayerOfType(const armnn::Layer* const layer)
16 {
17  return (layer->GetType() == armnn::LayerEnumOf<LayerT>());
18 }
19 
21 {
22  return (first == last);
23 }
24 
25 /// Checks each unary function in Us evaluates true for each correspondent layer in the sequence [first, last).
26 template <typename U, typename... Us>
27 bool CheckSequence(const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last, U&& u, Us&&... us)
28 {
29  return u(*first) && CheckSequence(std::next(first), last, us...);
30 }
31 
32 template <typename LayerT>
33 bool CheckRelatedLayers(armnn::Graph& graph, const std::list<std::string>& testRelatedLayers)
34 {
35  for (auto& layer : graph)
36  {
37  if (layer->GetType() == armnn::LayerEnumOf<LayerT>())
38  {
39  auto& relatedLayers = layer->GetRelatedLayerNames();
40  if (!std::equal(relatedLayers.begin(), relatedLayers.end(), testRelatedLayers.begin(),
41  testRelatedLayers.end()))
42  {
43  return false;
44  }
45  }
46  }
47 
48  return true;
49 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
+ +
boost::transform_iterator< decltype(&PtrCast< const Layer >), Iterator > ConstIterator
Definition: Graph.hpp:53
+ + + +
void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex=0, unsigned int toIndex=0)
Definition: TestUtils.cpp:12
+
bool CheckSequence(const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last)
Definition: TestUtils.hpp:20
+
LayerType GetType() const
Definition: Layer.hpp:259
+
bool CheckRelatedLayers(armnn::Graph &graph, const std::list< std::string > &testRelatedLayers)
Definition: TestUtils.hpp:33
+
bool IsLayerOfType(const armnn::Layer *const layer)
Definition: TestUtils.hpp:15
+ +
+
+ + + + -- cgit v1.2.1