MCPcopy Create free account
hub / github.com/NVIDIA/DALI / GetFromPool

Method GetFromPool

include/dali/core/cuda_shared_event.h:56–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 }
55
56 static CUDASharedEvent GetFromPool(CUDAEventPool &pool, int device_id = -1) {
57 if (device_id < 0)
58 CUDA_CALL(cudaGetDevice(&device_id));
59 CUDAEvent &&event = pool.Get(device_id);
60 return CUDASharedEvent(
61 std::move(event),
62 [device_id, owner = &pool](void *e) {
63 owner->Put(CUDAEvent(static_cast<cudaEvent_t>(e)), device_id);
64 });
65 }
66
67 static CUDASharedEvent GetFromPool(int device_id = -1) {
68 return GetFromPool(CUDAEventPool::instance(), device_id);

Callers

nothing calls this directly

Calls 5

CUDA_CALLFunction · 0.85
CUDASharedEventClass · 0.85
CUDAEventFunction · 0.85
GetMethod · 0.45
PutMethod · 0.45

Tested by

no test coverage detected