23.08
|
Memory group interface. More...
#include <IMemoryGroup.h>
Public Member Functions | |
virtual | ~IMemoryGroup ()=default |
Default virtual destructor. More... | |
virtual void | manage (IMemoryManageable *obj)=0 |
Sets a object to be managed by the given memory group. More... | |
virtual void | finalize_memory (IMemoryManageable *obj, IMemory &obj_memory, size_t size, size_t alignment)=0 |
Finalizes memory for a given object. More... | |
virtual void | acquire ()=0 |
Acquires backing memory for the whole group. More... | |
virtual void | release ()=0 |
Releases backing memory of the whole group. More... | |
virtual MemoryMappings & | mappings ()=0 |
Gets the memory mapping of the group. More... | |
Memory group interface.
Definition at line 37 of file IMemoryGroup.h.
|
virtualdefault |
Default virtual destructor.
|
pure virtual |
Acquires backing memory for the whole group.
Implemented in MemoryGroup.
Referenced by MemoryGroupResourceScope::MemoryGroupResourceScope().
|
pure virtual |
Finalizes memory for a given object.
[in,out] | obj | Object to request memory for |
[in,out] | obj_memory | Object's memory handling interface which can be used to alter the underlying memory that is used by the object. |
[in] | size | Size of memory to allocate |
[in] | alignment | (Optional) Alignment to use |
Implemented in MemoryGroup.
Referenced by TensorAllocator::allocate(), and CLTensorAllocator::allocate().
|
pure virtual |
Sets a object to be managed by the given memory group.
[in] | obj | Object to be managed |
Implemented in MemoryGroup.
Referenced by CLTensorHandle::manage(), and NETensorHandle::manage().
|
pure virtual |
Gets the memory mapping of the group.
Implemented in MemoryGroup.
Referenced by ISimpleLifetimeManager::release_group().
|
pure virtual |
Releases backing memory of the whole group.
Implemented in MemoryGroup.
Referenced by MemoryGroupResourceScope::~MemoryGroupResourceScope().