Ferran Balaguer | 1b94172 | 2019-08-28 16:57:18 +0100 | [diff] [blame] | 1 | // |
Jim Flynn | 83d08a9 | 2020-07-09 13:48:16 +0100 | [diff] [blame] | 2 | // Copyright © 2019 Arm Ltd and Contributors. All rights reserved. |
Ferran Balaguer | 1b94172 | 2019-08-28 16:57:18 +0100 | [diff] [blame] | 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 | |
Jim Flynn | 9c85b41 | 2022-03-16 00:27:43 +0000 | [diff] [blame] | 13 | #include <armnn/profiling/ArmNNProfiling.hpp> |
| 14 | |
Jim Flynn | 9265a88 | 2022-03-10 23:35:26 +0000 | [diff] [blame] | 15 | #include <common/include/IgnoreUnused.hpp> |
| 16 | #include <common/include/NumericCast.hpp> |
Jim Flynn | f9db3ef | 2022-03-08 21:23:44 +0000 | [diff] [blame] | 17 | |
Sadik Armagan | 3896b47 | 2020-02-10 12:24:15 +0000 | [diff] [blame] | 18 | #include <atomic> |
| 19 | #include <condition_variable> |
| 20 | #include <mutex> |
| 21 | #include <thread> |
| 22 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 23 | namespace arm |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 24 | { |
Ferran Balaguer | 1b94172 | 2019-08-28 16:57:18 +0100 | [diff] [blame] | 25 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 26 | namespace pipe |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 27 | { |
Matteo Martincigh | d0613b5 | 2019-10-09 16:47:04 +0100 | [diff] [blame] | 28 | |
Matteo Martincigh | 42f9d9e | 2019-09-05 12:02:04 +0100 | [diff] [blame] | 29 | class SendCounterPacketTest : public SendCounterPacket |
| 30 | { |
| 31 | public: |
Sadik Armagan | 3896b47 | 2020-02-10 12:24:15 +0000 | [diff] [blame] | 32 | SendCounterPacketTest(IBufferManager& buffer) |
Jim Flynn | 9c85b41 | 2022-03-16 00:27:43 +0000 | [diff] [blame] | 33 | : SendCounterPacket(buffer, |
| 34 | arm::pipe::ARMNN_SOFTWARE_INFO, |
| 35 | arm::pipe::ARMNN_SOFTWARE_VERSION, |
| 36 | arm::pipe::ARMNN_HARDWARE_VERSION) |
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 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 69 | } // namespace pipe |
Matteo Martincigh | 24e8f92 | 2019-09-19 11:57:46 +0100 | [diff] [blame] | 70 | |
Cathal Corbett | 5aa9fd7 | 2022-02-25 15:33:28 +0000 | [diff] [blame] | 71 | } // namespace arm |