[libc-commits] [libc] [libc] add FXBits class (PR #82065)
via libc-commits
libc-commits at lists.llvm.org
Fri Feb 16 15:34:58 PST 2024
================
@@ -19,6 +21,74 @@
namespace LIBC_NAMESPACE::fixed_point {
+template <typename T> struct FXBits {
+private:
+ using fx_rep = FXRep<T>;
+ using StorageType = typename fx_rep::StorageType;
+
+ StorageType value;
+
+ static_assert(fx_rep::FRACTION_LEN > 0);
+
+ static constexpr size_t FRACTION_OFFSET = 0; // Just for completeness
----------------
lntue wrote:
Also do we need to annotate `LIBC_INLINE_VAR` for these?
https://github.com/llvm/llvm-project/pull/82065
More information about the libc-commits
mailing list