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

Method groupNormalizedKeyProbe

bolt/exec/HashTable.cpp:633–667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

631
632template <bool ignoreNullKeys>
633void HashTable<ignoreNullKeys>::groupNormalizedKeyProbe(HashLookup& lookup) {
634 ProbeState state1;
635 ProbeState state2;
636 ProbeState state3;
637 ProbeState state4;
638 int32_t probeIndex = 0;
639 int32_t numProbes = lookup.rows.size();
640 auto rows = lookup.rows.data();
641 constexpr int32_t kKeyOffset =
642 -static_cast<int32_t>(sizeof(normalized_key_t));
643 for (; probeIndex + 4 <= numProbes; probeIndex += 4) {
644 int32_t row = rows[probeIndex];
645 state1.preProbe(*this, lookup.hashes[row], row);
646 row = rows[probeIndex + 1];
647 state2.preProbe(*this, lookup.hashes[row], row);
648 row = rows[probeIndex + 2];
649 state3.preProbe(*this, lookup.hashes[row], row);
650 row = rows[probeIndex + 3];
651 state4.preProbe(*this, lookup.hashes[row], row);
652 state1.firstProbe<ProbeState::Operation::kInsert>(*this, kKeyOffset);
653 state2.firstProbe<ProbeState::Operation::kInsert>(*this, kKeyOffset);
654 state3.firstProbe<ProbeState::Operation::kInsert>(*this, kKeyOffset);
655 state4.firstProbe<ProbeState::Operation::kInsert>(*this, kKeyOffset);
656 fullProbe<false, true>(lookup, state1, false);
657 fullProbe<false, true>(lookup, state2, true);
658 fullProbe<false, true>(lookup, state3, true);
659 fullProbe<false, true>(lookup, state4, true);
660 }
661 for (; probeIndex < numProbes; ++probeIndex) {
662 int32_t row = rows[probeIndex];
663 state1.preProbe(*this, lookup.hashes[row], row);
664 state1.firstProbe(*this, kKeyOffset);
665 fullProbe<false, true>(lookup, state1, false);
666 }
667}
668
669template <bool ignoreNullKeys>
670void HashTable<ignoreNullKeys>::joinProbe(HashLookup& lookup) {

Callers

nothing calls this directly

Calls 4

preProbeMethod · 0.80
firstProbeMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected