41 }
while (not completed);
46 return cache_[dev].makeOrGet([dev]() {
49 cudaCheck(cudaEventCreateWithFlags(&
event, cudaEventDisableTiming));
50 return std::unique_ptr<BareEvent, Deleter>(
event,
Deleter{dev});
SharedEventPtr makeOrGet(int dev)
std::shared_ptr< std::remove_pointer_t< cudaEvent_t > > SharedEventPtr
std::vector< edm::ReusableObjectHolder< BareEvent, Deleter > > cache_
void operator()(cudaEvent_t event) const
EventCache & getEventCache()
#define cudaCheck(ARG,...)
bool eventWorkHasCompleted(cudaEvent_t event)