-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.h
17 lines (15 loc) · 845 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef __COMMON_H__
#define __COMMON_H__
#include "cuda_runtime.h"
#include <stdlib.h>
#define CUDA_CHECK(call) \
{ \
const cudaError_t error = call; \
if (error != cudaSuccess) { \
fprintf(stderr, "Error: %s:%d, ", __FILE__, __LINE__); \
fprintf(stderr, "code: %d, reason: %s\n", error, \
cudaGetErrorString(error)); \
exit(1); \
} \
}
#endif