| 299 | |
| 300 | template <bool T_COMBINE_HASHES, typename T> |
| 301 | void Hashing32::HashIntImp(uint32_t num_keys, const T* keys, uint32_t* hashes) { |
| 302 | constexpr uint64_t multiplier = 11400714785074694791ULL; |
| 303 | for (uint32_t ikey = 0; ikey < num_keys; ++ikey) { |
| 304 | uint64_t x = static_cast<uint64_t>(keys[ikey]); |
| 305 | uint32_t hash = static_cast<uint32_t>(BYTESWAP(x * multiplier)); |
| 306 | |
| 307 | if (T_COMBINE_HASHES) { |
| 308 | hashes[ikey] = CombineHashesImp(hashes[ikey], hash); |
| 309 | } else { |
| 310 | hashes[ikey] = hash; |
| 311 | } |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | void Hashing32::HashInt(bool combine_hashes, uint32_t num_keys, uint64_t key_length, |
| 316 | const uint8_t* keys, uint32_t* hashes) { |
nothing calls this directly
no test coverage detected