From 2918f85ba976dbfbf72f7d4c1961a577f5850148 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Mon, 9 Dec 2019 16:19:38 -0800 Subject: Do not use std::vector in getResourceRequirements --- unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h b/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h index 77fa32dc7..bed7a1b00 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h @@ -167,12 +167,12 @@ struct TensorEvaluator, Device> return rslt; } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void getResourceRequirements( - std::vector* resources) const { - Eigen::Index block_total_size_max = numext::maxi( + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + internal::TensorBlockV2ResourceRequirements getResourceRequirements() const { + const size_t target_block_size = numext::maxi( 1, m_device.firstLevelCacheSize() / sizeof(Scalar)); - resources->push_back(internal::TensorOpResourceRequirements( - internal::kSkewedInnerDims, block_total_size_max)); + return {internal::TensorBlockV2ShapeType::kSkewedInnerDims, + target_block_size}; } struct BlockIteratorState { -- cgit v1.2.3