AnimatLab  2
Test
CUDAVersionControl.h
1 /*
2  * CUDAVersionControl.h
3  *
4  * Created on: Nov 3, 2013
5  * Author: tingshuc
6  */
7 
8 #ifndef _CUDAVERSIONCONTROL_H_
9 #define _CUDAVERSIONCONTROL_H_
10 
11 //#if __CUDA3__
12 // #define CUDA_CHECK_ERRORS(x) cutilSafeCall(x)
13 // #define CUDA_CHECK_ERRORS_MACRO(x) CUDA_SAFE_CALL(x)
14 //
15 // #define CUDA_GET_LAST_ERROR(x) cutilCheckMsg(x)
16 // #define CUDA_GET_LAST_ERROR_MACRO(x) CUT_CHECK_ERROR(x)
17 //
18 // #define CUDA_CREATE_TIMER(x) cutCreateTimer(&(x))
19 // #define CUDA_DELETE_TIMER(x) cutDeleteTimer(x)
20 // #define CUDA_RESET_TIMER(x) cutResetTimer(x)
21 // #define CUDA_START_TIMER(x) cutStartTimer(x)
22 // #define CUDA_STOP_TIMER(x) cutStopTimer(x)
23 // #define CUDA_GET_TIMER_VALUE(x) cutGetTimerValue(x)
24 //
25 // #define CUDA_GET_MAXGFLOP_DEVICE_ID cutGetMaxGflopsDeviceId
26 //#elif __CUDA5__
27  #define CUDA_CHECK_ERRORS(x) checkCudaErrors(x)
28  #define CUDA_CHECK_ERRORS_MACRO(x) checkCudaErrors(x)
29 
30  #define CUDA_CREATE_TIMER(x) sdkCreateTimer(&(x))
31  #define CUDA_DELETE_TIMER(x) sdkDeleteTimer(&(x))
32  #define CUDA_RESET_TIMER(x) sdkResetTimer(&(x))
33  #define CUDA_START_TIMER(x) sdkStartTimer(&(x))
34  #define CUDA_STOP_TIMER(x) sdkStopTimer(&(x))
35  #define CUDA_GET_TIMER_VALUE(x) sdkGetTimerValue(&(x))
36 
37  #define CUDA_GET_LAST_ERROR(x) getLastCudaError(x)
38  #define CUDA_GET_LAST_ERROR_MACRO(x) getLastCudaError(x)
39 
40  #define CUDA_GET_MAXGFLOP_DEVICE_ID gpuGetMaxGflopsDeviceId
41 //#endif
42 
43 
44 #endif /* _CUDAVERSIONCONTROL_H_ */