Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDvorskiy committed Dec 27, 2024
1 parent 42fe26d commit c9ea363
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c9ea363

Please sign in to comment.