diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2018-08-10 16:53:36 -0700 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2018-08-10 16:53:36 -0700 |
commit | f2209d06e428e0691de71f30fc2db4cb29191cd2 (patch) | |
tree | 37d7294a61f80c87389e8e930700a549554afe51 /unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h | |
parent | cfaedb38cd662def3b5684a20965b3bc1b0d6a3f (diff) |
Add block evaluationto CwiseUnaryOp and add PreferBlockAccess enum to all evaluators
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h b/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h index 0dd524a30..b8a57ab99 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h @@ -132,7 +132,12 @@ struct IsVectorizable<GpuDevice, Expression> { template <typename Device, typename Expression> struct IsTileable { - static const bool value = TensorEvaluator<Expression, Device>::BlockAccess; + // Check that block evaluation is supported and it's a preferred option (at + // least one sub-expression has much faster block evaluation, e.g. + // broadcasting). + static const bool value = + TensorEvaluator<Expression, Device>::BlockAccess & + TensorEvaluator<Expression, Device>::PreferBlockAccess; }; template <typename Expression, typename Device, |