Skip to content

Commit 49c2bee

Browse files
committed
Users control activity of default tapes.
Their activity should match the one of the encountering task's tape.
1 parent 0f37b41 commit 49c2bee

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

include/opdi/logic/omp/implicitTaskOmpLogic.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,10 @@ void* opdi::ImplicitTaskOmpLogic::onImplicitTaskBegin(bool isInitialImplicitTask
106106
}
107107

108108
if (tool->comparePosition(oldTapePosition, referencePosition) > 0) {
109-
// appending to new tape depends on activity
110-
if (parallelData->isActiveParallelRegion) {
111-
tool->append(newTape, implicitTaskData->oldTape, referencePosition, oldTapePosition);
112-
}
113-
// erasing on old tape does not (non-primary threads have active default tapes to not miss such copies)
109+
// users should ensure that activity of default tapes and encountering task's tape match
110+
assert(parallelData->isActiveParallelRegion);
111+
112+
tool->append(newTape, implicitTaskData->oldTape, referencePosition, oldTapePosition);
114113
tool->erase(implicitTaskData->oldTape, referencePosition, oldTapePosition);
115114
}
116115

0 commit comments

Comments
 (0)