| 275 | |
| 276 | template <bool T_COMBINE_HASHES> |
| 277 | void Hashing32::HashBitImp(int64_t bit_offset, uint32_t num_keys, const uint8_t* keys, |
| 278 | uint32_t* hashes) { |
| 279 | for (uint32_t i = 0; i < num_keys; ++i) { |
| 280 | uint32_t bit = bit_util::GetBit(keys, bit_offset + i) ? 1 : 0; |
| 281 | uint32_t hash = PRIME32_1 * (1 - bit) + PRIME32_2 * bit; |
| 282 | |
| 283 | if (T_COMBINE_HASHES) { |
| 284 | hashes[i] = CombineHashesImp(hashes[i], hash); |
| 285 | } else { |
| 286 | hashes[i] = hash; |
| 287 | } |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | void Hashing32::HashBit(bool combine_hashes, int64_t bit_offset, uint32_t num_keys, |
| 292 | const uint8_t* keys, uint32_t* hashes) { |
nothing calls this directly
no test coverage detected