From: Wolfgang Bangerth Date: Sat, 10 Mar 2018 05:47:10 +0000 (-0700) Subject: Run the computation of projections from children in parallel. X-Git-Tag: v9.0.0-rc1~324^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6023%2Fhead;p=dealii.git Run the computation of projections from children in parallel. --- 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(); }