summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
authortgrogers <[email protected]>2018-05-04 12:04:19 -0400
committertgrogers <[email protected]>2018-05-09 10:59:25 -0400
commit6ff157a4ec13e33dc69856de33a7690afa408f6d (patch)
treefb724fceb9d11b0f9e482558ed5aac71bbeb0b3e /src/cuda-sim
parent32c6dd57e03987bec0e144efc86c08938c4f1460 (diff)
Getting the simulator to compile with older versions of g++
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/cuda-math.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cuda-sim/cuda-math.h b/src/cuda-sim/cuda-math.h
index a3db0df..afac330 100644
--- a/src/cuda-sim/cuda-math.h
+++ b/src/cuda-sim/cuda-math.h
@@ -67,6 +67,8 @@
#ifndef CUDA_MATH
#define CUDA_MATH
+#include <cmath>
+
// cuda math implementations
#undef max
#undef min
@@ -148,6 +150,7 @@ float __ll2float_rd(long long int a) {
#include <device_types.h>
#include <fenv.h>
+
// 32-bit integer to float
float __int2float_rn(int a) {
int orig_rnd_mode = fegetround();