Showing the changes to libraries/shared/src/DoubleHashKey.cpp (1 of 2 files). Show all
Unified · Split
| @@ -12,7 +12,7 @@ · 11 unmodified lines | ||
| 12 | 12 | #include "DoubleHashKey.h" |
| 13 | 13 | |
| 14 | 14 | const uint32_t NUM_PRIMES = 64; |
| 15 | −const uint32_t PRIMES[] = { | |
| 15 | +const uint32_t PRIMES[] = { | |
| 16 | 16 | 4194301U, 4194287U, 4194277U, 4194271U, 4194247U, 4194217U, 4194199U, 4194191U, |
| 17 | 17 | 4194187U, 4194181U, 4194173U, 4194167U, 4194143U, 4194137U, 4194131U, 4194107U, |
| 18 | 18 | 4194103U, 4194023U, 4194011U, 4194007U, 4193977U, 4193971U, 4193963U, 4193957U, |
| @@ -27,8 +27,8 @@ uint32_t DoubleHashKey::hashFunction(uint32_t value, uint32_t primeIndex) { · 8 unmodified lines | ||
| 27 | 27 | uint32_t hash = PRIMES[primeIndex % NUM_PRIMES] * (value + 1U); |
| 28 | 28 | hash += ~(hash << 15); |
| 29 | 29 | hash ^= (hash >> 10); |
| 30 | − hash += (hash << 3); | |
| 31 | − hash ^= (hash >> 6); | |
| 30 | + hash += (hash << 3); | |
| 31 | + hash ^= (hash >> 6); | |
| 32 | 32 | hash += ~(hash << 11); |
| 33 | 33 | return hash ^ (hash >> 16); |
| 34 | 34 | } |