Skip to content

Commit 8a6caf1

Browse files
committed
Add comment in static assert.
1 parent a264ee5 commit 8a6caf1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

sycl/include/sycl/vector.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,9 @@ template <typename Type, int NumElements> class vec {
802802
std::is_same_v<DataT, bfloat16> && std::is_same_v<convertT, float>;
803803
if constexpr (isFloatToBF16Conv || isBF16ToFloatConv) {
804804
static_assert(roundingMode == rounding_mode::automatic ||
805-
roundingMode == rounding_mode::rte);
805+
roundingMode == rounding_mode::rte,
806+
"Currently, we only supoort round-to-even rounding mode
807+
for Bfloat16 <--> float conversion.");
806808
}
807809

808810
using T = vec_data_t<DataT>;

sycl/include/sycl/vector_preview.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ class vec : public detail::vec_arith<DataT, NumElements> {
434434
std::is_same_v<DataT, bfloat16> && std::is_same_v<convertT, float>;
435435
if constexpr (isFloatToBF16Conv || isBF16ToFloatConv) {
436436
static_assert(roundingMode == rounding_mode::automatic ||
437-
roundingMode == rounding_mode::rte);
437+
roundingMode == rounding_mode::rte,
438+
"Currently, we only supoort round-to-even rounding mode
439+
for Bfloat16 <--> float conversion.");
438440
}
439441
}
440442

0 commit comments

Comments
 (0)