From: Wolfgang Bangerth Date: Sun, 2 Jul 2023 21:17:06 +0000 (-0600) Subject: Add sequential parallel_for. X-Git-Tag: relicensing~765^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b6c1f41ad314cd86f2f07527487a2009c0ad936;p=dealii.git Add sequential parallel_for. --- diff --git a/include/deal.II/base/parallel.h b/include/deal.II/base/parallel.h index ee85ca2ed0..bbf6eeb354 100644 --- a/include/deal.II/base/parallel.h +++ b/include/deal.II/base/parallel.h @@ -34,6 +34,8 @@ # include # include # include +#else +# include #endif #ifdef DEAL_II_HAVE_CXX20 @@ -106,6 +108,22 @@ namespace parallel functor, *partitioner); } + +#else + + /** + * Just execute things sequentially. + */ + template + void + parallel_for(Iterator x_begin, + Iterator x_end, + const Functor &functor, + const unsigned int) + { + functor(boost::iterator_range(x_begin, x_end)); + } + #endif } // namespace internal