Skip to content

Commit

Permalink
Merge pull request #2313 from quentin/loadbalance
Browse files Browse the repository at this point in the history
Improve parallel load balance in the interpreter.
  • Loading branch information
Bernhard Scholz authored Sep 29, 2022
2 parents 0b4172e + ba99149 commit 7b84887
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/interpreter/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@ RamDomain Engine::evalParallelScan(
const Rel& rel, const ram::ParallelScan& cur, const ParallelScan& shadow, Context& ctxt) {
auto viewContext = shadow.getViewContext();

auto pStream = rel.partitionScan(numOfThreads);
auto pStream = rel.partitionScan(numOfThreads * 20);

PARALLEL_START
Context newCtxt(ctxt);
Expand Down Expand Up @@ -1709,7 +1709,7 @@ RamDomain Engine::evalParallelIndexScan(
CAL_SEARCH_BOUND(superInfo, low, high);

std::size_t indexPos = shadow.getViewId();
auto pStream = rel.partitionRange(indexPos, low, high, numOfThreads);
auto pStream = rel.partitionRange(indexPos, low, high, numOfThreads * 20);
PARALLEL_START
Context newCtxt(ctxt);
auto viewInfo = viewContext->getViewInfoForNested();
Expand Down Expand Up @@ -1754,7 +1754,7 @@ RamDomain Engine::evalParallelIfExists(
const Rel& rel, const ram::ParallelIfExists& cur, const ParallelIfExists& shadow, Context& ctxt) {
auto viewContext = shadow.getViewContext();

auto pStream = rel.partitionScan(numOfThreads);
auto pStream = rel.partitionScan(numOfThreads * 20);
auto viewInfo = viewContext->getViewInfoForNested();
PARALLEL_START
Context newCtxt(ctxt);
Expand Down Expand Up @@ -1818,7 +1818,7 @@ RamDomain Engine::evalParallelIndexIfExists(const Rel& rel, const ram::ParallelI
CAL_SEARCH_BOUND(superInfo, low, high);

std::size_t indexPos = shadow.getViewId();
auto pStream = rel.partitionRange(indexPos, low, high, numOfThreads);
auto pStream = rel.partitionRange(indexPos, low, high, numOfThreads * 20);

PARALLEL_START
Context newCtxt(ctxt);
Expand Down

0 comments on commit 7b84887

Please sign in to comment.