23.11
|
#include <IAllocator.h>
Public Member Functions | |
virtual | ~IAllocator ()=default |
Default virtual destructor. More... | |
virtual void * | allocate (size_t size, size_t alignment)=0 |
Interface to be implemented by the child class to allocate bytes. More... | |
virtual void | free (void *ptr)=0 |
Interface to be implemented by the child class to free the allocated tensor. More... | |
virtual std::unique_ptr< IMemoryRegion > | make_region (size_t size, size_t alignment)=0 |
Create self-managed memory region. More... | |
Allocator interface.
Definition at line 35 of file IAllocator.h.
|
virtualdefault |
Default virtual destructor.
|
pure virtual |
Interface to be implemented by the child class to allocate bytes.
[in] | size | Size to allocate |
[in] | alignment | Alignment that the returned pointer should comply with |
Implemented in Allocator, and CLBufferAllocator.
|
pure virtual |
Interface to be implemented by the child class to free the allocated tensor.
Implemented in Allocator, and CLBufferAllocator.
|
pure virtual |
Create self-managed memory region.
[in] | size | Size of the memory region |
[in] | alignment | Alignment of the memory region |
Implemented in Allocator, and CLBufferAllocator.
Referenced by OffsetMemoryPool::OffsetMemoryPool().