aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2018-09-28 19:33:39 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2018-09-28 19:33:39 +0200
commit86ba50be391df0d099e002d303bd4ee94fb319eb (patch)
treeb29508a3958e18a5fd3b7105b84df7846bdbc92d /unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h
parent2c083ace3ecec6c2894f41d96d6c2b7a48dff7e2 (diff)
Fix integer conversion warnings
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h
index 4553c3785..3dc95621c 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h
@@ -791,7 +791,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
// The underlying GEMM kernel assumes that k is a multiple of 8 and
// subtle breakage occurs if this is violated.
Index block_size = 8 * divup<Index>(k, 8 * num_threads);
- int num_blocks = divup<Index>(k, block_size);
+ int num_blocks = internal::convert_index<int>(divup<Index>(k, block_size));
// we use 'result' for the first block's partial result.
MaxSizeVector<Scalar*> block_buffers(num_blocks - 1);
Barrier barrier(num_blocks);
@@ -855,7 +855,7 @@ struct TensorEvaluator<const TensorContractionOp<Indices, LeftArgType, RightArgT
// result.
double reduction_cost = TensorCostModel<ThreadPoolDevice>::totalCost(
m * n, TensorOpCost(2, 1, 1, true, output_packet_size));
- Index num_threads = 1;
+ int num_threads = 1;
double min_cost = total_parallel_cost;
double kPerThreadOverHead = 4000;
double kFixedOverHead = 100000;