ArmNN
 21.02
PacketBuffer.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "IPacketBuffer.hpp"
9 
10 #include <memory>
11 
12 namespace armnn
13 {
14 
15 namespace profiling
16 {
17 
19 {
20 public:
21  PacketBuffer(unsigned int maxSize);
22 
24 
25  const unsigned char* GetReadableData() const override;
26 
27  unsigned int GetSize() const override;
28 
29  void MarkRead() override;
30 
31  void Commit(unsigned int size) override;
32 
33  void Release() override;
34 
35  unsigned char* GetWritableData() override;
36 
37  void Destroy() override;
38 
39 private:
40  unsigned int m_MaxSize;
41  unsigned int m_Size;
42  std::unique_ptr<unsigned char[]> m_Data;
43 };
44 
45 } // namespace profiling
46 
47 } // namespace armnn
PacketBuffer(unsigned int maxSize)
void Destroy() override
release the memory held and reset internal point to null.
unsigned int GetSize() const override
Copyright (c) 2021 ARM Limited and Contributors.
const unsigned char * GetReadableData() const override
void Commit(unsigned int size) override
unsigned char * GetWritableData() override