Skip to content

Commit 3196d66

Browse files
[SYCL] Cast some unused variable as void in bfloat16.hpp (#6111)
1 parent 7461b63 commit 3196d66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class bfloat16 {
3535
return __spirv_ConvertFToBF16INTEL(a);
3636
#endif
3737
#else
38+
(void)a;
3839
throw exception{errc::feature_not_supported,
3940
"Bfloat16 conversion is not supported on host device"};
4041
#endif
@@ -50,6 +51,7 @@ class bfloat16 {
5051
return __spirv_ConvertBF16ToFINTEL(a);
5152
#endif
5253
#else
54+
(void)a;
5355
throw exception{errc::feature_not_supported,
5456
"Bfloat16 conversion is not supported on host device"};
5557
#endif
@@ -88,6 +90,7 @@ class bfloat16 {
8890
return bfloat16{-__spirv_ConvertBF16ToFINTEL(lhs.value)};
8991
#endif
9092
#else
93+
(void)lhs;
9194
throw exception{errc::feature_not_supported,
9295
"Bfloat16 unary minus is not supported on host device"};
9396
#endif

0 commit comments

Comments
 (0)