Skip to content

Commit

Permalink
[oneDPL][ranges][merge] support size limit for output; + fixes for st…
Browse files Browse the repository at this point in the history
…d::min usage
  • Loading branch information
MikeDvorskiy committed Nov 29, 2024
1 parent 75e133e commit 5b078ad
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ template <typename _BackendTag, typename _ExecutionPolicy, typename _Function, t
void
__pattern_walk_n(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _Function __f, _Ranges&&... __rngs)
{
auto __n = std::min({__rngs.size()...});
using _Size = std::make_unsigned_t<std::common_type_t<oneapi::dpl::__internal::__difference_t<_Ranges>...>>;
auto __n = std::min({_Size(__rngs.size())...});
if (__n > 0)
{
oneapi::dpl::__par_backend_hetero::__parallel_for(_BackendTag{}, ::std::forward<_ExecutionPolicy>(__exec),
Expand Down

0 comments on commit 5b078ad

Please sign in to comment.