Ferran Balaguer | 1b94172 | 2019-08-28 16:57:18 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2019 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 8 | #include <SendCounterPacket.hpp> |
Sadik Armagan | 3896b47 | 2020-02-10 12:24:15 +0000 | [diff] [blame] | 9 | #include <SendThread.hpp> |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 10 | #include <ProfilingUtils.hpp> |
Matteo Martincigh | e848538 | 2019-10-10 14:08:21 +0100 | [diff] [blame] | 11 | #include <IProfilingConnectionFactory.hpp> |
Ferran Balaguer | 1b94172 | 2019-08-28 16:57:18 +0100 | [diff] [blame] | 12 | |
| 13 | #include <armnn/Exceptions.hpp> |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 14 | #include <armnn/Optional.hpp> |
| 15 | #include <armnn/Conversion.hpp> |
Narumol Prangnawarat | ac2770a | 2020-04-01 16:51:23 +0100 | [diff] [blame] | 16 | #include <armnn/utility/Assert.hpp> |
Jan Eilers | 8eb2560 | 2020-03-09 12:13:48 +0000 | [diff] [blame] | 17 | #include <armnn/utility/IgnoreUnused.hpp> |
Ferran Balaguer | 1b94172 | 2019-08-28 16:57:18 +0100 | [diff] [blame] | 18 | |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 19 | #include <boost/numeric/conversion/cast.hpp> |
Ferran Balaguer | 1b94172 | 2019-08-28 16:57:18 +0100 | [diff] [blame] | 20 | |
Sadik Armagan | 3896b47 | 2020-02-10 12:24:15 +0000 | [diff] [blame] | 21 | #include <atomic> |
| 22 | #include <condition_variable> |
| 23 | #include <mutex> |
| 24 | #include <thread> |
| 25 | |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 26 | namespace armnn |
| 27 | { |
Ferran Balaguer | 1b94172 | 2019-08-28 16:57:18 +0100 | [diff] [blame] | 28 | |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 29 | namespace profiling |
| 30 | { |
Matteo Martincigh | d0613b5 | 2019-10-09 16:47:04 +0100 | [diff] [blame] | 31 | |
Matteo Martincigh | 42f9d9e | 2019-09-05 12:02:04 +0100 | [diff] [blame] | 32 | class SendCounterPacketTest : public SendCounterPacket |
| 33 | { |
| 34 | public: |
Sadik Armagan | 3896b47 | 2020-02-10 12:24:15 +0000 | [diff] [blame] | 35 | SendCounterPacketTest(IBufferManager& buffer) |
| 36 | : SendCounterPacket(buffer) |
Matteo Martincigh | 42f9d9e | 2019-09-05 12:02:04 +0100 | [diff] [blame] | 37 | {} |
| 38 | |
| 39 | bool CreateDeviceRecordTest(const DevicePtr& device, |
| 40 | DeviceRecord& deviceRecord, |
| 41 | std::string& errorMessage) |
| 42 | { |
| 43 | return CreateDeviceRecord(device, deviceRecord, errorMessage); |
| 44 | } |
| 45 | |
| 46 | bool CreateCounterSetRecordTest(const CounterSetPtr& counterSet, |
| 47 | CounterSetRecord& counterSetRecord, |
| 48 | std::string& errorMessage) |
| 49 | { |
| 50 | return CreateCounterSetRecord(counterSet, counterSetRecord, errorMessage); |
| 51 | } |
| 52 | |
| 53 | bool CreateEventRecordTest(const CounterPtr& counter, |
| 54 | EventRecord& eventRecord, |
| 55 | std::string& errorMessage) |
| 56 | { |
| 57 | return CreateEventRecord(counter, eventRecord, errorMessage); |
| 58 | } |
| 59 | |
| 60 | bool CreateCategoryRecordTest(const CategoryPtr& category, |
| 61 | const Counters& counters, |
| 62 | CategoryRecord& categoryRecord, |
| 63 | std::string& errorMessage) |
| 64 | { |
| 65 | return CreateCategoryRecord(category, counters, categoryRecord, errorMessage); |
| 66 | } |
| 67 | }; |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 68 | |
| 69 | } // namespace profiling |
| 70 | |
| 71 | } // namespace armnn |