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/TensorPadding.h | |
parent | 39fb9eeccf2e79542acad9bbf5196e462c1b2cee (diff) |
Block evaluation for TensorGenerator/TensorReverse/TensorShuffling
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h b/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h index a0b4e04b1..99c74fc67 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h @@ -230,7 +230,8 @@ struct TensorEvaluator<const TensorPaddingOp<PaddingDimensions, 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 { // If one of the dimensions is zero, return empty block view. if (desc.size() == 0) { return TensorBlockV2(internal::TensorBlockKind::kView, NULL, @@ -240,8 +241,8 @@ struct TensorEvaluator<const TensorPaddingOp<PaddingDimensions, ArgType>, Device // Check if we can reuse `desc` destination, or allocate new scratch buffer. ScalarNoConst* materialized_output = desc.template destination<ScalarNoConst, Layout>(); - bool materialized_in_output; + if (materialized_output != NULL) { desc.DropDestinationBuffer(); materialized_in_output = true; |