#include <ClBackend.hpp>
Definition at line 105 of file ClBackend.hpp.
◆ ClBackendCustomAllocatorWrapper()
◆ allocate()
void* allocate |
( |
size_t |
size, |
|
|
size_t |
alignment |
|
) |
| |
|
inlineoverride |
Definition at line 111 of file ClBackend.hpp.
113 auto alloc = m_CustomAllocator->allocate(size, alignment);
114 return MapAllocatedMemory(alloc, size, m_CustomAllocator->GetMemorySourceType());
◆ free()
Definition at line 116 of file ClBackend.hpp.
118 auto hostMemPtr = m_AllocatedBufferMappings[ptr];
119 clReleaseMemObject(static_cast<cl_mem>(ptr));
120 m_CustomAllocator->free(hostMemPtr);
◆ make_region()
std::unique_ptr<arm_compute::IMemoryRegion> make_region |
( |
size_t |
size, |
|
|
size_t |
alignment |
|
) |
| |
|
inlineoverride |
Definition at line 122 of file ClBackend.hpp.
References armnn::DmaBuf, armnn::DmaBufProtected, armnn::error, and armnn::Malloc.
124 auto hostMemPtr = m_CustomAllocator->allocate(size, alignment);
125 cl_mem buffer = MapAllocatedMemory(hostMemPtr, size, m_CustomAllocator->GetMemorySourceType());
127 return std::make_unique<ClBackendCustomAllocatorMemoryRegion>(cl::Buffer(buffer),
129 m_CustomAllocator->GetMemorySourceType());
The documentation for this class was generated from the following file: