From 7ce932edd33c56baab0a5c5a8e0608c6345efd53 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 20 Jan 2016 18:12:08 -0800 Subject: Small cleanup and small fix to the contraction of row major tensors --- unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h index 575ae7b54..624e814e2 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h @@ -147,8 +147,6 @@ struct TensorContractionEvaluatorBase static const int ContractDims = internal::array_size::value; static const int NumDims = max_n_1::size; - typedef array left_dim_mapper_t; - typedef array right_dim_mapper_t; typedef array contract_t; typedef array::size> left_nocontract_t; typedef array::size> right_nocontract_t; @@ -195,8 +193,8 @@ 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++) { - eval_op_indices[i].first = LDims - 1 - op.indices()[i].second; - eval_op_indices[i].second = RDims - 1 - op.indices()[i].first; + eval_op_indices[i].first = LDims - 1 - op.indices()[ContractDims - 1 - i].second; + eval_op_indices[i].second = RDims - 1 - op.indices()[ContractDims - 1 - i].first; } } @@ -504,9 +502,6 @@ struct TensorEvaluator::Dimensions>::value; static const int ContractDims = internal::array_size::value; - typedef array left_dim_mapper_t; - typedef array right_dim_mapper_t; - typedef array contract_t; typedef array::size> left_nocontract_t; typedef array::size> right_nocontract_t; -- cgit v1.2.3