From 490d26e4c14554716298c3bc4123571bbf92a1b2 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Fri, 4 Dec 2015 10:15:11 -0800 Subject: Use integers instead of std::size_t to encode the number of dimensions in the Tensor class since most of the code currently already use integers. --- unsupported/Eigen/CXX11/src/Tensor/Tensor.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/Tensor.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/Tensor.h b/unsupported/Eigen/CXX11/src/Tensor/Tensor.h index 0df1345c2..6d357545c 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/Tensor.h +++ b/unsupported/Eigen/CXX11/src/Tensor/Tensor.h @@ -59,7 +59,7 @@ namespace Eigen { * \ref TopicStorageOrders */ -template +template class Tensor : public TensorBase > { public: @@ -82,7 +82,7 @@ class Tensor : public TensorBase Dimensions; protected: @@ -433,7 +433,7 @@ class Tensor : public TensorBase& dimensions) { - std::size_t i; + int i; Index size = Index(1); for (i = 0; i < NumIndices; i++) { internal::check_rows_cols_for_overflow::run(size, dimensions[i]); @@ -451,7 +451,7 @@ class Tensor : public TensorBase& dimensions) { array dims; - for (std::size_t i = 0; i < NumIndices; ++i) { + for (int i = 0; i < NumIndices; ++i) { dims[i] = dimensions[i]; } resize(dims); @@ -480,7 +480,7 @@ class Tensor : public TensorBase& dimensions) { array dims; - for (std::size_t i = 0; i < NumIndices; ++i) { + for (int i = 0; i < NumIndices; ++i) { dims[i] = static_cast(dimensions[i]); } resize(dims); @@ -490,7 +490,7 @@ class Tensor : public TensorBase& dimensions) { array dims; - for (std::size_t i = 0; i < NumIndices; ++i) { + for (int i = 0; i < NumIndices; ++i) { dims[i] = static_cast(dimensions[i]); } resize(dims); -- cgit v1.2.3