From 546fdb5805d6fcd9d3cca3cf349c27a73529a13e Mon Sep 17 00:00:00 2001 From: Dmitriy Sobolev Date: Tue, 6 Aug 2024 12:58:05 -0500 Subject: [PATCH] Minor simplification Signed-off-by: Dmitriy Sobolev --- .../pstl/hetero/dpcpp/parallel_backend_sycl_merge_sort.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge_sort.h b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge_sort.h index f9be116e0b6..2dcd2ca23f1 100644 --- a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge_sort.h +++ b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge_sort.h @@ -270,8 +270,8 @@ struct __parallel_sort_submitter<_IdType, __internal::__optional_kernel_name<_Le if (__data_in_temp) { - const auto& __rng1 = oneapi::dpl::__ranges::drop_view_simple(__dst, __offset); - const auto& __rng2 = oneapi::dpl::__ranges::drop_view_simple(__dst, __offset + __n1); + const oneapi::dpl::__ranges::drop_view_simple __rng1(__dst, __offset); + const oneapi::dpl::__ranges::drop_view_simple __rng2(__dst, __offset + __n1); const auto start = __find_start_point(__rng1, __rng2, __i_elem_local, __n1, __n2, __comp); __serial_merge(__rng1, __rng2, __rng /*__rng3*/, start.first, start.second, __i_elem, @@ -279,8 +279,8 @@ struct __parallel_sort_submitter<_IdType, __internal::__optional_kernel_name<_Le } else { - const auto& __rng1 = oneapi::dpl::__ranges::drop_view_simple(__rng, __offset); - const auto& __rng2 = oneapi::dpl::__ranges::drop_view_simple(__rng, __offset + __n1); + const oneapi::dpl::__ranges::drop_view_simple __rng1(__rng, __offset); + const oneapi::dpl::__ranges::drop_view_simple __rng2(__rng, __offset + __n1); const auto start = __find_start_point(__rng1, __rng2, __i_elem_local, __n1, __n2, __comp); __serial_merge(__rng1, __rng2, __dst /*__rng3*/, start.first, start.second, __i_elem,