File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
dpctl/tensor/libtensor/include/kernels/sorting Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,9 @@ topk_full_merge_sort_impl(sycl::queue &exec_q,
145
145
std::size_t src_idx = iter_gid * axis_nelems + axis_gid;
146
146
std::size_t dst_idx = iter_gid * k + axis_gid;
147
147
148
- auto res_ind = index_data[src_idx];
149
- vals_tp[dst_idx] = arg_tp[res_ind];
148
+ const IndexTy res_ind = index_data[src_idx];
149
+ const argTy v = arg_tp[res_ind];
150
+ vals_tp[dst_idx] = v;
150
151
inds_tp[dst_idx] = res_ind % axis_nelems;
151
152
});
152
153
});
@@ -418,8 +419,9 @@ sycl::event topk_merge_impl(
418
419
const std::size_t src_idx = iter_gid * alloc_len + axis_gid;
419
420
const std::size_t dst_idx = gid;
420
421
421
- const auto res_ind = index_data[src_idx];
422
- vals_tp[dst_idx] = arg_tp[res_ind];
422
+ const IndexTy res_ind = index_data[src_idx];
423
+ const argTy v = arg_tp[res_ind];
424
+ vals_tp[dst_idx] = v;
423
425
inds_tp[dst_idx] = (res_ind % axis_nelems);
424
426
});
425
427
});
@@ -528,7 +530,8 @@ sycl::event topk_radix_impl(sycl::queue &exec_q,
528
530
const std::size_t dst_idx = gid;
529
531
530
532
const IndexTy res_ind = tmp_tp[src_idx];
531
- vals_tp[dst_idx] = arg_tp[res_ind];
533
+ const argTy v = arg_tp[res_ind];
534
+ vals_tp[dst_idx] = v;
532
535
inds_tp[dst_idx] = (res_ind % axis_nelems);
533
536
});
534
537
});
You can’t perform that action at this time.
0 commit comments