Narumol Prangnawarat | 404b275 | 2019-09-24 17:23:16 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2019 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | namespace armnn |
| 9 | { |
| 10 | |
| 11 | namespace profiling |
| 12 | { |
| 13 | |
| 14 | class IReadOnlyPacketBuffer // interface used by the read thread |
| 15 | { |
| 16 | public: |
| 17 | virtual ~IReadOnlyPacketBuffer() {} |
| 18 | |
| 19 | virtual const unsigned char* const GetReadableData() const = 0; |
| 20 | |
| 21 | virtual unsigned int GetSize() const = 0; |
| 22 | |
| 23 | virtual void MarkRead() = 0; |
| 24 | }; |
| 25 | |
| 26 | class IPacketBuffer : public IReadOnlyPacketBuffer // interface used by code that writes binary packets |
| 27 | { |
| 28 | public: |
| 29 | virtual ~IPacketBuffer() {} |
| 30 | |
| 31 | virtual void Commit(unsigned int size) = 0; |
| 32 | |
| 33 | virtual void Release() = 0; |
| 34 | |
| 35 | virtual unsigned char* GetWritableData() = 0; |
| 36 | }; |
| 37 | |
| 38 | } // namespace profiling |
| 39 | |
| 40 | } // namespace armnn |