MCPcopy Create free account
hub / github.com/RenderKit/oidn / getPtrStorage

Method getPtrStorage

devices/cuda/cuda_device.cpp:253–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251 }
252
253 Storage CUDADevice::getPtrStorage(const void* ptr)
254 {
255 cudaPointerAttributes attrib;
256 if (cudaPointerGetAttributes(&attrib, ptr) != cudaSuccess)
257 return Storage::Undefined;
258
259 switch (attrib.type)
260 {
261 case cudaMemoryTypeHost:
262 return Storage::Host;
263 case cudaMemoryTypeDevice:
264 return Storage::Device;
265 case cudaMemoryTypeManaged:
266 return Storage::Managed;
267 default:
268 return systemMemorySupported ? Storage::Managed : Storage::Undefined;
269 }
270 }
271
272 void CUDADevice::wait()
273 {

Callers

nothing calls this directly

Calls 1

cudaPointerGetAttributesFunction · 0.85

Tested by

no test coverage detected