| 556 | } |
| 557 | |
| 558 | void populateNormalizedKeys(HashLookup& lookup, int8_t sizeBits) { |
| 559 | lookup.normalizedKeys.resize(lookup.rows.back() + 1); |
| 560 | uint64_t* __restrict hashes = lookup.hashes.data(); |
| 561 | uint64_t* __restrict keys = lookup.normalizedKeys.data(); |
| 562 | int32_t end = lookup.rows.back() + 1; |
| 563 | if (end / 4 < lookup.rows.size()) { |
| 564 | // For more than 1/4 of the positions in use, run the loop on all |
| 565 | // elements, since the loop will do 4 at a time. |
| 566 | for (auto row = 0; row < end; ++row) { |
| 567 | auto hash = hashes[row]; |
| 568 | keys[row] = hash; // NOLINT |
| 569 | hashes[row] = mixNormalizedKey(hash, sizeBits); |
| 570 | } |
| 571 | return; |
| 572 | } |
| 573 | for (auto row : lookup.rows) { |
| 574 | auto hash = hashes[row]; |
| 575 | keys[row] = hash; // NOLINT |
| 576 | hashes[row] = mixNormalizedKey(hash, sizeBits); |
| 577 | } |
| 578 | } |
| 579 | } // namespace |
| 580 | |
| 581 | template <bool ignoreNullKeys> |
no test coverage detected