smaller tasks

This commit is contained in:
Matthias Hochsteger 2021-05-30 18:51:10 +02:00
parent 2c72c20c87
commit 0aa63880c4
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ void BuildEdgeList( const Mesh & mesh, const Table<TINDEX, PointIndex> & element
{ { 0, 1 }, { 0, 2 }, { 0, 3 },
{ 1, 2 }, { 1, 3 }, { 2, 3 } };
int ntasks = 2*ngcore::TaskManager::GetMaxThreads();
int ntasks = 4*ngcore::TaskManager::GetMaxThreads();
Array<Array<std::tuple<PointIndex,PointIndex>>> task_edges(ntasks);
ParallelFor(IntRange(ntasks), [&] (int ti)

View File

@ -2768,7 +2768,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
candidate_edges[index] = make_tuple(d_badness, i);
}
}
});
}, TasksPerThread (4));
auto edges_with_improvement = candidate_edges.Part(0, improvement_counter.load());
QuickSort(edges_with_improvement);