diff options
| author | Timothy G Rogers <[email protected]> | 2018-04-18 15:51:17 -0400 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2018-04-18 15:51:17 -0400 |
| commit | b61a26eb163565cce292f7a2400b5fd82f3d2d10 (patch) | |
| tree | f08ab8ff85d78c9fb47b34113547c24dbbe59853 /src/cuda-sim/cuda-math.h | |
| parent | 755a3cfa1b2b1711f395702d32a927dc53bee212 (diff) | |
| parent | bc10b53407de3a947cfbec46c08b0d194799803a (diff) | |
Merge pull request #19 from green349/gcc_support
GCC 4.8.2 Support
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; |
