| 219 | } |
| 220 | |
| 221 | void 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 | |
| 230 | AllocatorPinned::AllocatorPinned() : pinnedMaps(opencl::getDeviceCount()) { |
| 231 | logger = common::loggerFactory("mem"); |
nothing calls this directly
no test coverage detected