@@ -67,8 +67,8 @@ struct GetValueType<sycl::multi_ptr<ElementType, Space>> {
67
67
using type = ElementType;
68
68
};
69
69
70
- // since we couldn't assign data to raw memory, it's better to use placement for
71
- // first assignment
70
+ // since we couldn't assign data to raw memory, it's better to use placement
71
+ // for first assignment
72
72
template <typename Acc, typename T>
73
73
void set_value (Acc ptr, const std::size_t idx, const T &val, bool is_first) {
74
74
if (is_first) {
@@ -97,8 +97,8 @@ void merge(const std::size_t offset, InAcc &in_acc1, OutAcc &out_acc1,
97
97
const std::size_t local_size_1 = local_end_1 - local_start_1;
98
98
const std::size_t local_size_2 = local_end_2 - local_start_2;
99
99
100
- // TODO: process cases where all elements of 1st sequence > 2nd, 2nd > 1st to
101
- // improve performance
100
+ // TODO: process cases where all elements of 1st sequence > 2nd, 2nd > 1st
101
+ // to improve performance
102
102
103
103
// Process 1st sequence
104
104
if (local_start_1 < local_end_1) {
@@ -204,7 +204,7 @@ void merge_sort(Group group, Iter first, const std::size_t n, Compare comp,
204
204
std::byte *scratch) {
205
205
using T = typename GetValueType<Iter>::type;
206
206
auto id = sycl::detail::Builder::getNDItem<Group::dimensions>();
207
- const std::size_t idx = id.get_local_id ();
207
+ const std::size_t idx = id.get_local_linear_id ();
208
208
const std::size_t local = group.get_local_range ().size ();
209
209
const std::size_t chunk = (n - 1 ) / local + 1 ;
210
210
0 commit comments