summaryrefslogtreecommitdiff
path: root/src/cuda-sim/cuda-math.h
diff options
context:
space:
mode:
authorTimothy G Rogers <[email protected]>2018-04-18 15:51:50 -0400
committerGitHub Enterprise <[email protected]>2018-04-18 15:51:50 -0400
commite97db22feb5aef9978feaae9f5c92507c73d7d96 (patch)
tree12caa122df78e40310ca7f376263b7f21dc13fa4 /src/cuda-sim/cuda-math.h
parent12f2a2c791747dc38a53553026ed8122e8e08988 (diff)
parentb61a26eb163565cce292f7a2400b5fd82f3d2d10 (diff)
Merge branch 'dev-purdue-integration' into dev-purdue-integration
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;