From b2f95d37338a09166e9fd4e507eb355c1dd11bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Sat, 14 Mar 2026 15:43:24 +0000 Subject: [PATCH] Fix more cache size queries. libeigen/eigen!2295 --- Eigen/Core | 7 +++++-- test/redux.cpp | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Eigen/Core b/Eigen/Core index ccf7a0c1a..47d599cd0 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -129,8 +129,11 @@ #include #endif -// Required for querying cache sizes on macOS. -#if EIGEN_OS_MAC +// Required for querying cache sizes on Linux and macOS. +#if EIGEN_OS_LINUX +#include +#elif EIGEN_OS_MAC +#include #include #endif diff --git a/test/redux.cpp b/test/redux.cpp index a952d67c9..fa1ff994f 100644 --- a/test/redux.cpp +++ b/test/redux.cpp @@ -14,8 +14,8 @@ #include "main.h" -template -void matrixRedux(const MatrixType& m) { + template + void matrixRedux(const MatrixType& m) { typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; @@ -318,6 +318,7 @@ EIGEN_DECLARE_TEST(redux) { // bool packets are typically 16 bytes (SSE) or 32 bytes (AVX). // Test sizes around common packet sizes to catch off-by-one in remainder loops. const Index bsizes[] = {1, 2, 3, 7, 8, 9, 15, 16, 17, 31, 32, 33, 63, 64, 65, 127, 128, 129}; + EIGEN_UNUSED_VARIABLE(bsizes); for (int si = 0; si < 18; ++si) { CALL_SUBTEST_11(boolRedux(bsizes[si], 1)); // column vector CALL_SUBTEST_11(boolRedux(1, bsizes[si])); // row vector