Skip to content

Commit

Permalink
Correct setup of parallel regions
Browse files Browse the repository at this point in the history
  • Loading branch information
joka921 committed Jul 31, 2020
1 parent aff86ae commit 77ac78d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engine/CountAvailablePredicates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ void CountAvailablePredicates::computePatternTrick(
// the number of predicates counted without patterns
size_t numListPredicates = 0;

#pragma omp taskloop grainsize(50000) default(none) reduction(MergeHashmapsId:predicateCounts) reduction(MergeHashmapsSizeT : patternCounts) \
#pragma omp parallel
#pragma omp single
#pragma omp taskloop grainsize(500000) default(none) reduction(MergeHashmapsId:predicateCounts) reduction(MergeHashmapsSizeT : patternCounts) \
reduction(+ : numEntitiesWithPatterns) reduction(+: numPatternPredicates) reduction(+: numListPredicates) shared(input, subjectColumn, hasPattern, hasPredicate)
for (size_t inputIdx = 0; inputIdx < input.size(); ++inputIdx) {
// Skip over elements with the same subject (don't count them twice)
Expand Down

0 comments on commit 77ac78d

Please sign in to comment.