From 5496d0da0bb6d11297253d6747034577299143f9 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Tue, 26 Nov 2019 15:02:24 -0800 Subject: Add async evaluation support to TensorReverse --- unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h') 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, Device m_impl.evalSubExprsIfNeeded(NULL); return true; } + +#ifdef EIGEN_USE_THREADS + template + 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(); } -- cgit v1.2.3