10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_UINT128_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_UINT128_H 19 static const uint64_t
value = n;
31 template <
typename HIGH = u
int64_t,
typename LOW = u
int64_t>
37 template<
typename OTHER_HIGH,
typename OTHER_LOW>
44 template<
typename OTHER_HIGH,
typename OTHER_LOW>
76 template <
typename HL,
typename LL,
typename HR,
typename LR>
83 template <
typename HL,
typename LL,
typename HR,
typename LR>
90 template <
typename HL,
typename LL,
typename HR,
typename LR>
100 template <
typename HL,
typename LL,
typename HR,
typename LR>
104 if (lhs.high != rhs.high) {
105 return lhs.
high < rhs.high;
107 return lhs.low < rhs.low;
110 template <
typename HL,
typename LL,
typename HR,
typename LR>
115 if (result.
low < rhs.
low) {
121 template <
typename HL,
typename LL,
typename HR,
typename LR>
126 if (result.
low > lhs.
low) {
133 template <
typename HL,
typename LL,
typename HR,
typename LR>
148 const uint64_t LOW = 0x00000000FFFFFFFFLL;
149 const uint64_t HIGH = 0xFFFFFFFF00000000LL;
151 uint64_t
d = lhs.
low & LOW;
152 uint64_t c = (lhs.
low & HIGH) >> 32LL;
153 uint64_t
b = lhs.
high & LOW;
154 uint64_t a = (lhs.
high & HIGH) >> 32LL;
156 uint64_t h = rhs.
low & LOW;
157 uint64_t g = (rhs.
low & HIGH) >> 32LL;
158 uint64_t
f = rhs.
high & LOW;
159 uint64_t e = (rhs.
high & HIGH) >> 32LL;
162 uint64_t acc = d * h;
163 uint64_t low = acc & LOW;
167 uint64_t acc2 = acc + c * h;
175 low |= (acc << 32LL);
179 acc2 = (acc >> 32LL) | (carry << 32LL);
194 uint64_t high = acc & LOW;
197 acc2 = (acc >> 32LL) | (carry << 32LL);
203 high |= (acc2 << 32LL);
208 template <
typename HL,
typename LL,
typename HR,
typename LR>
214 }
else if (lhs < rhs) {
224 power2 = power2 + power2;
232 result = result + power2;
248 #endif // EIGEN_CXX11_TENSOR_TENSOR_UINT128_H
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T operator/(const T &numerator, const TensorIntDivisor< T, div_gt_one > &divisor)
#define EIGEN_ALWAYS_INLINE
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE TensorUInt128< uint64_t, uint64_t > operator-(const TensorUInt128< HL, LL > &lhs, const TensorUInt128< HR, LR > &rhs)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE HIGH upper() const
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool operator==(const TensorUInt128< HL, LL > &lhs, const TensorUInt128< HR, LR > &rhs)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static_val()
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE LOW lower() const
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE TensorUInt128(const TensorUInt128< OTHER_HIGH, OTHER_LOW > &other)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool operator!=(const TensorUInt128< HL, LL > &lhs, const TensorUInt128< HR, LR > &rhs)
static const uint64_t value
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static_val(const T &v)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorUInt128< uint64_t, uint64_t > operator*(const TensorUInt128< HL, LL > &lhs, const TensorUInt128< HR, LR > &rhs)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE TensorUInt128(const T &x)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE TensorUInt128< uint64_t, uint64_t > operator+(const TensorUInt128< HL, LL > &lhs, const TensorUInt128< HR, LR > &rhs)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool operator>=(const TensorUInt128< HL, LL > &lhs, const TensorUInt128< HR, LR > &rhs)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE TensorUInt128(HIGH y, LOW x)
EIGEN_DEVICE_FUNC const Scalar & b