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_layer_visitor_8cpp_source.xhtml | 130 ++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 20.02/_test_layer_visitor_8cpp_source.xhtml (limited to '20.02/_test_layer_visitor_8cpp_source.xhtml') diff --git a/20.02/_test_layer_visitor_8cpp_source.xhtml b/20.02/_test_layer_visitor_8cpp_source.xhtml new file mode 100644 index 0000000000..0015eeff2e --- /dev/null +++ b/20.02/_test_layer_visitor_8cpp_source.xhtml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/TestLayerVisitor.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TestLayerVisitor.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include <boost/test/unit_test.hpp>
7 #include "TestLayerVisitor.hpp"
8 
9 namespace armnn
10 {
11 
12 void TestLayerVisitor::CheckLayerName(const char* name)
13 {
14  if (name == nullptr)
15  {
16  BOOST_CHECK(m_LayerName == nullptr);
17  }
18  else if (m_LayerName == nullptr)
19  {
20  BOOST_CHECK(name == nullptr);
21  }
22  else
23  {
24  BOOST_CHECK_EQUAL(m_LayerName, name);
25  }
26 }
27 
29 {
30  BOOST_CHECK(layer != nullptr);
31 }
32 
33 void TestLayerVisitor::CheckConstTensors(const ConstTensor& expected, const ConstTensor& actual)
34 {
35  BOOST_CHECK(expected.GetInfo() == actual.GetInfo());
36  BOOST_CHECK(expected.GetNumDimensions() == actual.GetNumDimensions());
37  BOOST_CHECK(expected.GetNumElements() == actual.GetNumElements());
38  BOOST_CHECK(expected.GetNumBytes() == actual.GetNumBytes());
39  if (expected.GetNumBytes() == actual.GetNumBytes())
40  {
41  //check data is the same byte by byte
42  const unsigned char* expectedPtr = static_cast<const unsigned char*>(expected.GetMemoryArea());
43  const unsigned char* actualPtr = static_cast<const unsigned char*>(actual.GetMemoryArea());
44  for (unsigned int i = 0; i < expected.GetNumBytes(); i++)
45  {
46  BOOST_CHECK(*(expectedPtr + i) == *(actualPtr + i));
47  }
48  }
49 }
50 
52  const Optional<ConstTensor>& actual)
53 {
54  BOOST_CHECK(expected.has_value() == actual.has_value());
55  if (expected.has_value() && actual.has_value())
56  {
57  CheckConstTensors(expected.value(), actual.value());
58  }
59 }
60 
61 } //namespace armnn
void CheckLayerName(const char *name)
+ +
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
+ +
void CheckLayerPointer(const IConnectableLayer *layer)
+
unsigned int GetNumElements() const
Definition: Tensor.hpp:175
+
MemoryType GetMemoryArea() const
Definition: Tensor.hpp:177
+
Copyright (c) 2020 ARM Limited.
+ +
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
+
void CheckConstTensors(const ConstTensor &expected, const ConstTensor &actual)
+
bool has_value() const noexcept
Definition: Optional.hpp:53
+
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
+
const TensorInfo & GetInfo() const
Definition: Tensor.hpp:167
+
unsigned int GetNumDimensions() const
Definition: Tensor.hpp:173
+
void CheckOptionalConstTensors(const Optional< ConstTensor > &expected, const Optional< ConstTensor > &actual)
+
unsigned int GetNumBytes() const
Definition: Tensor.hpp:174
+
+
+ + + + -- cgit v1.2.1