From 5b078adc347379cb898c462674572d714fb2f183 Mon Sep 17 00:00:00 2001 From: MikeDvorskiy Date: Fri, 29 Nov 2024 18:24:03 +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..b2ccccf3f30 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::make_unsigned_t...>>; + auto __n = std::min({_Size(__rngs.size())...}); if (__n > 0) { oneapi::dpl::__par_backend_hetero::__parallel_for(_BackendTag{}, ::std::forward<_ExecutionPolicy>(__exec),