#include <ClBackend.hpp>
Definition at line 113 of file ClBackend.hpp.
◆ ClBackendCustomAllocatorWrapper()
◆ allocate()
void* allocate |
( |
size_t |
size, |
|
|
size_t |
alignment |
|
) |
| |
|
inlineoverride |
Definition at line 119 of file ClBackend.hpp.
121 auto alloc = m_CustomAllocator->allocate(size, alignment);
122 return MapAllocatedMemory(alloc, size, m_CustomAllocator->GetMemorySourceType());
◆ free()
Definition at line 124 of file ClBackend.hpp.
126 auto hostMemPtr = m_AllocatedBufferMappings[ptr];
127 clReleaseMemObject(
static_cast<cl_mem
>(ptr));
128 m_CustomAllocator->free(hostMemPtr);
◆ make_region()
std::unique_ptr<arm_compute::IMemoryRegion> make_region |
( |
size_t |
size, |
|
|
size_t |
alignment |
|
) |
| |
|
inlineoverride |
Definition at line 130 of file ClBackend.hpp.
132 auto hostMemPtr = m_CustomAllocator->allocate(size, alignment);
133 cl_mem buffer = MapAllocatedMemory(hostMemPtr, size, m_CustomAllocator->GetMemorySourceType());
135 return std::make_unique<ClBackendCustomAllocatorMemoryRegion>(cl::Buffer(buffer),
137 m_CustomAllocator->GetMemorySourceType());
The documentation for this class was generated from the following file: