MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / ICLSVMMemoryRegion

Method ICLSVMMemoryRegion

src/runtime/CL/CLMemoryRegion.cpp:106–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106ICLSVMMemoryRegion::ICLSVMMemoryRegion(cl_mem_flags flags, size_t size, size_t alignment)
107 : ICLMemoryRegion(size), _ptr(nullptr)
108{
109 if (size != 0)
110 {
111 _ptr = clSVMAlloc(CLScheduler::get().context().get(), flags, size, alignment);
112 if (_ptr != nullptr)
113 {
114 _mem = cl::Buffer(CLScheduler::get().context(), CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR, _size, _ptr);
115 }
116 }
117}
118
119ICLSVMMemoryRegion::~ICLSVMMemoryRegion()
120{

Callers

nothing calls this directly

Calls 4

clSVMAllocFunction · 0.85
contextMethod · 0.80
BufferClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected