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

Method joinNormalizedKeyProbe

bolt/exec/HashTable.cpp:807–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805
806template <bool ignoreNullKeys>
807void HashTable<ignoreNullKeys>::joinNormalizedKeyProbe(HashLookup& lookup) {
808 int32_t probeIndex = 0;
809 int32_t numProbes = lookup.rows.size();
810 const vector_size_t* rows = lookup.rows.data();
811 ProbeState states[kPrefetchSize];
812 const uint64_t* keys = lookup.normalizedKeys.data();
813 const uint64_t* hashes = lookup.hashes.data();
814 char** hits = lookup.hits.data();
815 constexpr int32_t kKeyOffset =
816 -static_cast<int32_t>(sizeof(normalized_key_t));
817 for (; probeIndex + kPrefetchSize <= numProbes; probeIndex += kPrefetchSize) {
818 for (int32_t i = 0; i < kPrefetchSize; ++i) {
819 int32_t row = rows[probeIndex + i];
820 states[i].preProbe(*this, hashes[row], row);
821 }
822 for (int32_t i = 0; i < kPrefetchSize; ++i) {
823 states[i].firstProbe(*this, kKeyOffset);
824 }
825 for (int32_t i = 0; i < kPrefetchSize; ++i) {
826 hits[states[i].row()] = states[i].joinNormalizedKeyFullProbe(*this, keys);
827 }
828 }
829 for (; probeIndex < numProbes; ++probeIndex) {
830 int32_t row = rows[probeIndex];
831 states[0].preProbe(*this, lookup.hashes[row], row);
832 states[0].firstProbe(*this, 0);
833 hits[row] = states[0].joinNormalizedKeyFullProbe(*this, keys);
834 }
835}
836
837template <bool ignoreNullKeys>
838void HashTable<ignoreNullKeys>::allocateTables(uint64_t size) {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected