From: Matthias Maier Date: Thu, 6 Jan 2022 13:13:41 +0000 (-0600) Subject: port workstream.h to oneAPI X-Git-Tag: v9.3.3~5^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eee25a6bcd527dbd0ded082033405def3026806;p=dealii.git port workstream.h to oneAPI --- diff --git a/include/deal.II/base/work_stream.h b/include/deal.II/base/work_stream.h index 8ff38fe85a..36f37ef888 100644 --- a/include/deal.II/base/work_stream.h +++ b/include/deal.II/base/work_stream.h @@ -491,7 +491,12 @@ namespace WorkStream sample_scratch_data, sample_copy_data); auto tbb_item_stream_filter = tbb::make_filter( - tbb::filter::serial, [&](tbb::flow_control &fc) -> ItemType * { +# ifdef DEAL_II_TBB_WITH_ONEAPI + tbb::filter_mode::serial_in_order, +# else + tbb::filter::serial, +# endif + [&](tbb::flow_control &fc) -> ItemType * { if (const auto item = iterator_range_to_item_stream.get_item()) return item; else @@ -502,7 +507,11 @@ namespace WorkStream }); auto tbb_worker_filter = tbb::make_filter( +# ifdef DEAL_II_TBB_WITH_ONEAPI + tbb::filter_mode::parallel, +# else tbb::filter::parallel, +# endif [worker = std::function( worker), @@ -589,7 +598,11 @@ namespace WorkStream }); auto tbb_copier_filter = tbb::make_filter( +# ifdef DEAL_II_TBB_WITH_ONEAPI + tbb::filter_mode::serial_in_order, +# else tbb::filter::serial, +# endif [copier = std::function(copier)]( ItemType *current_item) { if (copier)