diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2019-10-14 14:31:59 -0700 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2019-10-14 14:31:59 -0700 |
commit | d380c23b2cc0b02e10819e779c73cde2c62603b2 (patch) | |
tree | 09d204c87ed6a9f55aa0c6305d7e4199a71dbf8a /unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h | |
parent | 39fb9eeccf2e79542acad9bbf5196e462c1b2cee (diff) |
Block evaluation for TensorGenerator/TensorReverse/TensorShuffling
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h index 6e7abeb09..a51c88540 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h @@ -355,7 +355,8 @@ struct TensorEvaluator<const TensorReverseOp<ReverseDimensions, ArgType>, Device } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlockV2 - blockV2(TensorBlockDesc& desc, TensorBlockScratch& scratch) const { + blockV2(TensorBlockDesc& desc, TensorBlockScratch& scratch, + bool /*root_of_expr_ast*/ = false) const { // TODO(ezhulenev): If underlying tensor expression supports and prefers // block evaluation we must use it. Currently we use coeff and packet // access into the underlying tensor expression. @@ -370,10 +371,12 @@ struct TensorEvaluator<const TensorReverseOp<ReverseDimensions, ArgType>, Device const bool inner_dim_reversed = m_reverse[inner_dim_idx]; // Try to reuse destination as an output block buffer. - CoeffReturnType* block_buffer = desc.template destination<CoeffReturnType, Layout>(); + CoeffReturnType* block_buffer = + desc.template destination<CoeffReturnType, Layout>(); bool materialized_in_output; if (block_buffer != NULL) { + desc.DropDestinationBuffer(); materialized_in_output = true; } else { |