24.02.1
|
Default OpenCL cl buffer allocator implementation. More...
#include <CLBufferAllocator.h>
Public Member Functions | |
void * | allocate (size_t size, size_t alignment) override |
Interface to be implemented by the child class to allocate bytes. More... | |
void | free (void *ptr) override |
Interface to be implemented by the child class to free the allocated tensor. More... | |
std::unique_ptr< IMemoryRegion > | make_region (size_t size, size_t alignment) override |
Create self-managed memory region. More... | |
Public Member Functions inherited from IAllocator | |
virtual | ~IAllocator ()=default |
Default virtual destructor. More... | |
Default OpenCL cl buffer allocator implementation.
Definition at line 34 of file CLBufferAllocator.h.
|
overridevirtual |
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 |
Implements IAllocator.
Definition at line 35 of file CLBufferAllocator.cpp.
References ARM_COMPUTE_UNUSED, clCreateBuffer(), arm_compute::test::validation::context, and CLScheduler::get().
|
overridevirtual |
Interface to be implemented by the child class to free the allocated tensor.
Implements IAllocator.
Definition at line 43 of file CLBufferAllocator.cpp.
References ARM_COMPUTE_ERROR_ON, and clReleaseMemObject().
|
overridevirtual |
Create self-managed memory region.
[in] | size | Size of the memory region |
[in] | alignment | Alignment of the memory region |
Implements IAllocator.
Definition at line 49 of file CLBufferAllocator.cpp.
References ARM_COMPUTE_UNUSED.