15 #ifndef CORE_GPU_CUDA_ERROR_CHK_H_
16 #define CORE_GPU_CUDA_ERROR_CHK_H_
18 #if !defined(__ROOTCLING__) && !defined(G__DICTIONARY)
24 #define GpuErrchk(ans) \
25 { GpuAssert((ans), __FILE__, __LINE__); }
26 inline void GpuAssert(cudaError_t code,
const char *file,
int line,
28 if (code != cudaSuccess) {
29 fprintf(stderr,
"GPUassert (error code %d): %s %s %d\n", code,
30 cudaGetErrorString(code), file, line);
31 if (code == cudaErrorInsufficientDriver) {
33 "This probably means that no CUDA-compatible GPU has been detected. "
34 "Consider setting the use_opencl flag to \"true\" in the bmd.toml "
35 "file to use OpenCL instead.\n");
43 #endif // !__ROOTCLING__ && !G__DICTIONARY
44 #endif // CORE_GPU_CUDA_ERROR_CHK_H_