diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2019-11-26 15:02:24 -0800 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2019-11-26 15:02:24 -0800 |
commit | 5496d0da0bb6d11297253d6747034577299143f9 (patch) | |
tree | c5dbad05f9d43b71a49f4338b77d24c57f8ca00c /unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h | |
parent | bc66c88255a29460fb26dde0a8558db6a3524cd5 (diff) |
Add async evaluation support to TensorReverse
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h index 1db5d2e5e..c5830da0a 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h @@ -173,6 +173,15 @@ struct TensorEvaluator<const TensorReverseOp<ReverseDimensions, ArgType>, Device m_impl.evalSubExprsIfNeeded(NULL); return true; } + +#ifdef EIGEN_USE_THREADS + template <typename EvalSubExprsCallback> + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalSubExprsIfNeededAsync( + EvaluatorPointerType, EvalSubExprsCallback done) { + m_impl.evalSubExprsIfNeededAsync(nullptr, [done](bool) { done(true); }); + } +#endif // EIGEN_USE_THREADS + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() { m_impl.cleanup(); } |