Commit e5844832 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

New OpenMP parallelization mode.

parent fa6432f0
......@@ -620,6 +620,7 @@ namespace AMDiS {
{
FUNCNAME("ProblemVec::buildAfterCoarsen()");
// printOpenmpTraverseInfo(this, true);
// buildAfterCoarsen_sebastianMode(adaptInfo, flag);
clock_t first = clock();
......@@ -1183,7 +1184,7 @@ namespace AMDiS {
const BasisFunction *basisFcts = feSpace->getBasisFcts();
#ifdef _OPENMP
TraverseParallelStack stack;
TraverseParallelStack stack(0, 1);
#else
TraverseStack stack;
#endif
......
......@@ -47,8 +47,13 @@ namespace AMDiS {
if (parallelMode == 0) {
return stacks[omp_get_thread_num()]->traverseNext(elInfoOld);
} else {
}
ElInfo *elInfo = stacks[omp_get_thread_num()]->traverseNext(elInfoOld);
while (elInfo &&
elInfo->getElement()->getIndex() % nThreads != omp_get_thread_num()) {
elInfo = stacks[omp_get_thread_num()]->traverseNext(elInfo);
}
return elInfo;
}
}
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment