Lines Matching defs:uint128
15 class uint128 {
17 uint128(); // Sets to 0, but don't trust on this behavior.
18 uint128(uint64 top, uint64 bottom);
19 uint128(int bottom);
20 uint128(uint32 bottom); // Top 96 bits = 0
21 uint128(uint64 bottom); // hi_ = 0
22 uint128(const uint128 &val);
23 uint128(const uint128_pod &val);
27 uint128& operator=(const uint128& b);
31 uint128& operator+=(const uint128& b);
32 uint128& operator-=(const uint128& b);
33 uint128& operator*=(const uint128& b);
34 uint128 operator++(int);
35 uint128 operator--(int);
36 uint128& operator<<=(int);
37 uint128& operator>>=(int);
38 uint128& operator&=(const uint128& b);
39 uint128& operator|=(const uint128& b);
40 uint128& operator^=(const uint128& b);
41 uint128& operator++();
42 uint128& operator--();
44 friend uint64 Uint128Low64(const uint128& v);
45 friend uint64 Uint128High64(const uint128& v);
49 const uint128& b);
54 // See util/endian/endian.h and Load128/Store128 for storing a uint128.
59 uint128(uint8);
60 uint128(uint16);
61 uint128(float v);
62 uint128(double v);
65 // This is a POD form of uint128 which can be used for static variables which
66 // need to be operated on as uint128.
68 // Note: The ordering of fields is different than 'class uint128' but the
79 // allow uint128 to be logged
81 const uint128& b);
84 // Defined externally from uint128 to facilitate conversion
86 inline uint64 Uint128Low64(const uint128& v) { return v.lo_; }
87 inline uint64 Uint128High64(const uint128& v) { return v.hi_; }
94 inline bool operator==(const uint128& lhs, const uint128& rhs) {
98 inline bool operator!=(const uint128& lhs, const uint128& rhs) {
101 inline uint128& uint128::operator=(const uint128& b) {
107 inline uint128::uint128(): lo_(0), hi_(0) { }
108 inline uint128::uint128(uint64 top, uint64 bottom) : lo_(bottom), hi_(top) { }
109 inline uint128::uint128(const uint128 &v) : lo_(v.lo_), hi_(v.hi_) { }
110 inline uint128::uint128(const uint128_pod &v) : lo_(v.lo), hi_(v.hi) { }
111 inline uint128::uint128(uint64 bottom) : lo_(bottom), hi_(0) { }
112 inline uint128::uint128(uint32 bottom) : lo_(bottom), hi_(0) { }
113 inline uint128::uint128(int bottom) : lo_(bottom), hi_(0) {
118 inline void uint128::Initialize(uint64 top, uint64 bottom) {
126 inline bool operator op(const uint128& lhs, const uint128& rhs) { \
141 inline uint128 operator-(const uint128& val) {
146 return uint128(hi_flip + 1, lo_add);
148 return uint128(hi_flip, lo_add);
151 inline bool operator!(const uint128& val) {
157 inline uint128 operator~(const uint128& val) {
158 return uint128(~Uint128High64(val), ~Uint128Low64(val));
162 inline uint128 operator op(const uint128& lhs, const uint128& rhs) { \
163 return uint128(Uint128High64(lhs) op Uint128High64(rhs), \
174 inline uint128& uint128::operator op(const uint128& other) { \
188 inline uint128 operator<<(const uint128& val, int amount) {
197 return uint128(new_hi, new_lo);
199 return uint128(Uint128Low64(val) << (amount - 64), 0);
201 return uint128(0, 0);
205 inline uint128 operator>>(const uint128& val, int amount) {
214 return uint128(new_hi, new_lo);
216 return uint128(0, Uint128High64(val) >> (amount - 64));
218 return uint128(0, 0);
222 inline uint128& uint128::operator<<=(int amount) {
239 inline uint128& uint128::operator>>=(int amount) {
256 inline uint128 operator+(const uint128& lhs, const uint128& rhs) {
257 return uint128(lhs) += rhs;
260 inline uint128 operator-(const uint128& lhs, const uint128& rhs) {
261 return uint128(lhs) -= rhs;
264 inline uint128 operator*(const uint128& lhs, const uint128& rhs) {
265 return uint128(lhs) *= rhs;
268 inline uint128& uint128::operator+=(const uint128& b) {
277 inline uint128& uint128::operator-=(const uint128& b) {
285 inline uint128& uint128::operator*=(const uint128& b) {
302 *this += uint128(a32 * b00) << 32;
303 *this += uint128(a00 * b32) << 32;
308 inline uint128 uint128::operator++(int) {
309 uint128 tmp(*this);
314 inline uint128 uint128::operator--(int) {
315 uint128 tmp(*this);
320 inline uint128& uint128::operator++() {
325 inline uint128& uint128::operator--() {