----------------------------------------------------------------------------- Fast, cheap 32-bit integer hash (Thomas Wang) -----------------------------------------------------------------------------
| 79 | // Fast, cheap 32-bit integer hash (Thomas Wang) |
| 80 | //----------------------------------------------------------------------------- |
| 81 | static inline u32 fast_hash32(u32 x) FL_NOEXCEPT { |
| 82 | x = (x ^ 61u) ^ (x >> 16); |
| 83 | x = x + (x << 3); |
| 84 | x = x ^ (x >> 4); |
| 85 | x = x * 0x27d4eb2dU; |
| 86 | x = x ^ (x >> 15); |
| 87 | return x; |
| 88 | } |
| 89 | |
| 90 | // 3) Handy two-word hasher |
| 91 | static inline u32 hash_pair(u32 a, u32 b, |
no outgoing calls
no test coverage detected