diff options
| author | Mahmoud <[email protected]> | 2018-05-15 20:03:45 -0400 |
|---|---|---|
| committer | Mahmoud <[email protected]> | 2018-05-15 20:03:45 -0400 |
| commit | a25caee6acbd801b055bdb1136b55ba09daff49b (patch) | |
| tree | 720cb17bdc3ec5f86de9231ea53c74c56d485317 /src/cuda-sim/cuda-math.h | |
| parent | e06cd8efa02bf54f4788b0655930c9c6c0e12311 (diff) | |
| parent | ddf9da221c3e14e1e4204aba3fdaa59bca917ec6 (diff) | |
Merge branch 'dev-purdue-integration' of https://github.rcac.purdue.edu/abdallm/gpgpu-sim_distribution 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; |
