summaryrefslogtreecommitdiff
path: root/src/cuda-sim/half.h
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2019-09-12 18:33:13 -0400
committerMahmoud <[email protected]>2019-09-12 18:33:13 -0400
commit688044e9f7a9aef0a63a9610b496baafd886c556 (patch)
tree3abff089e87ed1ee72fa3227321af10b046bdf16 /src/cuda-sim/half.h
parent7d1a848b4807aa1f8ed2bb0478f0a53bf09dcee7 (diff)
parentbea40c4a22a86fddbf1f7845265697716727f8b1 (diff)
Merge branch 'dev' of https://github.com/purdue-aalp/gpgpu-sim_distribution into dev-private
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);