From f4ca8ad9178b5fa1b83697e1a645e55d65df5639 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Fri, 4 Dec 2015 18:14:16 -0800 Subject: [PATCH] Use signed integers instead of unsigned ones more consistently in the codebase. --- .../Eigen/CXX11/src/Tensor/TensorContraction.h | 2 +- .../Eigen/CXX11/src/Tensor/TensorDimensions.h | 12 ++++++------ unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h index fa62b25c2..9e208934b 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h @@ -495,7 +495,7 @@ struct TensorContractionEvaluatorBase internal::array_size::Dimensions>::value; static const int RDims = internal::array_size::Dimensions>::value; - static const unsigned int ContractDims = internal::array_size::value; + static const int ContractDims = internal::array_size::value; static const int NumDims = max_n_1::size; typedef array left_dim_mapper_t; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h index 114871f49..f3c9a3148 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h @@ -265,10 +265,10 @@ struct tensor_index_linearization_helper // Dynamic size -template +template struct DSizes : array { typedef array Base; - static const std::size_t count = NumDims; + static const int count = NumDims; EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t rank() const { return NumDims; @@ -278,8 +278,8 @@ struct DSizes : array { return internal::array_prod(*static_cast(this)); } - EIGEN_DEVICE_FUNC DSizes() { - for (std::size_t i = 0 ; i < NumDims; ++i) { + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DSizes() { + for (int i = 0 ; i < NumDims; ++i) { (*this)[i] = 0; } } @@ -369,10 +369,10 @@ struct tensor_vsize_index_linearization_helper namespace internal { -template struct array_size > { +template struct array_size > { static const size_t value = NumDims; }; -template struct array_size > { +template struct array_size > { static const size_t value = NumDims; }; #ifndef EIGEN_EMULATE_CXX11_META_H diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h index ee6f14b8f..98631fc7f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h @@ -63,7 +63,7 @@ class TensorStorage // pure dynamic -template +template class TensorStorage, Options_> { public: