diff options
| author | Timothy G Rogers <[email protected]> | 2018-04-18 15:51:36 -0400 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2018-04-18 15:51:36 -0400 |
| commit | ddf9da221c3e14e1e4204aba3fdaa59bca917ec6 (patch) | |
| tree | b0b2c4d1720609648673b2dcefb021c0077598c6 /src/cuda-sim/cuda-math.h | |
| parent | 9217cff18ab7608ee21ad48061be8f6febf88780 (diff) | |
| parent | b61a26eb163565cce292f7a2400b5fd82f3d2d10 (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.h | 4 |
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; |
