ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::acl_common::AclInternalBufferManager< T_MemoryManager, T_PoolManager, T_LifetimeManager, T_Allocator > Class Template Reference

class for InternalBufferManager which has arm_compute::IMemoryManager pointer More...

#include <AclInternalBufferManager.h>

Collaboration diagram for onert::backend::acl_common::AclInternalBufferManager< T_MemoryManager, T_PoolManager, T_LifetimeManager, T_Allocator >:

Public Member Functions

 AclInternalBufferManager ()
 
virtual ~AclInternalBufferManager ()=default
 
void allocate (void) override
 Allocate the internal buffer manager on acl.
 
void deallocate (void) override
 Deallocate the internal buffer manager on acl.
 
std::shared_ptr<::arm_compute::IMemoryManager > internal_buffer_manager (void) override
 Get shared_ptr of arm_compute::IMemoryManager.
 
- Public Member Functions inherited from onert::backend::acl_common::IInternalBufferManager
virtual ~IInternalBufferManager ()=default
 

Detailed Description

template<typename T_MemoryManager, typename T_PoolManager, typename T_LifetimeManager, typename T_Allocator>
class onert::backend::acl_common::AclInternalBufferManager< T_MemoryManager, T_PoolManager, T_LifetimeManager, T_Allocator >

class for InternalBufferManager which has arm_compute::IMemoryManager pointer

Definition at line 54 of file AclInternalBufferManager.h.

Constructor & Destructor Documentation

◆ AclInternalBufferManager()

template<typename T_MemoryManager , typename T_PoolManager , typename T_LifetimeManager , typename T_Allocator >
onert::backend::acl_common::AclInternalBufferManager< T_MemoryManager, T_PoolManager, T_LifetimeManager, T_Allocator >::AclInternalBufferManager ( )
inline

Definition at line 57 of file AclInternalBufferManager.h.

57 : _allocator{nullptr}
58 {
59 std::shared_ptr<T_LifetimeManager> lifetime_mgr = std::make_shared<T_LifetimeManager>();
60 std::shared_ptr<T_PoolManager> pool_mgr = std::make_shared<T_PoolManager>();
61
62 _internal_manager = std::make_shared<T_MemoryManager>(lifetime_mgr, pool_mgr);
63 assert(_internal_manager);
64 }

◆ ~AclInternalBufferManager()

template<typename T_MemoryManager , typename T_PoolManager , typename T_LifetimeManager , typename T_Allocator >
virtual onert::backend::acl_common::AclInternalBufferManager< T_MemoryManager, T_PoolManager, T_LifetimeManager, T_Allocator >::~AclInternalBufferManager ( )
virtualdefault

Member Function Documentation

◆ allocate()

template<typename T_MemoryManager , typename T_PoolManager , typename T_LifetimeManager , typename T_Allocator >
void onert::backend::acl_common::AclInternalBufferManager< T_MemoryManager, T_PoolManager, T_LifetimeManager, T_Allocator >::allocate ( void  )
inlineoverridevirtual

Allocate the internal buffer manager on acl.

Implements onert::backend::acl_common::IInternalBufferManager.

Definition at line 71 of file AclInternalBufferManager.h.

72 {
73 _allocator = std::make_shared<T_Allocator>();
74 _internal_manager->populate(*_allocator, 1);
75 }

◆ deallocate()

template<typename T_MemoryManager , typename T_PoolManager , typename T_LifetimeManager , typename T_Allocator >
void onert::backend::acl_common::AclInternalBufferManager< T_MemoryManager, T_PoolManager, T_LifetimeManager, T_Allocator >::deallocate ( void  )
inlineoverridevirtual

Deallocate the internal buffer manager on acl.

Implements onert::backend::acl_common::IInternalBufferManager.

Definition at line 80 of file AclInternalBufferManager.h.

80{ _internal_manager->clear(); }

◆ internal_buffer_manager()

template<typename T_MemoryManager , typename T_PoolManager , typename T_LifetimeManager , typename T_Allocator >
std::shared_ptr<::arm_compute::IMemoryManager > onert::backend::acl_common::AclInternalBufferManager< T_MemoryManager, T_PoolManager, T_LifetimeManager, T_Allocator >::internal_buffer_manager ( void  )
inlineoverridevirtual

Get shared_ptr of arm_compute::IMemoryManager.

Implements onert::backend::acl_common::IInternalBufferManager.

Definition at line 85 of file AclInternalBufferManager.h.

86 {
87 return _internal_manager;
88 }

The documentation for this class was generated from the following file: