ArmNN
 24.08
ClMemoryManager Class Reference

#include <BaseMemoryManager.hpp>

Inheritance diagram for ClMemoryManager:
[legend]
Collaboration diagram for ClMemoryManager:
[legend]

Public Member Functions

 ClMemoryManager ()
 
virtual ~ClMemoryManager ()
 
 ClMemoryManager (std::shared_ptr< arm_compute::IAllocator > alloc)
 
- Public Member Functions inherited from BaseMemoryManager
 BaseMemoryManager ()
 
virtual ~BaseMemoryManager ()
 
void Acquire () override
 
void Release () override
 
 BaseMemoryManager (std::shared_ptr< arm_compute::IAllocator > alloc, MemoryAffinity memoryAffinity)
 
std::shared_ptr< arm_compute::MemoryManagerOnDemand > & GetIntraLayerManager ()
 
std::shared_ptr< arm_compute::MemoryManagerOnDemand > & GetInterLayerManager ()
 
std::shared_ptr< arm_compute::IMemoryGroup > & GetInterLayerMemoryGroup ()
 
- Public Member Functions inherited from IMemoryManager
virtual ~IMemoryManager ()
 

Protected Member Functions

std::shared_ptr< arm_compute::IMemoryGroup > CreateMemoryGroup (const std::shared_ptr< arm_compute::MemoryManagerOnDemand > &memoryManager) override
 
- Protected Member Functions inherited from BaseMemoryManager
std::shared_ptr< arm_compute::MemoryManagerOnDemand > CreateArmComputeMemoryManager (MemoryAffinity memoryAffinity)
 
- Protected Member Functions inherited from IMemoryManager
 IMemoryManager ()
 

Additional Inherited Members

- Public Types inherited from BaseMemoryManager
enum  MemoryAffinity { Buffer, Offset }
 
- Protected Attributes inherited from BaseMemoryManager
std::shared_ptr< arm_compute::IAllocator > m_Allocator
 
std::shared_ptr< arm_compute::MemoryManagerOnDemand > m_IntraLayerMemoryMgr
 
std::shared_ptr< arm_compute::MemoryManagerOnDemand > m_InterLayerMemoryMgr
 
std::shared_ptr< arm_compute::IMemoryGroup > m_InterLayerMemoryGroup
 

Detailed Description

Definition at line 79 of file BaseMemoryManager.hpp.

Constructor & Destructor Documentation

◆ ClMemoryManager() [1/2]

ClMemoryManager ( )
inline

Definition at line 82 of file BaseMemoryManager.hpp.

82 {}

◆ ~ClMemoryManager()

virtual ~ClMemoryManager ( )
inlinevirtual

Definition at line 83 of file BaseMemoryManager.hpp.

83 {}

◆ ClMemoryManager() [2/2]

ClMemoryManager ( std::shared_ptr< arm_compute::IAllocator >  alloc)
inline

Definition at line 85 of file BaseMemoryManager.hpp.

86  : BaseMemoryManager(std::move(alloc), MemoryAffinity::Buffer)
87  {
88  arm_compute::CLTensorAllocator::set_global_allocator(alloc.get());
90  }

References ClMemoryManager::CreateMemoryGroup(), BaseMemoryManager::m_InterLayerMemoryGroup, and BaseMemoryManager::m_InterLayerMemoryMgr.

Member Function Documentation

◆ CreateMemoryGroup()

std::shared_ptr< arm_compute::IMemoryGroup > CreateMemoryGroup ( const std::shared_ptr< arm_compute::MemoryManagerOnDemand > &  memoryManager)
overrideprotectedvirtual

Implements BaseMemoryManager.

Definition at line 95 of file BaseMemoryManager.cpp.

96 {
97  return std::make_shared<arm_compute::MemoryGroup>(memoryManager);
98 }

Referenced by ClMemoryManager::ClMemoryManager().


The documentation for this class was generated from the following files:
armnn::BaseMemoryManager::m_InterLayerMemoryGroup
std::shared_ptr< arm_compute::IMemoryGroup > m_InterLayerMemoryGroup
Definition: BaseMemoryManager.hpp:50
armnn::BaseMemoryManager::m_InterLayerMemoryMgr
std::shared_ptr< arm_compute::MemoryManagerOnDemand > m_InterLayerMemoryMgr
Definition: BaseMemoryManager.hpp:49
armnn::BaseMemoryManager::MemoryAffinity::Buffer
@ Buffer
armnn::ClMemoryManager::CreateMemoryGroup
std::shared_ptr< arm_compute::IMemoryGroup > CreateMemoryGroup(const std::shared_ptr< arm_compute::MemoryManagerOnDemand > &memoryManager) override
Definition: BaseMemoryManager.cpp:95
armnn::BaseMemoryManager::BaseMemoryManager
BaseMemoryManager()
Definition: BaseMemoryManager.hpp:33