diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2019-11-26 11:41:57 -0800 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2019-11-26 11:41:57 -0800 |
commit | bc66c88255a29460fb26dde0a8558db6a3524cd5 (patch) | |
tree | fb0d883d7abc904db7080b842b34488a6c02a23c /unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h | |
parent | c79b6ffe1fcf8c12005942a1268f79b7d6ecf700 (diff) |
Add async evaluation support to TensorPadding/TensorImagePatch/TensorShuffling
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h b/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h index 49bc60f0a..76bed5526 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h @@ -397,6 +397,14 @@ struct TensorEvaluator<const TensorImagePatchOp<Rows, Cols, ArgType>, Device> 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(); } |