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

Method ~ICLSVMMemoryRegion

src/runtime/CL/CLMemoryRegion.cpp:119–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119ICLSVMMemoryRegion::~ICLSVMMemoryRegion()
120{
121 if (_ptr != nullptr)
122 {
123 try
124 {
125 // Can only use the blocking finish instead of the non-blocking flush here, because clSVMFree requires all
126 // commands that may use the svm pointer to finish beforehand
127 // https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/clSVMFree.html
128 clFinish(CLScheduler::get().queue().get());
129 _mem = cl::Buffer();
130 clSVMFree(_ctx.get(), _ptr);
131 }
132 catch (...)
133 {
134 }
135 }
136}
137
138void *ICLSVMMemoryRegion::ptr()
139{

Callers

nothing calls this directly

Calls 4

clFinishFunction · 0.85
clSVMFreeFunction · 0.85
BufferClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected