From c9ea3634911eca9c5fa8a9cfbfe1308b6763ed92 Mon Sep 17 00:00:00 2001 From: MikeDvorskiy Date: Fri, 27 Dec 2024 17:48:12 +0100 Subject: [PATCH] ++ --- .../dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h index e53d2938e3..9f7d7203e2 100644 --- a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h +++ b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h @@ -193,7 +193,7 @@ struct __parallel_merge_submitter<_IdType, __internal::__optional_kernel_name<_N auto __p_res_storage = new __result_and_scratch_storage_t(__exec, 1, 0); // Save the raw pointer into a shared_ptr to return it in __future and extend the lifetime of the storage. - std::shared_ptr<__result_and_scratch_storage_base> __p_result_base(__p_res_storage); + std::shared_ptr<__result_and_scratch_storage_base<__res_idx_t>> __p_result_base(__p_res_storage); auto __event = __exec.queue().submit( [&__rng1, &__rng2, &__rng3, __p_res_storage, __comp, __chunk, __steps, __n, __n1, __n2](sycl::handler& __cgh) { @@ -359,13 +359,14 @@ struct __parallel_merge_submitter_large<_IdType, _CustomName, const nd_range_params __nd_range_params = eval_nd_range_params(__exec, __rng1, __rng2); // Create storage to save split-points on each base diagonal + 1 (for the right base diagonal in the last work-group) + using __val_t = split_point_t<_IdType>; auto __p_base_diagonals_sp_global_storage = new __result_and_scratch_storage<_ExecutionPolicy, _split_point_t<_IdType>>( __exec, 0, __nd_range_params.base_diag_count + 1); // Save the raw pointer into a shared_ptr to return it in __future and extend the lifetime of the storage. - std::shared_ptr<__result_and_scratch_storage_base> __p_result_and_scratch_storage_base( - static_cast<__result_and_scratch_storage_base*>(__p_base_diagonals_sp_global_storage)); + std::shared_ptr<__result_and_scratch_storage_base<__val_t>> __p_result_and_scratch_storage_base( + static_cast<__result_and_scratch_storage_base<__val_t>*>(__p_base_diagonals_sp_global_storage)); // Find split-points on the base diagonals sycl::event __event = eval_split_points_for_groups(__exec, __rng1, __rng2, __comp, __nd_range_params,