24.08
|
Custom Allocator interface. More...
#include <ICustomAllocator.hpp>
Public Member Functions | |
virtual | ~ICustomAllocator ()=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 bytes. More... | |
virtual armnn::MemorySource | GetMemorySourceType ()=0 |
Used to specify what type of memory is being allocated by this allocator. More... | |
virtual void * | GetMemoryRegionAtOffset (void *buffer, size_t offset, size_t alignment=0) |
Interface that may be implemented to allow retrieval of Memory Region from allocated buffer at a certain offset. More... | |
Custom Allocator interface.
Definition at line 16 of file ICustomAllocator.hpp.
|
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 GpuFsaBackendDefaultAllocator, DefaultAllocator, and ClBackendDefaultAllocator.
|
pure virtual |
Interface to be implemented by the child class to free the allocated bytes.
Implemented in GpuFsaBackendDefaultAllocator, ClBackendDefaultAllocator, and DefaultAllocator.
|
inlinevirtual |
Interface that may be implemented to allow retrieval of Memory Region from allocated buffer at a certain offset.
Reimplemented in GpuFsaBackendDefaultAllocator, ClBackendDefaultAllocator, and DefaultAllocator.
Definition at line 46 of file ICustomAllocator.hpp.
References armnn::IgnoreUnused().
|
pure virtual |
Used to specify what type of memory is being allocated by this allocator.
Supported types are: MemorySource::Malloc MemorySource::DmaBuf MemorySource::DmaBufProtected
Implemented in GpuFsaBackendDefaultAllocator, ClBackendDefaultAllocator, and DefaultAllocator.