From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_packet_buffer_8cpp_source.xhtml | 125 +++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 21.02/_packet_buffer_8cpp_source.xhtml (limited to '21.02/_packet_buffer_8cpp_source.xhtml') diff --git a/21.02/_packet_buffer_8cpp_source.xhtml b/21.02/_packet_buffer_8cpp_source.xhtml new file mode 100644 index 0000000000..557879a337 --- /dev/null +++ b/21.02/_packet_buffer_8cpp_source.xhtml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + +ArmNN: src/profiling/PacketBuffer.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
PacketBuffer.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "PacketBuffer.hpp"
7 
8 #include <armnn/Exceptions.hpp>
9 
10 namespace armnn
11 {
12 
13 namespace profiling
14 {
15 
16 PacketBuffer::PacketBuffer(unsigned int maxSize)
17  : m_MaxSize(maxSize)
18  , m_Size(0)
19 {
20  m_Data = std::make_unique<unsigned char[]>(m_MaxSize);
21 }
22 
23 const unsigned char* PacketBuffer::GetReadableData() const
24 {
25  return m_Data.get();
26 }
27 
28 unsigned int PacketBuffer::GetSize() const
29 {
30  return m_Size;
31 }
32 
34 {
35  m_Size = 0;
36 }
37 
38 void PacketBuffer::Commit(unsigned int size)
39 {
40  if (size > m_MaxSize)
41  {
42  throw armnn::RuntimeException("Cannot commit [" + std::to_string(size) +
43  "] bytes which is more than the maximum size of the buffer [" + std::to_string(m_MaxSize) + "]");
44  }
45  m_Size = size;
46 }
47 
49 {
50  m_Size = 0;
51 }
52 
54 {
55  return m_Data.get();
56 }
57 
59 {
60  m_Data.reset(nullptr);
61  m_Size = 0;
62  m_MaxSize = 0;
63 }
64 
65 } // namespace profiling
66 
67 } // 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
+ + + +
+
+ + + + -- cgit v1.2.1