diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-12-04 18:14:16 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-12-04 18:14:16 -0800 |
commit | f4ca8ad9178b5fa1b83697e1a645e55d65df5639 (patch) | |
tree | ca4ea868a5ac80a8b8ed3677519b0c7225fc0521 /unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h | |
parent | 490d26e4c14554716298c3bc4123571bbf92a1b2 (diff) |
Use signed integers instead of unsigned ones more consistently in the codebase.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h | 12 |
1 files changed, 6 insertions, 6 deletions
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<Index, NumIndices, 0, RowMajor> // Dynamic size -template <typename DenseIndex, std::size_t NumDims> +template <typename DenseIndex, int NumDims> struct DSizes : array<DenseIndex, NumDims> { typedef array<DenseIndex, NumDims> 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<DenseIndex, NumDims> { return internal::array_prod(*static_cast<const Base*>(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<Index, NumIndices, 0, RowMajor> namespace internal { -template <typename DenseIndex, std::size_t NumDims> struct array_size<const DSizes<DenseIndex, NumDims> > { +template <typename DenseIndex, int NumDims> struct array_size<const DSizes<DenseIndex, NumDims> > { static const size_t value = NumDims; }; -template <typename DenseIndex, std::size_t NumDims> struct array_size<DSizes<DenseIndex, NumDims> > { +template <typename DenseIndex, int NumDims> struct array_size<DSizes<DenseIndex, NumDims> > { static const size_t value = NumDims; }; #ifndef EIGEN_EMULATE_CXX11_META_H |