| 400 | } |
| 401 | |
| 402 | pos_t Hashjoin::joinSel() { |
| 403 | size_t found = 0; |
| 404 | // perform continuation |
| 405 | for (auto entry = cont.buildMatch; entry != shared.ht.end(); entry = entry->next) { |
| 406 | if (entry->hash == cont.probeHash) { |
| 407 | buildMatches[found] = entry; |
| 408 | probeMatches[found++] = probeSel[cont.nextProbe]; |
| 409 | if (found == batchSize) { |
| 410 | // output buffers are full, save state for continuation |
| 411 | cont.buildMatch = entry->next; |
| 412 | return batchSize; |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | if (cont.buildMatch != shared.ht.end()) cont.nextProbe++; |
| 417 | for (size_t i = cont.nextProbe, end = cont.numProbes; i < end; ++i) { |
| 418 | auto hash = probeHashes[i]; |
| 419 | for (auto entry = shared.ht.find_chain_tagged(hash); entry != shared.ht.end(); entry = entry->next) { |
| 420 | if (entry->hash == hash) { |
| 421 | buildMatches[found] = entry; |
| 422 | probeMatches[found++] = probeSel[i]; |
| 423 | if (found == batchSize && (entry->next || i + 1 < end)) { |
| 424 | // output buffers are full, save state for continuation |
| 425 | cont.buildMatch = entry->next; |
| 426 | cont.probeHash = hash; |
| 427 | cont.nextProbe = i; |
| 428 | return batchSize; |
| 429 | } |
| 430 | } |
| 431 | } |
| 432 | } |
| 433 | cont.buildMatch = shared.ht.end(); |
| 434 | cont.nextProbe = cont.numProbes; |
| 435 | return found; |
| 436 | } |
| 437 | |
| 438 | pos_t Hashjoin::joinSelParallel() { |
| 439 | size_t found = 0; |
nothing calls this directly
no test coverage detected