From a7779a9b427ffe755fb163e7bfdb1eda4fb1f73e Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Tue, 29 Jan 2019 16:48:21 +0100 Subject: Hide some annoying unused variable warnings in g++8.1 --- unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h index 2d3b69128..64dfcd297 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h @@ -120,6 +120,7 @@ class SimpleTensorContractionMapper { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index computeIndex(Index row, Index col) const { const bool left = (side == Lhs); + EIGEN_UNUSED_VARIABLE(left); // annoying bug in g++8.1: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85963 Index nocontract_val = left ? row : col; Index linidx = 0; for (int i = static_cast(array_size::value) - 1; i > 0; i--) { @@ -158,6 +159,7 @@ class SimpleTensorContractionMapper { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE IndexPair computeIndexPair(Index row, Index col, const Index distance) const { const bool left = (side == Lhs); + EIGEN_UNUSED_VARIABLE(left); // annoying bug in g++8.1: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85963 Index nocontract_val[2] = {left ? row : col, left ? row + distance : col}; Index linidx[2] = {0, 0}; if (array_size::value > array_size::value) { -- cgit v1.2.3