aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-07-29 11:38:53 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-07-29 11:38:53 +0200
commit6db3a557f4734db4f9c8ed784541d556d5180339 (patch)
treeaea0b4e6de91ccdc12846d4c3a7e579b3d168e94 /unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h
parentaec48143701446e22667549e34509875e42513f9 (diff)
Add missing specialization of struct DividerTraits<long>
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h
index b16863fa5..e44678226 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h
@@ -79,6 +79,10 @@ namespace {
static const int N = 32;
#endif
};
+ // In C++, long is not int32_t nor int64_t, so we need a specialization for it:
+ template <>
+ struct DividerTraits<long> : internal::conditional<sizeof(long)==4,DividerTraits<int32_t>,DividerTraits<int64_t> >::type
+ {};
template <typename T>
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE uint32_t muluh(const uint32_t a, const T b) {