MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / nativeFree

Method nativeFree

src/backend/opencl/memory.cpp:221–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221void Allocator::nativeFree(void *ptr) {
222 cl_mem buffer = static_cast<cl_mem>(ptr);
223 AF_TRACE("nativeFree: {}", ptr);
224 cl_int err = clReleaseMemObject(buffer);
225 if (err != CL_SUCCESS) {
226 AF_ERROR("Failed to release device memory.", AF_ERR_RUNTIME);
227 }
228}
229
230AllocatorPinned::AllocatorPinned() : pinnedMaps(opencl::getDeviceCount()) {
231 logger = common::loggerFactory("mem");

Callers

nothing calls this directly

Calls 5

findMethod · 0.80
getActiveDeviceIdFunction · 0.70
getLoggerFunction · 0.70
getErrorMessageFunction · 0.70
getQueueFunction · 0.50

Tested by

no test coverage detected