|
25.11
|
Custom Allocator interface. More...
#include <ICustomAllocator.hpp>
Public Member Functions | |
| virtual | ~ICustomAllocator ()=default |
| Default virtual destructor. | |
| virtual void * | allocate (size_t size, size_t alignment)=0 |
| Interface to be implemented by the child class to allocate bytes. | |
| virtual void | free (void *ptr)=0 |
| Interface to be implemented by the child class to free the allocated bytes. | |
| virtual armnn::MemorySource | GetMemorySourceType ()=0 |
| Used to specify what type of memory is being allocated by this allocator. | |
| 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. | |
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 ClBackendDefaultAllocator, and DefaultAllocator.
|
pure virtual |
Interface to be implemented by the child class to free the allocated bytes.
Implemented in ClBackendDefaultAllocator, and DefaultAllocator.
|
inlinevirtual |
Interface that may be implemented to allow retrieval of Memory Region from allocated buffer at a certain offset.
Reimplemented in 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 ClBackendDefaultAllocator, and DefaultAllocator.