From 7673c01e4627ea531d165a958bbf7323b8c45553 Mon Sep 17 00:00:00 2001 From: Adam Fidel Date: Fri, 30 Aug 2024 12:56:50 -0700 Subject: [PATCH] Fix return type of transform scan / copy if patterns --- include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h | 2 +- include/oneapi/dpl/pstl/hetero/numeric_ranges_impl_hetero.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 1fd7c4dd48a..aa505d74585 100644 --- a/include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h +++ b/include/oneapi/dpl/pstl/hetero/algorithm_ranges_impl_hetero.h @@ -386,7 +386,7 @@ oneapi::dpl::__internal::__difference_t<_Range2> __pattern_copy_if(__hetero_tag<_BackendTag> __tag, _ExecutionPolicy&& __exec, _Range1&& __rng1, _Range2&& __rng2, _Predicate __pred, _Assign __assign) { - oneapi::dpl::__internal::__difference_t<_Range1> __n = __rng1.size(); + oneapi::dpl::__internal::__difference_t<_Range2> __n = __rng1.size(); if (__n == 0) return 0; diff --git a/include/oneapi/dpl/pstl/hetero/numeric_ranges_impl_hetero.h b/include/oneapi/dpl/pstl/hetero/numeric_ranges_impl_hetero.h index e00a89441f2..1c7d16ea183 100644 --- a/include/oneapi/dpl/pstl/hetero/numeric_ranges_impl_hetero.h +++ b/include/oneapi/dpl/pstl/hetero/numeric_ranges_impl_hetero.h @@ -91,7 +91,7 @@ oneapi::dpl::__internal::__difference_t<_Range2> __pattern_transform_scan_base(__hetero_tag<_BackendTag>, _ExecutionPolicy&& __exec, _Range1&& __rng1, _Range2&& __rng2, _UnaryOperation __unary_op, _InitType __init, _BinaryOperation __binary_op, _Inclusive) { - oneapi::dpl::__internal::__difference_t<_Range1> __n = __rng1.size(); + oneapi::dpl::__internal::__difference_t<_Range2> __n = __rng1.size(); if (__n == 0) return 0;