| 434 | |
| 435 | template<bool use32> struct _hash_32_or_64 { |
| 436 | static inline std::uint32_t hash(std::uint32_t h) |
| 437 | { |
| 438 | // MurmurHash3 finalizer -- see https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp |
| 439 | // Since the thread ID is already unique, all we really want to do is propagate that |
| 440 | // uniqueness evenly across all the bits, so that we can use a subset of the bits while |
| 441 | // reducing collisions significantly |
| 442 | h ^= h >> 16; |
| 443 | h *= 0x85ebca6b; |
| 444 | h ^= h >> 13; |
| 445 | h *= 0xc2b2ae35; |
| 446 | return h ^ (h >> 16); |
| 447 | } |
| 448 | }; |
| 449 | template<> struct _hash_32_or_64<1> { |
| 450 | static inline std::uint64_t hash(std::uint64_t h) |
no outgoing calls
no test coverage detected