summaryrefslogtreecommitdiff
path: root/src/cuda-sim/half.h
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2019-09-12 18:30:18 -0400
committerMahmoud <[email protected]>2019-09-12 18:30:18 -0400
commit5753f2236b73be3e2a1a49a55fc5c52310eba622 (patch)
treec30d62bb70f62a7930f4fa0763c219b103b622d3 /src/cuda-sim/half.h
parent6ce5e06d2389cad5041b495d5516b503ec7d2cd2 (diff)
parentbea40c4a22a86fddbf1f7845265697716727f8b1 (diff)
Merge branch 'dev' of https://github.com/purdue-aalp/gpgpu-sim_distribution into dev-traces
Diffstat (limited to 'src/cuda-sim/half.h')
-rw-r--r--src/cuda-sim/half.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cuda-sim/half.h b/src/cuda-sim/half.h
index 8f1a8eb..9f74bb7 100644
--- a/src/cuda-sim/half.h
+++ b/src/cuda-sim/half.h
@@ -642,10 +642,10 @@ namespace half_float
if(exp > 16)
{
if(R == std::round_toward_infinity)
- return hbits | 0x7C00 - (hbits>>15);
+ return hbits | (0x7C00 - (hbits>>15));
else if(R == std::round_toward_neg_infinity)
- return hbits | 0x7BFF + (hbits>>15);
- return hbits | 0x7BFF + (R!=std::round_toward_zero);
+ return hbits | (0x7BFF + (hbits>>15));
+ return hbits | (0x7BFF + (R!=std::round_toward_zero));
}
if(exp < -13)
value = std::ldexp(value, 24);