From 09653e1f82ece16d6ff8663df5c5cad80ea9ccb5 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 11 May 2016 23:29:09 -0700 Subject: Improved the portability of the tensor code --- unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h b/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h index 5950f38e2..3558d4785 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h @@ -73,22 +73,22 @@ struct TensorUInt128 template -EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -static bool operator == (const TensorUInt128& lhs, const TensorUInt128& rhs) +static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +bool operator == (const TensorUInt128& lhs, const TensorUInt128& rhs) { return (lhs.high == rhs.high) & (lhs.low == rhs.low); } template -EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -static bool operator != (const TensorUInt128& lhs, const TensorUInt128& rhs) +static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +bool operator != (const TensorUInt128& lhs, const TensorUInt128& rhs) { return (lhs.high != rhs.high) | (lhs.low != rhs.low); } template -EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -static bool operator >= (const TensorUInt128& lhs, const TensorUInt128& rhs) +static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +bool operator >= (const TensorUInt128& lhs, const TensorUInt128& rhs) { if (lhs.high != rhs.high) { return lhs.high > rhs.high; @@ -97,8 +97,8 @@ static bool operator >= (const TensorUInt128& lhs, const TensorUInt128 -EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -static bool operator < (const TensorUInt128& lhs, const TensorUInt128& rhs) +static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +bool operator < (const TensorUInt128& lhs, const TensorUInt128& rhs) { if (lhs.high != rhs.high) { return lhs.high < rhs.high; @@ -107,8 +107,8 @@ static bool operator < (const TensorUInt128& lhs, const TensorUInt128
-EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -static TensorUInt128 operator + (const TensorUInt128& lhs, const TensorUInt128& rhs) +static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +TensorUInt128 operator + (const TensorUInt128& lhs, const TensorUInt128& rhs) { TensorUInt128 result(lhs.high + rhs.high, lhs.low + rhs.low); if (result.low < rhs.low) { @@ -118,8 +118,8 @@ static TensorUInt128 operator + (const TensorUInt128 } template -EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -static TensorUInt128 operator - (const TensorUInt128& lhs, const TensorUInt128& rhs) +static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +TensorUInt128 operator - (const TensorUInt128& lhs, const TensorUInt128& rhs) { TensorUInt128 result(lhs.high - rhs.high, lhs.low - rhs.low); if (result.low > lhs.low) { @@ -130,8 +130,8 @@ static TensorUInt128 operator - (const TensorUInt128 template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE -static TensorUInt128 operator * (const TensorUInt128& lhs, const TensorUInt128& rhs) +static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE +TensorUInt128 operator * (const TensorUInt128& lhs, const TensorUInt128& rhs) { // Split each 128-bit integer into 4 32-bit integers, and then do the // multiplications by hand as follow: @@ -205,8 +205,8 @@ static TensorUInt128 operator * (const TensorUInt128 } template -EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE -static TensorUInt128 operator / (const TensorUInt128& lhs, const TensorUInt128& rhs) +static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE +TensorUInt128 operator / (const TensorUInt128& lhs, const TensorUInt128& rhs) { if (rhs == TensorUInt128, static_val<1> >(1)) { return TensorUInt128(lhs.high, lhs.low); -- cgit v1.2.3