Skip to content

Commit 8ae7851

Browse files
t4c1againull
andauthored
[SYCL][CUDA] fix warnings in async barrier (#6165)
Fixes warnings introduced in #5303. Co-authored-by: Artur Gainullin <[email protected]>
1 parent 41402c5 commit 8ae7851

File tree

1 file changed

+6
-0
lines changed
  • sycl/include/sycl/ext/oneapi/experimental/cuda

1 file changed

+6
-0
lines changed

sycl/include/sycl/ext/oneapi/experimental/cuda/barrier.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class barrier {
3232
#ifdef __SYCL_DEVICE_ONLY__
3333
__clc_BarrierInitialize(&state, expected_count);
3434
#else
35+
(void)state;
36+
(void)expected_count;
3537
throw runtime_error("Barrier is not supported on host device.",
3638
PI_INVALID_DEVICE);
3739
#endif
@@ -68,6 +70,7 @@ class barrier {
6870
#ifdef __SYCL_DEVICE_ONLY__
6971
return __clc_BarrierArriveNoComplete(&state, count);
7072
#else
73+
(void)count;
7174
throw runtime_error("Barrier is not supported on host device.",
7275
PI_INVALID_DEVICE);
7376
#endif
@@ -77,6 +80,7 @@ class barrier {
7780
#ifdef __SYCL_DEVICE_ONLY__
7881
return __clc_BarrierArriveAndDropNoComplete(&state, count);
7982
#else
83+
(void)count;
8084
throw runtime_error("Barrier is not supported on host device.",
8185
PI_INVALID_DEVICE);
8286
#endif
@@ -104,6 +108,7 @@ class barrier {
104108
#ifdef __SYCL_DEVICE_ONLY__
105109
__clc_BarrierWait(&state, arrival);
106110
#else
111+
(void)arrival;
107112
throw runtime_error("Barrier is not supported on host device.",
108113
PI_INVALID_DEVICE);
109114
#endif
@@ -113,6 +118,7 @@ class barrier {
113118
#ifdef __SYCL_DEVICE_ONLY__
114119
return __clc_BarrierTestWait(&state, arrival);
115120
#else
121+
(void)arrival;
116122
throw runtime_error("Barrier is not supported on host device.",
117123
PI_INVALID_DEVICE);
118124
#endif

0 commit comments

Comments
 (0)