aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2018-09-13 16:20:57 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2018-09-13 16:20:57 -0700
commit0db590d22db198154f4302d85fbbd892316d36da (patch)
treef84f6682bc909955e1c6e460fdcaea983fdb3851 /unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h
parentb3f4c067d96ccac919a2789113c3ac87eda43a00 (diff)
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h2
1 files changed, 2 insertions, 0 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 TensorReductionOp<Op, Dims, ArgType, MakePointer_>,
const Index max_coeff_count,
const DSizes<Index, NumInputDims>& input_slice_sizes,
DSizes<Index, NumInputDims>* target_input_block_sizes) const {
+ typedef typename internal::packet_traits<Scalar>::type Packet;
typedef internal::BlockReducer<Self, Op> 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<const TensorReductionOp<Op, Dims, ArgType, MakePointer_>,
} 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<Index>(1), coeff_to_allocate / reducer_overhead);
(*target_input_block_sizes)[dim] =