ArmNN  NotReleased
NeonTimer.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 "Instrument.hpp"
9 
10 #include <arm_compute/runtime/IScheduler.h>
11 #include <arm_compute/runtime/Scheduler.h>
12 #include <arm_compute/core/CPP/ICPPKernel.h>
13 
14 #include <chrono>
15 #include <map>
16 #include <list>
17 
18 namespace armnn
19 {
20 
21 class NeonTimer : public Instrument
22 {
23 public:
24  using KernelMeasurements = std::vector<Measurement>;
25 
26  NeonTimer() = default;
27  ~NeonTimer() = default;
28 
29  void Start() override;
30 
31  void Stop() override;
32 
33  std::vector<Measurement> GetMeasurements() const override;
34 
35  const char* GetName() const override;
36 
37 private:
38  KernelMeasurements m_Kernels;
39  arm_compute::IScheduler* m_RealScheduler;
40  arm_compute::Scheduler::Type m_RealSchedulerType;
41 };
42 
43 }
const char * GetName() const override
Definition: NeonTimer.cpp:58
NeonTimer()=default
void Start() override
Definition: NeonTimer.cpp:21
~NeonTimer()=default
std::vector< Measurement > KernelMeasurements
Definition: NeonTimer.hpp:24
void Stop() override
Definition: NeonTimer.cpp:37
std::vector< Measurement > GetMeasurements() const override
Definition: NeonTimer.cpp:45