From c5b234196ad38b280f285580f451492aa7915300 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Wed, 3 Apr 2024 19:49:31 +0000 Subject: [PATCH] Fix unused variable warning in TensorIO.h --- unsupported/Eigen/CXX11/src/Tensor/TensorIO.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h index 4b8503c53..b1928c4a1 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h @@ -218,9 +218,8 @@ struct TensorPrinter { static void run(std::ostream& s, const Tensor& tensor, const Format& fmt) { typedef typename Tensor::Index IndexType; - static const int layout = Tensor::Layout; - eigen_assert(layout == RowMajor); + eigen_assert(Tensor::Layout == RowMajor); typedef std::conditional_t::value || is_same::value || is_same::value || is_same::value, int, @@ -363,13 +362,12 @@ struct TensorPrinter 0) { const IndexType first_dim = Eigen::internal::array_get<0>(tensor.dimensions()); - Map> matrix(tensor.data(), first_dim, total_size / first_dim); + Map> matrix(tensor.data(), first_dim, total_size / first_dim); s << matrix; return; }