MCPcopy Create free account
hub / github.com/bytedance/bolt / populateNormalizedKeys

Function populateNormalizedKeys

bolt/exec/HashTable.cpp:558–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558void 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
581template <bool ignoreNullKeys>

Callers 2

groupProbeMethod · 0.85
joinProbeMethod · 0.85

Calls 5

mixNormalizedKeyFunction · 0.85
backMethod · 0.80
resizeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected