12namespace numeric_utils {
18concept IsSigned = std::same_as<T, int128_t> || std::numeric_limits<T>::is_signed;
25 using type = std::make_signed_t<T>;
38 using type = std::make_unsigned_t<T>;
62 return std::bit_width(x);
68 constexpr size_t BITS_PER_BYTE = 8;
71 return std::bit_width(x.
low);
Definition numeric_utils.h:15
Definition numeric_utils.h:18
Definition numeric_utils.h:21
decltype(auto) makeValueSigned(T value)
Definition numeric_utils.h:51
constexpr int bitWidth(T x)
Definition numeric_utils.h:61
constexpr int bitWidth< int128_t >(int128_t x)
Definition numeric_utils.h:66
typename MakeUnSigned< T >::type MakeUnSignedT
Definition numeric_utils.h:48
decltype(auto) makeValueUnSigned(T value)
Definition numeric_utils.h:56
typename MakeSigned< T >::type MakeSignedT
Definition numeric_utils.h:34
struct KUZU_API int128_t
Definition int128_t.h:17
Definition alter_type.h:5
uint64_t low
Definition int128_t.h:21
int64_t high
Definition int128_t.h:22
Definition numeric_utils.h:24
std::make_signed_t< T > type
Definition numeric_utils.h:25
Definition numeric_utils.h:37
std::make_unsigned_t< T > type
Definition numeric_utils.h:38