From 99cde88341145c43fc4134af07556d8c6ff12066 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Tue, 2 Feb 2016 11:06:53 -0800 Subject: Don't try to use direct offsets when computing a tensor product, since the required stride isn't available. --- unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h index 63c8ae126..392aa6d37 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h @@ -344,7 +344,7 @@ class TensorContractionSubMapper { enum { // We can use direct offsets iff the parent mapper supports then and we can compute the strides. // TODO: we should also enable direct offsets for the Rhs case. - UseDirectOffsets = (side == Lhs) && inner_dim_contiguous && ParentMapper::DirectOffsets + UseDirectOffsets = ParentMapper::DirectOffsets && (side == Lhs) && inner_dim_contiguous && (array_size::value > 0) }; EIGEN_DEVICE_FUNC TensorContractionSubMapper(const ParentMapper& base_mapper, Index vert_offset, Index horiz_offset) -- cgit v1.2.3