summaryrefslogtreecommitdiff
path: root/src/cuda-sim/cuda-math.h
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2018-06-22 16:58:42 -0400
committerMahmoud <[email protected]>2018-06-22 16:58:42 -0400
commitc05dc90da35fc2bd9dd42da9626bf3a60e2c9e8d (patch)
tree0030cedf19a61280e979b02046b30d38deacb2e5 /src/cuda-sim/cuda-math.h
parent5adbc9c4afad276a5d8590f3c53b789003ae4dcf (diff)
parent1e1c08286a505418d0e3ad1ee819e15881e9cb43 (diff)
Merge branch 'dev-purdue-integration' of https://github.rcac.purdue.edu/abdallm/gpgpu-sim_distribution into dev-purdue-integration-trace
Diffstat (limited to 'src/cuda-sim/cuda-math.h')
-rw-r--r--src/cuda-sim/cuda-math.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cuda-sim/cuda-math.h b/src/cuda-sim/cuda-math.h
index 4721e8a..f88c526 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
@@ -321,7 +323,7 @@ float __internal_accurate_fdividef(float a, float b)
float __saturatef(float a)
{
float b;
- if (isnan(a)) b = 0.0f;
+ if (std::isnan(a)) b = 0.0f;
else if (a >= 1.0f) b = 1.0f;
else if (a <= 0.0f) b = 0.0f;
else b = a;