Skip to content

Commit c91f955

Browse files
[SYCL] Use std::ignore for all unused args in bfloat builtins (#6381)
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 0a1d751 commit c91f955

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

sycl/include/sycl/ext/oneapi/experimental/builtins.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ std::enable_if_t<std::is_same<T, bfloat16>::value, T> fmin(T x, T y) {
161161
return bfloat16::from_bits(__clc_fmin(x.raw(), y.raw()));
162162
#else
163163
std::ignore = x;
164-
(void)y;
164+
std::ignore = y;
165165
throw runtime_error("bfloat16 is not currently supported on the host device.",
166166
PI_ERROR_INVALID_DEVICE);
167167
#endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__)
@@ -187,7 +187,7 @@ sycl::marray<bfloat16, N> fmin(sycl::marray<bfloat16, N> x,
187187
return res;
188188
#else
189189
std::ignore = x;
190-
(void)y;
190+
std::ignore = y;
191191
throw runtime_error("bfloat16 is not currently supported on the host device.",
192192
PI_ERROR_INVALID_DEVICE);
193193
#endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__)
@@ -199,7 +199,7 @@ std::enable_if_t<std::is_same<T, bfloat16>::value, T> fmax(T x, T y) {
199199
return bfloat16::from_bits(__clc_fmax(x.raw(), y.raw()));
200200
#else
201201
std::ignore = x;
202-
(void)y;
202+
std::ignore = y;
203203
throw runtime_error("bfloat16 is not currently supported on the host device.",
204204
PI_ERROR_INVALID_DEVICE);
205205
#endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__)
@@ -224,7 +224,7 @@ sycl::marray<bfloat16, N> fmax(sycl::marray<bfloat16, N> x,
224224
return res;
225225
#else
226226
std::ignore = x;
227-
(void)y;
227+
std::ignore = y;
228228
throw runtime_error("bfloat16 is not currently supported on the host device.",
229229
PI_ERROR_INVALID_DEVICE);
230230
#endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__)
@@ -236,8 +236,8 @@ std::enable_if_t<std::is_same<T, bfloat16>::value, T> fma(T x, T y, T z) {
236236
return bfloat16::from_bits(__clc_fma(x.raw(), y.raw(), z.raw()));
237237
#else
238238
std::ignore = x;
239-
(void)y;
240-
(void)z;
239+
std::ignore = y;
240+
std::ignore = z;
241241
throw runtime_error("bfloat16 is not currently supported on the host device.",
242242
PI_ERROR_INVALID_DEVICE);
243243
#endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__)
@@ -264,7 +264,8 @@ sycl::marray<bfloat16, N> fma(sycl::marray<bfloat16, N> x,
264264
return res;
265265
#else
266266
std::ignore = x;
267-
(void)y;
267+
std::ignore = y;
268+
std::ignore = z;
268269
throw runtime_error("bfloat16 is not currently supported on the host device.",
269270
PI_ERROR_INVALID_DEVICE);
270271
#endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__)

0 commit comments

Comments
 (0)