Compute Library
18.05
|
Default OpenCL cl buffer allocator implementation. More...
#include <CLBufferAllocator.h>
Public Member Functions | |
CLBufferAllocator (cl::Context context=CLScheduler::get().context()) | |
Default constructor. More... | |
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 37 of file CLBufferAllocator.h.
|
explicit |
Default constructor.
|
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.
|
overridevirtual |
Interface to be implemented by the child class to free the allocated tensor.
Implements IAllocator.
|
overridevirtual |
Create self-managed memory region.
[in] | size | Size of the memory region |
[in] | alignment | Alignment of the memory region |
Implements IAllocator.