forked from beiwang2003/strip_clustering_gpu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cuda_rt_call.h
20 lines (17 loc) · 1.19 KB
/
cuda_rt_call.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef _CUDA_RT_CALL_H_
#define _CUDA_RT_CALL_H_
#include <cuda_runtime.h>
#define CUDA_RT_CALL(call) \
{ \
cudaError_t cudaStatus = call; \
if (cudaSuccess != cudaStatus) \
{ \
fprintf(stderr, \
"ERROR: CUDA RT call \"%s\" in line %d of file %s failed " \
"with " \
"%s (%d).\n", \
#call, __LINE__, __FILE__, cudaGetErrorString(cudaStatus), cudaStatus); \
abort(); \
} \
}
#endif