3.1.1 将同用的function放到header文件里
./common/common.h
#define CHECK(call) \
{
\
const cudaError_t error = call; \
if (error != cudaSuccess)\
{
\
printf("Error: %s: %d\n", __FILE__, __LINE__);\
printf("code :%d reason :%s\n", error , cudaGetErrorString(error));\
exit(1);\
}\
}
class Timer{
cudaEvent_t _start;
cudaEvent_t _stop;
public:
Timer(