[libc-commits] [libc] [libc][math][c++23] Add bfloat16 support in LLVM libc (PR #144463)
via libc-commits
libc-commits at lists.llvm.org
Tue Jul 8 09:48:19 PDT 2025
================
@@ -169,6 +170,17 @@ class MPFRNumber {
mpfr_set_sj(value, x, mpfr_rounding);
}
+ // BFloat16
+ template <typename XType,
+ cpp::enable_if_t<cpp::is_same_v<bfloat16, XType>, int> = 0>
+ explicit MPFRNumber(XType x, unsigned int precision = 8,
----------------
lntue wrote:
Yes, we can merge it with the float and float16 constructor.
https://github.com/llvm/llvm-project/pull/144463
More information about the libc-commits
mailing list