Fix ambiguous static_cast in JacobiSVD blocking threshold

libeigen/eigen!2215

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
Rasmus Munk Larsen
2026-02-25 19:48:20 -08:00
parent d8ed4f6884
commit 6e2aff6b5d

View File

@@ -773,8 +773,7 @@ JacobiSVD<MatrixType, Options>& JacobiSVD<MatrixType, Options>::compute_impl(con
#ifdef EIGEN_JACOBI_SVD_BLOCKING_THRESHOLD
const Index blockingThreshold = EIGEN_JACOBI_SVD_BLOCKING_THRESHOLD;
#else
const Index blockingThreshold =
static_cast<Index>(numext::sqrt(static_cast<RealScalar>(l2CacheSize() / sizeof(float))));
const Index blockingThreshold = static_cast<Index>(std::sqrt(static_cast<double>(l2CacheSize() / sizeof(float))));
#endif
if (n >= blockingThreshold) {