HeterogeneousCore
CUDAUtilities
interface
eventWorkHasCompleted.h
Go to the documentation of this file.
1
#ifndef HeterogeneousCore_CUDAUtilities_eventWorkHasCompleted_h
2
#define HeterogeneousCore_CUDAUtilities_eventWorkHasCompleted_h
3
4
#include "
HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h
"
5
6
#include <cuda_runtime.h>
7
8
namespace
cms
{
9
namespace
cuda
{
18
inline
bool
eventWorkHasCompleted
(cudaEvent_t
event
) {
19
const
auto
ret
= cudaEventQuery(
event
);
20
if
(
ret
== cudaSuccess) {
21
return
true
;
22
}
else
if
(
ret
== cudaErrorNotReady) {
23
return
false
;
24
}
25
// leave error case handling to cudaCheck
26
cudaCheck
(
ret
);
27
return
false
;
// to keep compiler happy
28
}
29
}
// namespace cuda
30
}
// namespace cms
31
32
#endif
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition:
runTheMatrix.py:355
prod1Switch_cff.cuda
cuda
Definition:
prod1Switch_cff.py:11
cms::cuda::eventWorkHasCompleted
bool eventWorkHasCompleted(cudaEvent_t event)
Definition:
eventWorkHasCompleted.h:18
cudaCheck.h
cudaCheck
#define cudaCheck(ARG,...)
Definition:
cudaCheck.h:62
event
Definition:
event.py:1
cms
Namespace of DDCMS conversion namespace.
Definition:
ProducerAnalyzer.cc:21
Generated for CMSSW Reference Manual by
1.8.16