diff options
Diffstat (limited to 'src/profiling/PacketBuffer.hpp')
-rw-r--r-- | src/profiling/PacketBuffer.hpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/profiling/PacketBuffer.hpp b/src/profiling/PacketBuffer.hpp new file mode 100644 index 0000000000..a3d95d4108 --- /dev/null +++ b/src/profiling/PacketBuffer.hpp @@ -0,0 +1,45 @@ +// +// Copyright © 2019 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include "IPacketBuffer.hpp" + +#include <memory> + +namespace armnn +{ + +namespace profiling +{ + +class PacketBuffer : public IPacketBuffer +{ +public: + PacketBuffer(unsigned int maxSize); + + ~PacketBuffer() {} + + const unsigned char* const GetReadableData() const override; + + unsigned int GetSize() const override; + + void MarkRead() override; + + void Commit(unsigned int size) override; + + void Release() override; + + unsigned char* GetWritableData() override; + +private: + unsigned int m_MaxSize; + unsigned int m_Size; + std::unique_ptr<unsigned char[]> m_Data; +}; + +} // namespace profiling + +} // namespace armnn
\ No newline at end of file |