IVGCVSW-5301 Remove all boost::numeric_cast from armnn/src/profiling
[platform/upstream/armnn.git] / src / profiling / test / SendCounterPacketTests.hpp
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>
11 #include <IProfilingConnectionFactory.hpp>
12
13 #include <armnn/Exceptions.hpp>
14 #include <armnn/Optional.hpp>
15 #include <armnn/Conversion.hpp>
16 #include <armnn/utility/Assert.hpp>
17 #include <armnn/utility/IgnoreUnused.hpp>
18 #include <armnn/utility/NumericCast.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
31 class SendCounterPacketTest : public SendCounterPacket
32 {
33 public:
34     SendCounterPacketTest(IBufferManager& buffer)
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