From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/classarmnn_1_1_sample_memory_manager.xhtml | 342 +++++++++++++++++++++++ 1 file changed, 342 insertions(+) create mode 100644 20.02/classarmnn_1_1_sample_memory_manager.xhtml (limited to '20.02/classarmnn_1_1_sample_memory_manager.xhtml') diff --git a/20.02/classarmnn_1_1_sample_memory_manager.xhtml b/20.02/classarmnn_1_1_sample_memory_manager.xhtml new file mode 100644 index 0000000000..90f1b87046 --- /dev/null +++ b/20.02/classarmnn_1_1_sample_memory_manager.xhtml @@ -0,0 +1,342 @@ + + + + + + + + + + + + + +ArmNN: SampleMemoryManager Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
SampleMemoryManager Class Reference
+
+
+ +

#include <SampleMemoryManager.hpp>

+
+Inheritance diagram for SampleMemoryManager:
+
+
+ + +IMemoryManager + +
+ + + + +

+Classes

class  Pool
 
+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

 SampleMemoryManager ()
 
virtual ~SampleMemoryManager ()
 
PoolManage (unsigned int numBytes)
 
void Allocate (Pool *pool)
 
void * GetPointer (Pool *pool)
 
void Acquire () override
 
void Release () override
 
- Public Member Functions inherited from IMemoryManager
virtual ~IMemoryManager ()
 
+ + + + +

+Additional Inherited Members

- Protected Member Functions inherited from IMemoryManager
 IMemoryManager ()
 
+

Detailed Description

+
+

Definition at line 16 of file SampleMemoryManager.hpp.

+

Constructor & Destructor Documentation

+ +

◆ SampleMemoryManager()

+ +
+
+ + + + + + + +
SampleMemoryManager ()
+
+ +

Definition at line 13 of file SampleMemoryManager.cpp.

+
14 {}
+
+
+ +

◆ ~SampleMemoryManager()

+ +
+
+ + + + + +
+ + + + + + + +
~SampleMemoryManager ()
+
+virtual
+
+ +

Definition at line 16 of file SampleMemoryManager.cpp.

+
17 {}
+
+
+

Member Function Documentation

+ +

◆ Acquire()

+ +
+
+ + + + + +
+ + + + + + + +
void Acquire ()
+
+overridevirtual
+
+ +

Implements IMemoryManager.

+ +

Definition at line 45 of file SampleMemoryManager.cpp.

+
46 {
47  for (Pool &pool: m_Pools)
48  {
49  pool.Acquire();
50  }
51 }
+
+
+
+ +

◆ Allocate()

+ +
+
+ + + + + + + + +
void Allocate (SampleMemoryManager::Poolpool)
+
+ +

Definition at line 35 of file SampleMemoryManager.cpp.

+
36 {
37  m_FreePools.push_back(pool);
38 }
+
+
+ +

◆ GetPointer()

+ +
+
+ + + + + + + + +
void * GetPointer (SampleMemoryManager::Poolpool)
+
+ +

Definition at line 40 of file SampleMemoryManager.cpp.

+ +

References SampleMemoryManager::Pool::GetPointer().

+
41 {
42  return pool->GetPointer();
43 }
+
+
+ +

◆ Manage()

+ +
+
+ + + + + + + + +
SampleMemoryManager::Pool * Manage (unsigned int numBytes)
+
+ +

Definition at line 19 of file SampleMemoryManager.cpp.

+ +

References SampleMemoryManager::Pool::Reserve().

+
20 {
21  if (!m_FreePools.empty())
22  {
23  Pool* res = m_FreePools.back();
24  m_FreePools.pop_back();
25  res->Reserve(numBytes);
26  return res;
27  }
28  else
29  {
30  m_Pools.push_front(Pool(numBytes));
31  return &m_Pools.front();
32  }
33 }
RefMemoryManager::Pool Pool
+ +
void Reserve(unsigned int numBytes)
+
+
+
+ +

◆ Release()

+ +
+
+ + + + + +
+ + + + + + + +
void Release ()
+
+overridevirtual
+
+ +

Implements IMemoryManager.

+ +

Definition at line 53 of file SampleMemoryManager.cpp.

+
54 {
55  for (Pool &pool: m_Pools)
56  {
57  pool.Release();
58  }
59 }
+
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1