We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3ca737 commit 8a7ad74Copy full SHA for 8a7ad74
sycl/test-e2e/BFloat16/bfloat16_limits.cpp
@@ -15,7 +15,7 @@ using Limit = std::numeric_limits<sycl_ext::bfloat16>;
15
constexpr float Log10_2 = 0.30103f;
16
17
// Helper constexpr ceil function.
18
-constexpr int ceil(float Val) {
+constexpr int constexpr_ceil(float Val) {
19
return Val + (float(int(Val)) == Val ? 0.f : 1.f);
20
}
21
@@ -71,7 +71,7 @@ int main() {
71
static_assert(Limit::radix == 2);
72
static_assert(Limit::digits == 8);
73
static_assert(Limit::max_digits10 ==
74
- ceil(float(Limit::digits) * Log10_2 + 1.0f));
+ constexpr_ceil(float(Limit::digits) * Log10_2 + 1.0f));
75
static_assert(Limit::is_bounded);
76
static_assert(Limit::digits10 == int(Limit::digits * Log10_2));
77
static_assert(!Limit::is_modulo);
0 commit comments