smaller tasks

This commit is contained in:
Matthias Hochsteger 2021-05-30 18:50:53 +02:00
parent 1045f68b97
commit 2c72c20c87

View File

@ -2371,7 +2371,7 @@ namespace netgen
*/ */
size_t numtasks = ngcore::TaskManager::GetNumThreads(); size_t numtasks = 4*ngcore::TaskManager::GetNumThreads();
Array<Array<Element2d>> thread_openelements(numtasks); Array<Array<Element2d>> thread_openelements(numtasks);
ParallelJob ParallelJob
( [&](TaskInfo & ti) ( [&](TaskInfo & ti)
@ -2496,7 +2496,7 @@ namespace netgen
thread_openelements[ti.task_nr].Append (tri); thread_openelements[ti.task_nr].Append (tri);
} }
} }
}}); }}, numtasks);
for (auto & a : thread_openelements) for (auto & a : thread_openelements)
for (auto & el : a) for (auto & el : a)