Fixed: 64 bits constants truncated in 32 bits
This commit is contained in:
parent
9d7b953a12
commit
7dbf4bd3d2
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ inline uint64 wangHash64Inv(uint64 key)
|
||||||
key = key^tmp >> 28;
|
key = key^tmp >> 28;
|
||||||
|
|
||||||
// Invert key *= 21
|
// Invert key *= 21
|
||||||
key *= 14933078535860113213u;
|
key *= UINT64_CONSTANT(14933078535860113213);
|
||||||
|
|
||||||
// Invert key = key ^ (key >> 14)
|
// Invert key = key ^ (key >> 14)
|
||||||
tmp = key^key >> 14;
|
tmp = key^key >> 14;
|
||||||
|
@ -54,7 +54,7 @@ inline uint64 wangHash64Inv(uint64 key)
|
||||||
key = key^tmp >> 14;
|
key = key^tmp >> 14;
|
||||||
|
|
||||||
// Invert key *= 265
|
// Invert key *= 265
|
||||||
key *= 15244667743933553977u;
|
key *= UINT64_CONSTANT(15244667743933553977);
|
||||||
|
|
||||||
// Invert key = key ^ (key >> 24)
|
// Invert key = key ^ (key >> 24)
|
||||||
tmp = key^key >> 24;
|
tmp = key^key >> 24;
|
||||||
|
|
Loading…
Reference in a new issue