#include <ClBackend.hpp>
Definition at line 97 of file ClBackend.hpp.
◆ ClBackendCustomAllocatorWrapper()
◆ allocate()
void* allocate |
( |
size_t |
size, |
|
|
size_t |
alignment |
|
) |
| |
|
inlineoverride |
Definition at line 103 of file ClBackend.hpp.
105 auto alloc = m_CustomAllocator->allocate(size, alignment);
106 return MapAllocatedMemory(alloc, size, m_CustomAllocator->GetMemorySourceType());
◆ free()
Definition at line 108 of file ClBackend.hpp.
110 auto hostMemPtr = m_AllocatedBufferMappings[ptr];
111 clReleaseMemObject(
static_cast<cl_mem
>(ptr));
112 m_CustomAllocator->free(hostMemPtr);
◆ make_region()
std::unique_ptr<arm_compute::IMemoryRegion> make_region |
( |
size_t |
size, |
|
|
size_t |
alignment |
|
) |
| |
|
inlineoverride |
Definition at line 114 of file ClBackend.hpp.
116 auto hostMemPtr = m_CustomAllocator->allocate(size, alignment);
117 cl_mem buffer = MapAllocatedMemory(hostMemPtr, size, m_CustomAllocator->GetMemorySourceType());
119 return std::make_unique<ClBackendCustomAllocatorMemoryRegion>(cl::Buffer(buffer),
121 m_CustomAllocator->GetMemorySourceType());
The documentation for this class was generated from the following file: