From e9999835f1f14b31a6e39a553787a7c2b2671ddd Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 9 Mar 2018 22:47:10 -0700 Subject: [PATCH] Run the computation of projections from children in parallel. --- include/deal.II/fe/fe_tools.templates.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index a931c07b46..cb433bea45 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -2254,13 +2254,14 @@ namespace FETools // finally loop over all possible refinement cases + Threads::TaskGroup<> tasks; unsigned int ref_case = (isotropic_only) ? RefinementCase::isotropic_refinement : RefinementCase::cut_x; for (; ref_case <= RefinementCase::isotropic_refinement; ++ref_case) - { - compute_one_case (ref_case, mass, matrices[ref_case-1]); - } + tasks += Threads::new_task ([ &,ref_case]() { compute_one_case(ref_case, mass, matrices[ref_case-1]); }); + + tasks.join_all(); } -- 2.39.5