From 0e2bab81442ee6cc2b94e4f7881ed0c5c6af65e7 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Thu, 19 Mar 2020 17:03:14 +0000 Subject: Creating gh-pages documentation for ArmNN Signed-off-by: Jim Flynn --- Documentation/_neon_timer_8cpp_source.xhtml | 120 ++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 Documentation/_neon_timer_8cpp_source.xhtml (limited to 'Documentation/_neon_timer_8cpp_source.xhtml') diff --git a/Documentation/_neon_timer_8cpp_source.xhtml b/Documentation/_neon_timer_8cpp_source.xhtml new file mode 100644 index 0000000000..30f3a017ab --- /dev/null +++ b/Documentation/_neon_timer_8cpp_source.xhtml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + +ArmNN: src/backends/neon/NeonTimer.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
NeonTimer.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 "NeonTimer.hpp"
8 
9 #include <memory>
10 
11 #include <boost/assert.hpp>
12 #include <boost/format.hpp>
13 
14 namespace armnn
15 {
16 namespace
17 {
18 static thread_local auto g_Interceptor = std::make_shared<NeonInterceptorScheduler>(arm_compute::Scheduler::get());
19 }
20 
22 {
23  m_Kernels.clear();
24  BOOST_ASSERT(g_Interceptor->GetKernels() == nullptr);
25  g_Interceptor->SetKernels(&m_Kernels);
26 
27  m_RealSchedulerType = arm_compute::Scheduler::get_type();
28  //Note: We can't currently replace a custom scheduler
29  if(m_RealSchedulerType != arm_compute::Scheduler::Type::CUSTOM)
30  {
31  // Keep the real schedule and add NeonInterceptorScheduler as an interceptor
32  m_RealScheduler = &arm_compute::Scheduler::get();
33  arm_compute::Scheduler::set(std::static_pointer_cast<arm_compute::IScheduler>(g_Interceptor));
34  }
35 }
36 
38 {
39  // Restore real scheduler
40  g_Interceptor->SetKernels(nullptr);
41  arm_compute::Scheduler::set(m_RealSchedulerType);
42  m_RealScheduler = nullptr;
43 }
44 
45 std::vector<Measurement> NeonTimer::GetMeasurements() const
46 {
47  std::vector<Measurement> measurements = m_Kernels;
48  unsigned int kernel_number = 0;
49  for (auto & kernel : measurements)
50  {
51  std::string kernelName = std::string(this->GetName()) + "/" + std::to_string(kernel_number++) + ": " + kernel
52  .m_Name;
53  kernel.m_Name = kernelName;
54  }
55  return measurements;
56 }
57 
58 const char* NeonTimer::GetName() const
59 {
60  return "NeonKernelTimer";
61 }
62 
63 }
+
std::vector< Measurement > GetMeasurements() const override
Definition: NeonTimer.cpp:45
+
void Start() override
Definition: NeonTimer.cpp:21
+
Copyright (c) 2020 ARM Limited.
+
void Stop() override
Definition: NeonTimer.cpp:37
+ +
const char * GetName() const override
Definition: NeonTimer.cpp:58
+
+
+ + + + -- cgit v1.2.1