[libc-commits] [PATCH] D137871: [libc][math] Improve the performance and error printing of UInt.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Nov 14 11:39:13 PST 2022


lntue marked an inline comment as done.
lntue added inline comments.


================
Comment at: libc/src/__support/UInt.h:24
 
-template <size_t Bits> class UInt {
+template <size_t Bits> struct UInt {
 
----------------
michaelrj wrote:
> is there a reason this is changed?
I put everything in this class as `public` for 3 reasons:
- To access to `WordCount` without recomputing it
- To make this class behave as a value class, I'm going to remove the `operator[]`, and simply use `.val[i]` directly if we want to access to its ith `uint64_t` block.
- Utility functions `low` and `high` (and `MASK32` constant) will be removed and switched completely to use `split(uint64_t)` instead.  That would separate what we want to do with the class vs what we want to do with `uint64_t`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137871/new/

https://reviews.llvm.org/D137871



More information about the libc-commits mailing list