diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2019-09-24 12:52:45 -0700 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2019-09-24 12:52:45 -0700 |
commit | ef9dfee7bdc8e0d82c9b7ddf9414ef99d866d7ba (patch) | |
tree | 490a8ae1f247cf226475f504ea1d3ab305b98097 /unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h | |
parent | efd9867ff0e8df23016ac6c9828d0d7bf8bec1b1 (diff) |
Tensor block evaluation V2 support for unary/binary/broadcsting
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h | 19 |
1 files changed, 12 insertions, 7 deletions
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<const TensorForcedEvalOp<ArgType_>, Device> IsAligned = true, PacketAccess = (PacketType<CoeffReturnType, Device>::size > 1), BlockAccess = internal::is_arithmetic<CoeffReturnType>::value, + BlockAccessV2 = false, PreferBlockAccess = false, Layout = TensorEvaluator<ArgType, Device>::Layout, RawAccess = true @@ -109,8 +110,12 @@ struct TensorEvaluator<const TensorForcedEvalOp<ArgType_>, Device> CoeffReturnType, Index, internal::traits<ArgType>::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<const TensorForcedEvalOp<ArgType_>, Device> #endif typedef TensorEvalToOp< const typename internal::remove_const<ArgType>::type > EvalTo; EvalTo evalToTmp(m_device.get(m_buffer), m_op); - const bool Vectorize = internal::IsVectorizable<Device, const ArgType>::value; - const bool Tile = TensorEvaluator<const ArgType, Device>::BlockAccess && - TensorEvaluator<const ArgType, Device>::PreferBlockAccess; - internal::TensorExecutor<const EvalTo, - typename internal::remove_const<Device>::type, - Vectorize, Tile>::run(evalToTmp, m_device); + internal::TensorExecutor< + const EvalTo, typename internal::remove_const<Device>::type, + /*Vectorizable=*/internal::IsVectorizable<Device, const ArgType>::value, + /*Tiling=*/internal::IsTileable<Device, const ArgType>::value>:: + run(evalToTmp, m_device); + return true; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() { |