diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-04-18 13:41:06 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-04-18 13:41:06 -0700 |
commit | 3b429b71e65916b689d0d16e0fac358a79f2dfbe (patch) | |
tree | 64b078f3f9807284d576b400654545aa2071835b /unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h | |
parent | 9c6b82bcd5a9129f3b51cfe9ce1927529a91d0c7 (diff) |
Fixed compilation warning triggered by gcc 4.7
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h index 84f2f715c..270383020 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h @@ -507,7 +507,7 @@ struct TensorContractionEvaluatorBase internal::array_size<typename TensorEvaluator<EvalLeftArgType, Device>::Dimensions>::value; static const int RDims = internal::array_size<typename TensorEvaluator<EvalRightArgType, Device>::Dimensions>::value; - static const int ContractDims = internal::array_size<Indices>::value; + static const unsigned int ContractDims = internal::array_size<Indices>::value; static const int NumDims = internal::max_n_1<LDims + RDims - 2 * ContractDims>::size; typedef array<Index, LDims> left_dim_mapper_t; @@ -545,7 +545,7 @@ struct TensorContractionEvaluatorBase eval_right_dims[i] = m_rightImpl.dimensions()[i]; } // We keep the pairs of contracting indices. - for (int i = 0; i < ContractDims; i++) { + for (unsigned int i = 0; i < ContractDims; i++) { eval_op_indices[i].first = op.indices()[i].first; eval_op_indices[i].second = op.indices()[i].second; } @@ -559,7 +559,7 @@ struct TensorContractionEvaluatorBase } // We need to flip all the pairs of contracting indices as well as // reversing the dimensions. - for (int i = 0; i < ContractDims; i++) { + for (unsigned int i = 0; i < ContractDims; i++) { eval_op_indices[i].first = LDims - 1 - op.indices()[i].second; eval_op_indices[i].second = RDims - 1 - op.indices()[i].first; } @@ -596,7 +596,7 @@ struct TensorContractionEvaluatorBase for (int i = 0; i < LDims; i++) { // find if we are contracting on index i of left tensor bool contracting = false; - for (int j = 0; j < ContractDims; j++) { + for (unsigned int j = 0; j < ContractDims; j++) { if (eval_op_indices[j].first == i) { contracting = true; break; @@ -624,7 +624,7 @@ struct TensorContractionEvaluatorBase for (int i = 0; i < RDims; i++) { bool contracting = false; // find if we are contracting on index i of right tensor - for (int j = 0; j < ContractDims; j++) { + for (unsigned int j = 0; j < ContractDims; j++) { if (eval_op_indices[j].second == i) { contracting = true; break; |