summaryrefslogtreecommitdiff
path: root/src/cuda-sim/cuda-math.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuda-sim/cuda-math.h')
-rw-r--r--src/cuda-sim/cuda-math.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/cuda-sim/cuda-math.h b/src/cuda-sim/cuda-math.h
index ea7f5fd..5abf4f3 100644
--- a/src/cuda-sim/cuda-math.h
+++ b/src/cuda-sim/cuda-math.h
@@ -47,7 +47,6 @@ namespace cuda_math {
#define __attribute__(a) // to remove warnings inside math_functions.h
#undef INT_MAX
-#if CUDART_VERSION < 3000
// DEVICE_BUILTIN
struct int4 {
int x, y, z, w;
@@ -70,27 +69,21 @@ namespace cuda_math {
typedef struct float2 float2;
extern float rsqrtf(float); // CUDA 2.3 beta
-#else
-#define UINT_MAX ((unsigned int)-1)
-#endif
+#if CUDART_VERSION < 3000
#define CUDA_FLOAT_MATH_FUNCTIONS
#include <device_types.h>
#define __CUDA_INTERNAL_COMPILATION__
-#if CUDART_VERSION >= 3000
-#define __CUDACC__
-#include <device_functions.h>
-#else
#include <math_functions.h>
-#endif
#undef __CUDA_INTERNAL_COMPILATION__
#undef __attribute__
-
-#if CUDART_VERSION >= 3000
-#define __internal_float2int float2int
-#define __internal_float2uint float2uint
-#include <math.h>
-#define __internal_accurate_fdividef fdividef
+#else
+#define CUDA_FLOAT_MATH_FUNCTIONS
+#include "/home/taamodt/nvcuda/2.3/cuda/include/device_types.h"
+#define __CUDA_INTERNAL_COMPILATION__
+#include "/home/taamodt/nvcuda/2.3/cuda/include/math_functions.h"
+#undef __CUDA_INTERNAL_COMPILATION__
+#undef __attribute__
#endif
}