ArmNN
 21.02
SendCounterPacketTests.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <SendCounterPacket.hpp>
9 #include <SendThread.hpp>
10 #include <ProfilingUtils.hpp>
12 
13 #include <armnn/Exceptions.hpp>
14 #include <armnn/Optional.hpp>
15 #include <armnn/Conversion.hpp>
16 #include <armnn/utility/Assert.hpp>
19 
20 #include <atomic>
21 #include <condition_variable>
22 #include <mutex>
23 #include <thread>
24 
25 namespace armnn
26 {
27 
28 namespace profiling
29 {
30 
32 {
33 public:
35  : SendCounterPacket(buffer)
36  {}
37 
38  bool CreateDeviceRecordTest(const DevicePtr& device,
39  DeviceRecord& deviceRecord,
40  std::string& errorMessage)
41  {
42  return CreateDeviceRecord(device, deviceRecord, errorMessage);
43  }
44 
45  bool CreateCounterSetRecordTest(const CounterSetPtr& counterSet,
46  CounterSetRecord& counterSetRecord,
47  std::string& errorMessage)
48  {
49  return CreateCounterSetRecord(counterSet, counterSetRecord, errorMessage);
50  }
51 
52  bool CreateEventRecordTest(const CounterPtr& counter,
53  EventRecord& eventRecord,
54  std::string& errorMessage)
55  {
56  return CreateEventRecord(counter, eventRecord, errorMessage);
57  }
58 
59  bool CreateCategoryRecordTest(const CategoryPtr& category,
60  const Counters& counters,
61  CategoryRecord& categoryRecord,
62  std::string& errorMessage)
63  {
64  return CreateCategoryRecord(category, counters, categoryRecord, errorMessage);
65  }
66 };
67 
68 } // namespace profiling
69 
70 } // namespace armnn
bool CreateCounterSetRecordTest(const CounterSetPtr &counterSet, CounterSetRecord &counterSetRecord, std::string &errorMessage)
std::vector< uint32_t > CounterSetRecord
bool CreateDeviceRecord(const DevicePtr &device, DeviceRecord &deviceRecord, std::string &errorMessage)
std::unordered_map< uint16_t, CounterPtr > Counters
std::unique_ptr< Device > DevicePtr
bool CreateDeviceRecordTest(const DevicePtr &device, DeviceRecord &deviceRecord, std::string &errorMessage)
std::unique_ptr< CounterSet > CounterSetPtr
Copyright (c) 2021 ARM Limited and Contributors.
bool CreateEventRecordTest(const CounterPtr &counter, EventRecord &eventRecord, std::string &errorMessage)
std::shared_ptr< Counter > CounterPtr
bool CreateCounterSetRecord(const CounterSetPtr &counterSet, CounterSetRecord &counterSetRecord, std::string &errorMessage)
bool CreateCategoryRecordTest(const CategoryPtr &category, const Counters &counters, CategoryRecord &categoryRecord, std::string &errorMessage)
std::vector< uint32_t > CategoryRecord
std::unique_ptr< Category > CategoryPtr
bool CreateEventRecord(const CounterPtr &counter, EventRecord &eventRecord, std::string &errorMessage)
bool CreateCategoryRecord(const CategoryPtr &category, const Counters &counters, CategoryRecord &categoryRecord, std::string &errorMessage)