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

Method insertForJoinWithPrefetch

bolt/exec/HashTable.cpp:1340–1373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1338template <bool ignoreNullKeys>
1339template <bool isNormailizedKeyMode>
1340FOLLY_ALWAYS_INLINE void HashTable<ignoreNullKeys>::insertForJoinWithPrefetch(
1341 char** groups,
1342 uint64_t* hashes,
1343 int32_t numGroups,
1344 TableInsertPartitionInfo* partitionInfo) {
1345 auto i = 0;
1346 ProbeState states[kPrefetchSize];
1347 constexpr int32_t kKeyOffset =
1348 -static_cast<int32_t>(sizeof(normalized_key_t));
1349 int32_t keyOffset = 0;
1350 if constexpr (isNormailizedKeyMode) {
1351 keyOffset = kKeyOffset;
1352 }
1353 for (; i + kPrefetchSize <= numGroups; i += kPrefetchSize) {
1354 for (int32_t j = 0; j < kPrefetchSize; ++j) {
1355 auto index = i + j;
1356 states[j].preProbe(*this, hashes[index], index);
1357 }
1358 for (int32_t j = 0; j < kPrefetchSize; ++j) {
1359 states[j].firstProbe(*this, keyOffset);
1360 }
1361 for (int32_t j = 0; j < kPrefetchSize; ++j) {
1362 auto index = i + j;
1363 buildFullProbe<isNormailizedKeyMode>(
1364 states[j], hashes[index], groups[index], j != 0, partitionInfo);
1365 }
1366 }
1367 for (; i < numGroups; ++i) {
1368 states[0].preProbe(*this, hashes[i], i);
1369 states[0].firstProbe(*this, keyOffset);
1370 buildFullProbe<isNormailizedKeyMode>(
1371 states[0], hashes[i], groups[i], false, partitionInfo);
1372 }
1373}
1374
1375template <bool ignoreNullKeys>
1376void HashTable<ignoreNullKeys>::insertForJoin(

Callers

nothing calls this directly

Calls 2

preProbeMethod · 0.80
firstProbeMethod · 0.80

Tested by

no test coverage detected