From ef9dfee7bdc8e0d82c9b7ddf9414ef99d866d7ba Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Tue, 24 Sep 2019 12:52:45 -0700 Subject: Tensor block evaluation V2 support for unary/binary/broadcsting --- unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h b/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h index efd6a7557..8d45bd62a 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h @@ -97,6 +97,7 @@ struct TensorEvaluator, Device> IsAligned = true, PacketAccess = (PacketType::size > 1), BlockAccess = internal::is_arithmetic::value, + BlockAccessV2 = false, PreferBlockAccess = false, Layout = TensorEvaluator::Layout, RawAccess = true @@ -109,8 +110,12 @@ struct TensorEvaluator, Device> CoeffReturnType, Index, internal::traits::NumDimensions, Layout> TensorBlockReader; + //===- Tensor block evaluation strategy (see TensorBlock.h) -------------===// + typedef internal::TensorBlockNotImplemented TensorBlockV2; + //===--------------------------------------------------------------------===// + EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const Device& device) - : m_impl(op.expression(), device), m_op(op.expression()), + : m_impl(op.expression(), device), m_op(op.expression()), m_device(device), m_buffer(NULL) { } @@ -132,13 +137,13 @@ struct TensorEvaluator, Device> #endif typedef TensorEvalToOp< const typename internal::remove_const::type > EvalTo; EvalTo evalToTmp(m_device.get(m_buffer), m_op); - const bool Vectorize = internal::IsVectorizable::value; - const bool Tile = TensorEvaluator::BlockAccess && - TensorEvaluator::PreferBlockAccess; - internal::TensorExecutor::type, - Vectorize, Tile>::run(evalToTmp, m_device); + internal::TensorExecutor< + const EvalTo, typename internal::remove_const::type, + /*Vectorizable=*/internal::IsVectorizable::value, + /*Tiling=*/internal::IsTileable::value>:: + run(evalToTmp, m_device); + return true; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() { -- cgit v1.2.3