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=e9999835f1f14b31a6e39a553787a7c2b2671ddd;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(); }