From 02db1228ed9ca3728ae0685a5e1602fe7299ae50 Mon Sep 17 00:00:00 2001 From: Ville Kallioniemi Date: Tue, 26 Jan 2016 23:41:01 -0700 Subject: Add constructor for long types. --- unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h | 6 ++++++ 1 file changed, 6 insertions(+) (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 4f2adb671..19352eb5e 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h @@ -40,6 +40,12 @@ struct TensorUInt128 EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE TensorUInt128(unsigned int x) : high(0), low(x) { } EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE + TensorUInt128(long x) : high(0), low(x) { + eigen_assert(x >= 0); + } + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE + TensorUInt128(unsigned long x) : high(0), low(x) { } + EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE TensorUInt128(int64_t x) : high(0), low(x) { eigen_assert(x >= 0); } -- cgit v1.2.3