#include <ClBackend.hpp>
Definition at line 221 of file ClBackend.hpp.
◆ ClBackendCustomAllocatorMemoryRegion()
Definition at line 225 of file ClBackend.hpp.
226 : ICLMemoryRegion(buffer.getInfo<CL_MEM_SIZE>())
229 m_HostMemPtr = hostMemPtr;
230 m_MemorySource = source;
◆ map()
void* map |
( |
cl::CommandQueue & |
q, |
|
|
bool |
blocking |
|
) |
| |
|
inlineoverride |
Definition at line 239 of file ClBackend.hpp.
References armnn::DmaBuf, armnn::DmaBufProtected, armnn::IgnoreUnused(), and armnn::Malloc.
242 if (m_HostMemPtr ==
nullptr)
244 throw armnn::Exception(
"ClBackend: Attempting to map memory with an invalid host ptr");
246 if (_mapping !=
nullptr)
248 throw armnn::Exception(
"ClBackend: Attempting to map memory which has not yet been unmapped");
250 switch (m_MemorySource)
253 _mapping = m_HostMemPtr;
259 _mapping = mmap(NULL, _size, PROT_WRITE, MAP_SHARED, *(reinterpret_cast<int*>(m_HostMemPtr)), 0);
263 throw armnn::Exception(
"ClBackend: Attempting to map imported memory without a valid source");
void IgnoreUnused(Ts &&...)
Base class for all ArmNN exceptions so that users can filter to just those.
◆ ptr()
◆ unmap()
void unmap |
( |
cl::CommandQueue & |
q | ) |
|
|
inlineoverride |
The documentation for this class was generated from the following file: