From 3f648a7874c5f3492ea9cf99ba861f7bf17cff5b Mon Sep 17 00:00:00 2001 From: MikeDvorskiy Date: Fri, 29 Nov 2024 17:57:55 +0100 Subject: [PATCH] [oneDPL][ranges][merge] support size limit for output; + fixes for std::min usage --- include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h b/include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h index a6654897420..ad88fcf45af 100644 --- a/include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h +++ b/include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h @@ -54,7 +54,8 @@ template , _ExecutionPolicy&& __exec, _Function __f, _Ranges&&... __rngs) { - auto __n = std::min({__rngs.size()...}); + using _Size = std::common_type_t...>; + auto __n = std::min<_Size>({__rngs.size()...}); if (__n > 0) { oneapi::dpl::__par_backend_hetero::__parallel_for(_BackendTag{}, ::std::forward<_ExecutionPolicy>(__exec),