From df0e8b81370f741c734e4f4187d029d6a8cb18f2 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Thu, 17 Oct 2019 11:17:33 -0700 Subject: Propagate block evaluation preference through rvalue tensor expressions --- unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h index fe30f9867..32d6960bf 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h @@ -157,8 +157,10 @@ struct TensorEvaluator, Device> // Chipping inner-most dimension. IsInnerChipping = (static_cast(Layout) == ColMajor && DimId == 0) || (static_cast(Layout) == RowMajor && DimId == NumInputDims - 1), - // Do not choose block access if chipping is trivial. - PreferBlockAccess = !IsOuterChipping, + // Prefer block access if the underlying expression prefers it, otherwise + // only if chipping is not trivial. + PreferBlockAccess = TensorEvaluator::PreferBlockAccess || + !IsOuterChipping, CoordAccess = false, // to be implemented RawAccess = false }; -- cgit v1.2.3