From 0db590d22db198154f4302d85fbbd892316d36da Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Thu, 13 Sep 2018 16:20:57 -0700 Subject: [PATCH] Backed out changeset 01197e44527941c95f9a63e4f60ab3a989f12cbe --- unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h | 2 ++ unsupported/test/cxx11_tensor_executor.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h index 8d93aacee..e8c47c5b5 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h @@ -1205,6 +1205,7 @@ struct TensorEvaluator, const Index max_coeff_count, const DSizes& input_slice_sizes, DSizes* target_input_block_sizes) const { + typedef typename internal::packet_traits::type Packet; typedef internal::BlockReducer BlockReducer; // TODO(andydavis) Compute reducer overhead correctly for the case where // we are preserving the inner most dimension, and a single reducer @@ -1232,6 +1233,7 @@ struct TensorEvaluator, } else if (!first_preserved_dim_allocated) { // TODO(andydavis) Include output block size in this L1 working set // calculation. + const Index allocated = max_coeff_count - coeff_to_allocate; const Index alloc_size = numext::maxi( static_cast(1), coeff_to_allocate / reducer_overhead); (*target_input_block_sizes)[dim] = diff --git a/unsupported/test/cxx11_tensor_executor.cpp b/unsupported/test/cxx11_tensor_executor.cpp index 1bb99854c..8639e7b38 100644 --- a/unsupported/test/cxx11_tensor_executor.cpp +++ b/unsupported/test/cxx11_tensor_executor.cpp @@ -27,7 +27,7 @@ static array RandomDims(int min_dim = 1, int max_dim = 20) { dims[i] = internal::random(min_dim, max_dim); } return dims; -} +}; template @@ -117,7 +117,7 @@ static void test_execute_broadcasting(Device d) for (Index i = 0; i < dst.dimensions().TotalSize(); ++i) { VERIFY_IS_EQUAL(dst.coeff(i), golden.coeff(i)); } -} +}; template @@ -155,7 +155,7 @@ static void test_execute_chipping_rvalue(Device d) { TEST_CHIPPING(5) #undef TEST_CHIPPING -} +}; template @@ -207,7 +207,7 @@ static void test_execute_chipping_lvalue(Device d) { TEST_CHIPPING(5) #undef TEST_CHIPPING -} +}; template