From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_transform_iterator_test_8cpp_source.xhtml | 120 +++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 21.02/_transform_iterator_test_8cpp_source.xhtml (limited to '21.02/_transform_iterator_test_8cpp_source.xhtml') diff --git a/21.02/_transform_iterator_test_8cpp_source.xhtml b/21.02/_transform_iterator_test_8cpp_source.xhtml new file mode 100644 index 0000000000..4d73d95048 --- /dev/null +++ b/21.02/_transform_iterator_test_8cpp_source.xhtml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + +ArmNN: src/armnnUtils/test/TransformIteratorTest.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TransformIteratorTest.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include <boost/test/unit_test.hpp>
9 #include <iostream>
10 
11 using namespace armnn;
12 
13 BOOST_AUTO_TEST_SUITE(TransformIteratorSuite)
14 
15 namespace
16 {
17 
18 static int square(const int val)
19 {
20  return val * val;
21 }
22 
23 static std::string concat(const std::string val)
24 {
25  return val + "a";
26 }
27 
28 BOOST_AUTO_TEST_CASE(TransformIteratorTest)
29 {
30  struct WrapperTestClass
31  {
33  {
34  return { m_Vec.begin(), &square };
35  }
36 
38  {
39  return { m_Vec.end(), &square };
40  }
41 
42  const std::vector<int> m_Vec{1, 2, 3, 4, 5};
43  };
44 
45  struct WrapperStringClass
46  {
48  {
49  return { m_Vec.begin(), &concat };
50  }
51 
53  {
54  return { m_Vec.end(), &concat };
55  }
56 
57  const std::vector<std::string> m_Vec{"a", "b", "c"};
58  };
59 
60  WrapperStringClass wrapperStringClass;
61  WrapperTestClass wrapperTestClass;
62  int i = 1;
63 
64  for(auto val : wrapperStringClass)
65  {
66  BOOST_CHECK(val != "e");
67  i++;
68  }
69 
70  i = 1;
71  for(auto val : wrapperTestClass)
72  {
73  BOOST_CHECK(val == square(i));
74  i++;
75  }
76 
77  i = 1;
78  // Check original vector is unchanged
79  for(auto val : wrapperTestClass.m_Vec)
80  {
81  BOOST_CHECK(val == i);
82  i++;
83  }
84 
85  std::vector<int> originalVec{1, 2, 3, 4, 5};
86 
87  auto transformBegin = MakeTransformIterator(originalVec.begin(), &square);
88  auto transformEnd = MakeTransformIterator(originalVec.end(), &square);
89 
90  std::vector<int> transformedVec(transformBegin, transformEnd);
91 
92  i = 1;
93  for(auto val : transformedVec)
94  {
95  BOOST_CHECK(val == square(i));
96  i++;
97  }
98 }
99 
100 }
101 
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
+
constexpr TransformIterator< Function, Iterator > MakeTransformIterator(Iterator i, Function f)
+
Copyright (c) 2021 ARM Limited and Contributors.
+ +
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
+
BOOST_AUTO_TEST_SUITE_END()
+ +
+
+ + + + -- cgit v1.2.1