#include <ClBackend.hpp>
Definition at line 229 of file ClBackend.hpp.
◆ ClBackendCustomAllocatorMemoryRegion()
Definition at line 233 of file ClBackend.hpp.
234 : ICLMemoryRegion(buffer.getInfo<CL_MEM_SIZE>())
237 m_HostMemPtr = hostMemPtr;
238 m_MemorySource = source;
◆ map()
void* map |
( |
cl::CommandQueue & |
q, |
|
|
bool |
blocking |
|
) |
| |
|
inlineoverride |
Definition at line 247 of file ClBackend.hpp.
References armnn::DmaBuf, armnn::DmaBufProtected, armnn::IgnoreUnused(), and armnn::Malloc.
250 if (m_HostMemPtr ==
nullptr)
252 throw armnn::Exception(
"ClBackend: Attempting to map memory with an invalid host ptr");
254 if (_mapping !=
nullptr)
256 throw armnn::Exception(
"ClBackend: Attempting to map memory which has not yet been unmapped");
258 switch (m_MemorySource)
261 _mapping = m_HostMemPtr;
267 _mapping = mmap(NULL, _size, PROT_WRITE, MAP_SHARED, *(reinterpret_cast<int*>(m_HostMemPtr)), 0);
271 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: