Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit d268910

Browse files
[SYCL][ESIMD] Removing warning messages from deprecated definitions (#340)
* [SYCL][ESIMD] Removing warning messages from deprecated definitions - 'format' -> 'bit_cast_view' - 'ESIMD_*_ENABLE' -> 'rgba_channel_mask::*' - 'ATOMIC_' -> 'atomic_op::' - 'ESIMD_BARRIER_' -> 'split_barrier_action::'
1 parent b5ea11e commit d268910

25 files changed

+96
-99
lines changed

SYCL/ESIMD/BitonicSortK.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ bitonic_exchange4(simd<uint32_t, BASE_SZ> A, simd<ushort, 32> flip) {
167167
simd<uint32_t, BASE_SZ> B;
168168
#pragma unroll
169169
for (int i = 0; i < BASE_SZ; i += 32) {
170-
auto MA = A.select<32, 1>(i).format<uint32_t, 4, 8>();
171-
auto MB = B.select<32, 1>(i).format<uint32_t, 4, 8>();
170+
auto MA = A.select<32, 1>(i).bit_cast_view<uint32_t, 4, 8>();
171+
auto MB = B.select<32, 1>(i).bit_cast_view<uint32_t, 4, 8>();
172172
MB.select<4, 1, 4, 1>(0, 0) = MA.select<4, 1, 4, 1>(0, 4);
173173
MB.select<4, 1, 4, 1>(0, 4) = MA.select<4, 1, 4, 1>(0, 0);
174174
B.select<32, 1>(i).merge(A.select<32, 1>(i),
@@ -196,8 +196,8 @@ bitonic_exchange2(simd<uint32_t, BASE_SZ> A, simd<ushort, 32> flip) {
196196
simd<uint32_t, BASE_SZ> B;
197197
#pragma unroll
198198
for (int i = 0; i < BASE_SZ; i += 32) {
199-
auto MB = B.select<32, 1>(i).format<long long, 4, 4>();
200-
auto MA = A.select<32, 1>(i).format<long long, 4, 4>();
199+
auto MB = B.select<32, 1>(i).bit_cast_view<long long, 4, 4>();
200+
auto MA = A.select<32, 1>(i).bit_cast_view<long long, 4, 4>();
201201
MB.select<4, 1, 2, 2>(0, 0) = MA.select<4, 1, 2, 2>(0, 1);
202202
MB.select<4, 1, 2, 2>(0, 1) = MA.select<4, 1, 2, 2>(0, 0);
203203
B.select<32, 1>(i).merge(A.select<32, 1>(i),
@@ -326,8 +326,8 @@ ESIMD_INLINE void bitonic_merge(uint32_t offset, simd<uint32_t, BASE_SZ> &A,
326326
simd<ushort, 32> flip16(init_mask16);
327327
#pragma unroll
328328
for (int i = 0; i < BASE_SZ; i += 32) {
329-
auto MA = A.select<32, 1>(i).format<uint32_t, 4, 8>();
330-
auto MB = B.select<32, 1>(i).format<uint32_t, 4, 8>();
329+
auto MA = A.select<32, 1>(i).bit_cast_view<uint32_t, 4, 8>();
330+
auto MB = B.select<32, 1>(i).bit_cast_view<uint32_t, 4, 8>();
331331
MA.select<4, 1, 4, 1>(0, 0) = MB.select<4, 1, 4, 1>(0, 4);
332332
MA.select<4, 1, 4, 1>(0, 4) = MB.select<4, 1, 4, 1>(0, 0);
333333
bool dir_up = (((offset + i) >> (m + 1)) & 1) == 0;
@@ -346,8 +346,8 @@ ESIMD_INLINE void bitonic_merge(uint32_t offset, simd<uint32_t, BASE_SZ> &A,
346346
simd<ushort, 32> flip18(init_mask18);
347347
#pragma unroll
348348
for (int i = 0; i < BASE_SZ; i += 32) {
349-
auto MB = B.select<32, 1>(i).format<long long, 4, 4>();
350-
auto MA = A.select<32, 1>(i).format<long long, 4, 4>();
349+
auto MB = B.select<32, 1>(i).bit_cast_view<long long, 4, 4>();
350+
auto MA = A.select<32, 1>(i).bit_cast_view<long long, 4, 4>();
351351

352352
MB.select<4, 1, 2, 2>(0, 0) = MA.select<4, 1, 2, 2>(0, 1);
353353
MB.select<4, 1, 2, 2>(0, 1) = MA.select<4, 1, 2, 2>(0, 0);

SYCL/ESIMD/BitonicSortKv2.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ bitonic_exchange4(simd<uint32_t, BASE_SZ> A, simd<ushort, 32> flip) {
8484
simd<uint32_t, BASE_SZ> B;
8585
#pragma unroll
8686
for (int i = 0; i < BASE_SZ; i += 32) {
87-
auto MA = A.select<32, 1>(i).format<uint32_t, 4, 8>();
88-
auto MB = B.select<32, 1>(i).format<uint32_t, 4, 8>();
87+
auto MA = A.select<32, 1>(i).bit_cast_view<uint32_t, 4, 8>();
88+
auto MB = B.select<32, 1>(i).bit_cast_view<uint32_t, 4, 8>();
8989
MB.select<4, 1, 4, 1>(0, 0) = MA.select<4, 1, 4, 1>(0, 4);
9090
MB.select<4, 1, 4, 1>(0, 4) = MA.select<4, 1, 4, 1>(0, 0);
9191
B.select<32, 1>(i).merge(A.select<32, 1>(i),
@@ -113,8 +113,8 @@ bitonic_exchange2(simd<uint32_t, BASE_SZ> A, simd<ushort, 32> flip) {
113113
simd<uint32_t, BASE_SZ> B;
114114
#pragma unroll
115115
for (int i = 0; i < BASE_SZ; i += 32) {
116-
auto MB = B.select<32, 1>(i).format<long long, 4, 4>();
117-
auto MA = A.select<32, 1>(i).format<long long, 4, 4>();
116+
auto MB = B.select<32, 1>(i).bit_cast_view<long long, 4, 4>();
117+
auto MA = A.select<32, 1>(i).bit_cast_view<long long, 4, 4>();
118118
MB.select<4, 1, 2, 2>(0, 0) = MA.select<4, 1, 2, 2>(0, 1);
119119
MB.select<4, 1, 2, 2>(0, 1) = MA.select<4, 1, 2, 2>(0, 0);
120120
B.select<32, 1>(i).merge(A.select<32, 1>(i),
@@ -243,8 +243,8 @@ ESIMD_INLINE void bitonic_merge(uint32_t offset, simd<uint32_t, BASE_SZ> &A,
243243
simd<ushort, 32> flip16 = esimd_unpack_mask<32>(0x0f0f0f0f); //(init_mask16);
244244
#pragma unroll
245245
for (int i = 0; i < BASE_SZ; i += 32) {
246-
auto MA = A.select<32, 1>(i).format<uint32_t, 4, 8>();
247-
auto MB = B.select<32, 1>(i).format<uint32_t, 4, 8>();
246+
auto MA = A.select<32, 1>(i).bit_cast_view<uint32_t, 4, 8>();
247+
auto MB = B.select<32, 1>(i).bit_cast_view<uint32_t, 4, 8>();
248248
MA.select<4, 1, 4, 1>(0, 0) = MB.select<4, 1, 4, 1>(0, 4);
249249
MA.select<4, 1, 4, 1>(0, 4) = MB.select<4, 1, 4, 1>(0, 0);
250250
bool dir_up = (((offset + i) >> (m + 1)) & 1) == 0;
@@ -263,8 +263,8 @@ ESIMD_INLINE void bitonic_merge(uint32_t offset, simd<uint32_t, BASE_SZ> &A,
263263
simd<ushort, 32> flip18 = esimd_unpack_mask<32>(0x33333333); //(init_mask18);
264264
#pragma unroll
265265
for (int i = 0; i < BASE_SZ; i += 32) {
266-
auto MB = B.select<32, 1>(i).format<long long, 4, 4>();
267-
auto MA = A.select<32, 1>(i).format<long long, 4, 4>();
266+
auto MB = B.select<32, 1>(i).bit_cast_view<long long, 4, 4>();
267+
auto MA = A.select<32, 1>(i).bit_cast_view<long long, 4, 4>();
268268

269269
MB.select<4, 1, 2, 2>(0, 0) = MA.select<4, 1, 2, 2>(0, 1);
270270
MB.select<4, 1, 2, 2>(0, 1) = MA.select<4, 1, 2, 2>(0, 0);

SYCL/ESIMD/PrefixSum.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
#define TUPLE_SZ 1
2323

2424
#if TUPLE_SZ == 1
25-
#define GATHER_SCATTER_MASK ESIMD_R_ENABLE
25+
#define GATHER_SCATTER_MASK rgba_channel_mask::R
2626
#elif TUPLE_SZ == 2
27-
#define GATHER_SCATTER_MASK ESIMD_GR_ENABLE
27+
#define GATHER_SCATTER_MASK rgba_channel_mask::GR
2828
#elif TUPLE_SZ == 4
29-
#define GATHER_SCATTER_MASK ESIMD_ABGR_ENABLE
29+
#define GATHER_SCATTER_MASK rgba_channel_mask::ABGR
3030
#endif
3131

3232
#define LOG_ENTRIES 8
@@ -148,7 +148,7 @@ void cmk_acum_iterative(unsigned *buf, unsigned h_pos,
148148
S += T;
149149
}
150150

151-
auto cnt_table = S.format<unsigned int, 32, TUPLE_SZ>();
151+
auto cnt_table = S.bit_cast_view<unsigned int, 32, TUPLE_SZ>();
152152
// sum reduction for each bin
153153
cnt_table.select<16, 1, TUPLE_SZ, 1>(0, 0) +=
154154
cnt_table.select<16, 1, TUPLE_SZ, 1>(16, 0);
@@ -186,7 +186,7 @@ void cmk_acum_final(unsigned *buf, unsigned h_pos, unsigned int stride_elems,
186186

187187
S = gather4<unsigned int, 32, GATHER_SCATTER_MASK>(buf, element_offset, p);
188188

189-
auto cnt_table = S.format<unsigned int, TUPLE_SZ, 32>();
189+
auto cnt_table = S.bit_cast_view<unsigned int, TUPLE_SZ, 32>();
190190
cnt_table.column(0) += prev;
191191
#pragma unroll
192192
for (unsigned j = 0; j < TUPLE_SZ; j++) {
@@ -254,7 +254,7 @@ void cmk_prefix_iterative(unsigned *buf, unsigned h_pos,
254254

255255
S = gather4<unsigned int, 32, GATHER_SCATTER_MASK>(buf, element_offset);
256256

257-
auto cnt_table = S.format<unsigned int, TUPLE_SZ, 32>();
257+
auto cnt_table = S.bit_cast_view<unsigned int, TUPLE_SZ, 32>();
258258
cnt_table.column(0) += prev;
259259
#pragma unroll
260260
for (unsigned j = 0; j < TUPLE_SZ; j++) {

SYCL/ESIMD/Prefix_Local_sum1.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
#define TUPLE_SZ 1
2323

2424
#if TUPLE_SZ == 1
25-
#define GATHER_SCATTER_MASK ESIMD_R_ENABLE
25+
#define GATHER_SCATTER_MASK rgba_channel_mask::R
2626
#elif TUPLE_SZ == 2
27-
#define GATHER_SCATTER_MASK ESIMD_GR_ENABLE
27+
#define GATHER_SCATTER_MASK rgba_channel_mask::GR
2828
#elif TUPLE_SZ == 4
29-
#define GATHER_SCATTER_MASK ESIMD_ABGR_ENABLE
29+
#define GATHER_SCATTER_MASK rgba_channel_mask::ABGR
3030
#endif
3131

3232
#define PREFIX_ENTRIES 256
@@ -87,7 +87,7 @@ void cmk_sum_tuple_count(unsigned int *buf, unsigned int h_pos) {
8787
}
8888

8989
// format S to be a 32xTUPLE_SZ matrix
90-
auto cnt_table = S.format<unsigned int, 32, TUPLE_SZ>();
90+
auto cnt_table = S.bit_cast_view<unsigned int, 32, TUPLE_SZ>();
9191
// sum reduction for each bin
9292
cnt_table.select<16, 1, TUPLE_SZ, 1>(0, 0) +=
9393
cnt_table.select<16, 1, TUPLE_SZ, 1>(16, 0);

SYCL/ESIMD/Prefix_Local_sum2.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
#define TUPLE_SZ 4
2323

2424
#if TUPLE_SZ == 1
25-
#define GATHER_SCATTER_MASK ESIMD_R_ENABLE
25+
#define GATHER_SCATTER_MASK rgba_channel_mask::R
2626
#elif TUPLE_SZ == 2
27-
#define GATHER_SCATTER_MASK ESIMD_GR_ENABLE
27+
#define GATHER_SCATTER_MASK rgba_channel_mask::GR
2828
#elif TUPLE_SZ == 4
29-
#define GATHER_SCATTER_MASK ESIMD_ABGR_ENABLE
29+
#define GATHER_SCATTER_MASK rgba_channel_mask::ABGR
3030
#endif
3131

3232
#define PREFIX_ENTRIES 256
@@ -83,7 +83,7 @@ void cmk_acum_iterative(unsigned *buf, unsigned h_pos,
8383
S += T;
8484
}
8585

86-
auto cnt_table = S.format<unsigned int, TUPLE_SZ, 32>();
86+
auto cnt_table = S.bit_cast_view<unsigned int, TUPLE_SZ, 32>();
8787

8888
simd<unsigned, TUPLE_SZ> sum;
8989
#pragma unroll

SYCL/ESIMD/Prefix_Local_sum3.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
#define TUPLE_SZ 2
2323

2424
#if TUPLE_SZ == 1
25-
#define GATHER_SCATTER_MASK ESIMD_R_ENABLE
25+
#define GATHER_SCATTER_MASK rgba_channel_mask::R
2626
#elif TUPLE_SZ == 2
27-
#define GATHER_SCATTER_MASK ESIMD_GR_ENABLE
27+
#define GATHER_SCATTER_MASK rgba_channel_mask::GR
2828
#elif TUPLE_SZ == 4
29-
#define GATHER_SCATTER_MASK ESIMD_ABGR_ENABLE
29+
#define GATHER_SCATTER_MASK rgba_channel_mask::ABGR
3030
#endif
3131

3232
#define LOG_ENTRIES 8
@@ -110,7 +110,7 @@ void cmk_acum_iterative(unsigned *buf, unsigned h_pos,
110110
S += T;
111111
}
112112

113-
auto cnt_table = S.format<unsigned int, 32, TUPLE_SZ>();
113+
auto cnt_table = S.bit_cast_view<unsigned int, 32, TUPLE_SZ>();
114114
// sum reduction for each bin
115115
cnt_table.select<16, 1, TUPLE_SZ, 1>(0, 0) +=
116116
cnt_table.select<16, 1, TUPLE_SZ, 1>(16, 0);
@@ -161,7 +161,7 @@ void cmk_acum_iterative_low(unsigned *buf, unsigned h_pos,
161161
S += T;
162162
}
163163

164-
auto cnt_table = S.format<unsigned int, 32, TUPLE_SZ>();
164+
auto cnt_table = S.bit_cast_view<unsigned int, 32, TUPLE_SZ>();
165165
// sum reduction for each bin
166166
cnt_table.select<16, 1, TUPLE_SZ, 1>(0, 0) +=
167167
cnt_table.select<16, 1, TUPLE_SZ, 1>(16, 0);
@@ -199,7 +199,7 @@ void cmk_acum_final(unsigned *buf, unsigned h_pos, unsigned int stride_elems,
199199

200200
S = gather4<unsigned int, 32, GATHER_SCATTER_MASK>(buf, element_offset, p);
201201

202-
auto cnt_table = S.format<unsigned int, TUPLE_SZ, 32>();
202+
auto cnt_table = S.bit_cast_view<unsigned int, TUPLE_SZ, 32>();
203203
cnt_table.column(0) += prev;
204204
for (unsigned j = 0; j < TUPLE_SZ; j++) {
205205
// step 1

SYCL/ESIMD/Stencil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int main(int argc, char *argv[]) {
113113

114114
simd<float, (HEIGHT + 10) * 32> vin;
115115
// matrix HEIGHT+10 x 32
116-
auto in = vin.format<float, HEIGHT + 10, 32>();
116+
auto in = vin.bit_cast_view<float, HEIGHT + 10, 32>();
117117

118118
//
119119
// rather than loading all data in

SYCL/ESIMD/histogram.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ int main(int argc, char *argv[]) {
199199
src = histogram.select<8, 1>(i);
200200

201201
#ifdef __SYCL_DEVICE_ONLY__
202-
flat_atomic<EsimdAtomicOpType::ATOMIC_ADD, unsigned int, 8>(
203-
bins, offset, src, 1);
202+
flat_atomic<atomic_op::add, unsigned int, 8>(bins, offset, src,
203+
1);
204204
offset += 8 * sizeof(unsigned int);
205205
#else
206206
simd<unsigned int, 8> vals;

SYCL/ESIMD/histogram_256_slm.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ ESIMD_INLINE void histogram_atomic(const uint32_t *input_ptr, uint32_t *output,
4545
auto start_addr = ((unsigned int *)input_ptr) + start_off;
4646
simd<uint, 32> data;
4747
data.copy_from(start_addr);
48-
auto in = data.format<uchar>();
48+
auto in = data.bit_cast_view<uchar>();
4949

5050
#pragma unroll
5151
for (int j = 0; j < BLOCK_WIDTH * sizeof(int); j += 16) {
5252
// Accumulate local histogram for each pixel value
5353
simd<uint, 16> dataOffset = in.select<16, 1>(j).read();
5454
dataOffset *= sizeof(int);
55-
slm_atomic<EsimdAtomicOpType::ATOMIC_INC, uint, 16>(dataOffset, 1);
55+
slm_atomic<atomic_op::inc, uint, 16>(dataOffset, 1);
5656
}
5757
start_off += BLOCK_WIDTH;
5858
}
@@ -61,10 +61,10 @@ ESIMD_INLINE void histogram_atomic(const uint32_t *input_ptr, uint32_t *output,
6161
// Update global sum by atomically adding each local histogram
6262
simd<uint, 16> local_histogram;
6363
local_histogram = slm_load<uint32_t, 16>(slm_offset);
64-
flat_atomic<EsimdAtomicOpType::ATOMIC_ADD, uint32_t, 8>(
65-
output, slm_offset.select<8, 1>(0), local_histogram.select<8, 1>(0), 1);
66-
flat_atomic<EsimdAtomicOpType::ATOMIC_ADD, uint32_t, 8>(
67-
output, slm_offset.select<8, 1>(8), local_histogram.select<8, 1>(8), 1);
64+
flat_atomic<atomic_op::add, uint32_t, 8>(output, slm_offset.select<8, 1>(0),
65+
local_histogram.select<8, 1>(0), 1);
66+
flat_atomic<atomic_op::add, uint32_t, 8>(output, slm_offset.select<8, 1>(8),
67+
local_histogram.select<8, 1>(8), 1);
6868
}
6969

7070
// This function calculates histogram of the image with the CPU.

SYCL/ESIMD/histogram_256_slm_spec.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ ESIMD_INLINE void histogram_atomic(const uint32_t *input_ptr, uint32_t *output,
4646
auto start_addr = ((unsigned int *)input_ptr) + start_off;
4747
simd<uint, 32> data;
4848
data.copy_from(start_addr);
49-
auto in = data.format<uchar>();
49+
auto in = data.bit_cast_view<uchar>();
5050

5151
#pragma unroll
5252
for (int j = 0; j < BLOCK_WIDTH * sizeof(int); j += 16) {
5353
// Accumulate local histogram for each pixel value
5454
simd<uint, 16> dataOffset = in.select<16, 1>(j).read();
5555
dataOffset *= sizeof(int);
56-
slm_atomic<EsimdAtomicOpType::ATOMIC_INC, uint, 16>(dataOffset, 1);
56+
slm_atomic<atomic_op::inc, uint, 16>(dataOffset, 1);
5757
}
5858
start_off += BLOCK_WIDTH;
5959
}
@@ -62,10 +62,10 @@ ESIMD_INLINE void histogram_atomic(const uint32_t *input_ptr, uint32_t *output,
6262
// Update global sum by atomically adding each local histogram
6363
simd<uint, 16> local_histogram;
6464
local_histogram = slm_load<uint32_t, 16>(slm_offset);
65-
flat_atomic<EsimdAtomicOpType::ATOMIC_ADD, uint32_t, 8>(
66-
output, slm_offset.select<8, 1>(0), local_histogram.select<8, 1>(0), 1);
67-
flat_atomic<EsimdAtomicOpType::ATOMIC_ADD, uint32_t, 8>(
68-
output, slm_offset.select<8, 1>(8), local_histogram.select<8, 1>(8), 1);
65+
flat_atomic<atomic_op::add, uint32_t, 8>(output, slm_offset.select<8, 1>(0),
66+
local_histogram.select<8, 1>(0), 1);
67+
flat_atomic<atomic_op::add, uint32_t, 8>(output, slm_offset.select<8, 1>(8),
68+
local_histogram.select<8, 1>(8), 1);
6969
}
7070

7171
// This function calculates histogram of the image with the CPU.

SYCL/ESIMD/histogram_256_slm_spec_2020.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ ESIMD_INLINE void histogram_atomic(const uint32_t *input_ptr, uint32_t *output,
4040
for (int y = 0; y < num_blocks; y++) {
4141
auto start_addr = ((unsigned int *)input_ptr) + start_off;
4242
auto data = block_load<uint, 32>(start_addr);
43-
auto in = data.format<uchar>();
43+
auto in = data.bit_cast_view<uchar>();
4444

4545
#pragma unroll
4646
for (int j = 0; j < BLOCK_WIDTH * sizeof(int); j += 16) {
4747
// Accumulate local histogram for each pixel value
4848
simd<uint, 16> dataOffset = in.select<16, 1>(j).read();
4949
dataOffset *= sizeof(int);
50-
slm_atomic<EsimdAtomicOpType::ATOMIC_INC, uint, 16>(dataOffset, 1);
50+
slm_atomic<atomic_op::inc, uint, 16>(dataOffset, 1);
5151
}
5252
start_off += BLOCK_WIDTH;
5353
}
@@ -56,10 +56,10 @@ ESIMD_INLINE void histogram_atomic(const uint32_t *input_ptr, uint32_t *output,
5656
// Update global sum by atomically adding each local histogram
5757
simd<uint, 16> local_histogram;
5858
local_histogram = slm_load<uint32_t, 16>(slm_offset);
59-
flat_atomic<EsimdAtomicOpType::ATOMIC_ADD, uint32_t, 8>(
60-
output, slm_offset.select<8, 1>(0), local_histogram.select<8, 1>(0), 1);
61-
flat_atomic<EsimdAtomicOpType::ATOMIC_ADD, uint32_t, 8>(
62-
output, slm_offset.select<8, 1>(8), local_histogram.select<8, 1>(8), 1);
59+
flat_atomic<atomic_op::add, uint32_t, 8>(output, slm_offset.select<8, 1>(0),
60+
local_histogram.select<8, 1>(0), 1);
61+
flat_atomic<atomic_op::add, uint32_t, 8>(output, slm_offset.select<8, 1>(8),
62+
local_histogram.select<8, 1>(8), 1);
6363
}
6464

6565
// This function calculates histogram of the image with the CPU.

SYCL/ESIMD/histogram_2d.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ int main(int argc, char *argv[]) {
191191
src = histogram.select<8, 1>(i);
192192

193193
#ifdef __SYCL_DEVICE_ONLY__
194-
flat_atomic<EsimdAtomicOpType::ATOMIC_ADD, unsigned int, 8>(
195-
bins, offset, src, 1);
194+
flat_atomic<atomic_op::add, unsigned int, 8>(bins, offset, src,
195+
1);
196196
offset += 8 * sizeof(unsigned int);
197197
#else
198198
simd<unsigned int, 8> vals;

SYCL/ESIMD/histogram_raw_send.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ int main(int argc, char *argv[]) {
214214
src = histogram.select<8, 1>(i);
215215

216216
#ifdef __SYCL_DEVICE_ONLY__
217-
// flat_atomic<EsimdAtomicOpType::ATOMIC_ADD, unsigned int,
217+
// flat_atomic<atomic_op::add, unsigned int,
218218
// 8>(bins, offset, src, 1);
219-
atomic_write<EsimdAtomicOpType::ATOMIC_ADD, unsigned int, 8>(
220-
bins, offset, src, 1);
219+
atomic_write<atomic_op::add, unsigned int, 8>(bins, offset, src,
220+
1);
221221
offset += 8 * sizeof(unsigned int);
222222
#else
223223
simd<unsigned int, 8> vals;

0 commit comments

Comments
 (0)