summaryrefslogtreecommitdiff
path: root/src/cuda-sim/half.h
diff options
context:
space:
mode:
authorNick <[email protected]>2019-08-29 14:18:26 -0400
committerNick <[email protected]>2019-08-29 14:18:26 -0400
commit13b2410ef3f178e7adb7d7b1d634648e6be37715 (patch)
tree491d643ccb4ba78d4b6a90b0da186dada7c94018 /src/cuda-sim/half.h
parent403a5e7e77641f3c95bc26e29199b3a27fbf8f98 (diff)
Fix a few ambiguity warning
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);