ArmNN
 21.08
ICustomAllocator Class Referenceabstract

Custom Allocator interface. More...

#include <ICustomAllocator.hpp>

Inherited by SampleClBackendCustomAllocator.

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
 

Detailed Description

Custom Allocator interface.

Examples:
CustomMemoryAllocatorSample.cpp.

Definition at line 15 of file ICustomAllocator.hpp.

Constructor & Destructor Documentation

◆ ~ICustomAllocator()

virtual ~ICustomAllocator ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ allocate()

virtual void* allocate ( size_t  size,
size_t  alignment 
)
pure virtual

Interface to be implemented by the child class to allocate bytes.

Parameters
[in]sizeSize to allocate
[in]alignmentAlignment that the returned pointer should comply with
Returns
A pointer to the allocated memory The returned pointer must be host write accessible
Examples:
CustomMemoryAllocatorSample.cpp.

◆ free()

virtual void free ( void *  ptr)
pure virtual

Interface to be implemented by the child class to free the allocated bytes.

Examples:
CustomMemoryAllocatorSample.cpp.

◆ GetMemorySourceType()

virtual armnn::MemorySource GetMemorySourceType ( )
pure virtual

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