From add078b7f9a658d52ee6e8fe6771ea0517c07674 Mon Sep 17 00:00:00 2001 From: mathad01 Date: Mon, 10 May 2021 16:51:20 +0100 Subject: IVGCVSW-5908 Update 21.05 Doxygen Documents Signed-off-by: mathad01 Change-Id: I95316d4fc5f9d10185492dc835bb2411c1daea7b --- 21.05/_instrument_tests_8cpp_source.xhtml | 124 ++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 21.05/_instrument_tests_8cpp_source.xhtml (limited to '21.05/_instrument_tests_8cpp_source.xhtml') diff --git a/21.05/_instrument_tests_8cpp_source.xhtml b/21.05/_instrument_tests_8cpp_source.xhtml new file mode 100644 index 0000000000..a13a971f37 --- /dev/null +++ b/21.05/_instrument_tests_8cpp_source.xhtml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/InstrumentTests.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.05 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
InstrumentTests.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #include <boost/test/unit_test.hpp>
6 
7 #include "WallClockTimer.hpp"
8 
9 #include <chrono>
10 #include <thread>
11 
12 using namespace armnn;
13 
14 BOOST_AUTO_TEST_SUITE(Instruments)
15 
16 BOOST_AUTO_TEST_CASE(WallClockTimerInMicroseconds)
17 {
18  WallClockTimer wallClockTimer;
19 
20  BOOST_CHECK_EQUAL(wallClockTimer.GetName(), "WallClockTimer");
21 
22  // start the timer
23  wallClockTimer.Start();
24 
25  // wait for 10 microseconds
26  std::this_thread::sleep_for(std::chrono::microseconds(10));
27 
28  // stop the timer
29  wallClockTimer.Stop();
30 
31  BOOST_CHECK_EQUAL(wallClockTimer.GetMeasurements().front().m_Name, WallClockTimer::WALL_CLOCK_TIME);
32 
33  // check that WallClockTimer measurement should be >= 10 microseconds
34  BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, std::chrono::microseconds(10).count());
35 }
36 
37 BOOST_AUTO_TEST_CASE(WallClockTimerInNanoseconds)
38 {
39  WallClockTimer wallClockTimer;
40 
41  BOOST_CHECK_EQUAL(wallClockTimer.GetName(), "WallClockTimer");
42 
43  // start the timer
44  wallClockTimer.Start();
45 
46  // wait for 500 nanoseconds - 0.5 microseconds
47  std::this_thread::sleep_for(std::chrono::nanoseconds(500));
48 
49  // stop the timer
50  wallClockTimer.Stop();
51 
52  BOOST_CHECK_EQUAL(wallClockTimer.GetMeasurements().front().m_Name, WallClockTimer::WALL_CLOCK_TIME);
53 
54  // delta is 0.5 microseconds
55  const auto delta =
56  std::chrono::duration_cast<std::chrono::duration<double, std::micro>>(std::chrono::nanoseconds(500));
57 
58  // check that WallClockTimer measurement should be >= 0.5 microseconds
59  BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, delta.count());
60 }
61 
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
+ + +
Copyright (c) 2021 ARM Limited and Contributors.
+
void Start() override
+
const char * GetName() const override
+
void Stop() override
+
static const std::string WALL_CLOCK_TIME
+
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
+
std::vector< Measurement > GetMeasurements() const override
+
BOOST_AUTO_TEST_SUITE_END()
+
+
+ + + + -- cgit v1.2.1