mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
smaller tasks
This commit is contained in:
parent
2c72c20c87
commit
0aa63880c4
@ -10,7 +10,7 @@ void BuildEdgeList( const Mesh & mesh, const Table<TINDEX, PointIndex> & element
|
|||||||
{ { 0, 1 }, { 0, 2 }, { 0, 3 },
|
{ { 0, 1 }, { 0, 2 }, { 0, 3 },
|
||||||
{ 1, 2 }, { 1, 3 }, { 2, 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);
|
Array<Array<std::tuple<PointIndex,PointIndex>>> task_edges(ntasks);
|
||||||
|
|
||||||
ParallelFor(IntRange(ntasks), [&] (int ti)
|
ParallelFor(IntRange(ntasks), [&] (int ti)
|
||||||
|
@ -2768,7 +2768,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal,
|
|||||||
candidate_edges[index] = make_tuple(d_badness, i);
|
candidate_edges[index] = make_tuple(d_badness, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}, TasksPerThread (4));
|
||||||
|
|
||||||
auto edges_with_improvement = candidate_edges.Part(0, improvement_counter.load());
|
auto edges_with_improvement = candidate_edges.Part(0, improvement_counter.load());
|
||||||
QuickSort(edges_with_improvement);
|
QuickSort(edges_with_improvement);
|
||||||
|
Loading…
Reference in New Issue
Block a user