Ferran Balaguer | af5c46b | 2019-08-30 15:49:15 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Finn Williams | 032bc74 | 2020-02-12 11:02:34 +0000 | [diff] [blame] | 8 | #include <armnn/backends/profiling/IBackendProfiling.hpp> |
Matteo Martincigh | 42f9d9e | 2019-09-05 12:02:04 +0100 | [diff] [blame] | 9 | #include "ICounterDirectory.hpp" |
Ferran Balaguer | af5c46b | 2019-08-30 15:49:15 +0100 | [diff] [blame] | 10 | |
| 11 | namespace armnn |
| 12 | { |
| 13 | |
| 14 | namespace profiling |
| 15 | { |
| 16 | |
| 17 | class ISendCounterPacket |
| 18 | { |
| 19 | public: |
Finn Williams | 032bc74 | 2020-02-12 11:02:34 +0000 | [diff] [blame] | 20 | using IndexValuePairsVector = std::vector<CounterValue>; |
Francis Murtagh | 3a16198 | 2019-09-04 15:25:02 +0100 | [diff] [blame] | 21 | |
Matteo Martincigh | 2e7c885 | 2019-09-09 09:23:53 +0100 | [diff] [blame] | 22 | virtual ~ISendCounterPacket() {} |
| 23 | |
Ferran Balaguer | af5c46b | 2019-08-30 15:49:15 +0100 | [diff] [blame] | 24 | /// Create and write a StreamMetaDataPacket in the buffer |
| 25 | virtual void SendStreamMetaDataPacket() = 0; |
| 26 | |
| 27 | /// Create and write a CounterDirectoryPacket from the parameters to the buffer. |
Matteo Martincigh | 42f9d9e | 2019-09-05 12:02:04 +0100 | [diff] [blame] | 28 | virtual void SendCounterDirectoryPacket(const ICounterDirectory& counterDirectory) = 0; |
Ferran Balaguer | af5c46b | 2019-08-30 15:49:15 +0100 | [diff] [blame] | 29 | |
| 30 | /// Create and write a PeriodicCounterCapturePacket from the parameters to the buffer. |
Francis Murtagh | 3a16198 | 2019-09-04 15:25:02 +0100 | [diff] [blame] | 31 | virtual void SendPeriodicCounterCapturePacket(uint64_t timestamp, const IndexValuePairsVector& values) = 0; |
Ferran Balaguer | af5c46b | 2019-08-30 15:49:15 +0100 | [diff] [blame] | 32 | |
| 33 | /// Create and write a PeriodicCounterSelectionPacket from the parameters to the buffer. |
| 34 | virtual void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod, |
| 35 | const std::vector<uint16_t>& selectedCounterIds) = 0; |
Ferran Balaguer | af5c46b | 2019-08-30 15:49:15 +0100 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } // namespace profiling |
| 39 | |
| 40 | } // namespace armnn |
| 41 | |