Fix some sign conversion warnings (#1172)

* Fix sign conversion warnings

* Fix type conversion warnings

* Fix sign conversion warnings

* Change smem_size_ to constexpr

* clang warnings

* undo cast change

* one miss change

* missing part

---------

Co-authored-by: Haicheng Wu <haichengw@nvidia.com>
This commit is contained in:
cyyever
2023-11-30 00:28:40 -05:00
committed by GitHub
co-authored by Haicheng Wu
parent 99c4eebe3b
commit 10b850f9c7
5 changed files with 22 additions and 31 deletions
+3 -3
View File
@@ -321,9 +321,9 @@ struct alignas(2) half_t {
#endif
uint16_t const &h = x.storage;
int sign = ((h >> 15) & 1);
int exp = ((h >> 10) & 0x1f);
int mantissa = (h & 0x3ff);
uint32_t sign = ((h >> 15) & 1);
uint32_t exp = ((h >> 10) & 0x1f);
uint32_t mantissa = (h & 0x3ff);
unsigned f = 0;
if (exp > 0 && exp < 31) {