Revert "Lower BDCSVD crossover threshold from 16 to 8"

This reverts merge request !2358
This commit is contained in:
Rasmus Munk Larsen
2026-03-29 15:25:09 -07:00
parent 12fe90db8b
commit 9fe2f03fa4
4 changed files with 4 additions and 78 deletions

View File

@@ -58,9 +58,9 @@ struct traits<BDCSVD<MatrixType_, Options> > : svd_traits<MatrixType_, Options>
*
* This class first reduces the input matrix to bi-diagonal form using class UpperBidiagonalization,
* and then performs a divide-and-conquer diagonalization. Small blocks are diagonalized using class JacobiSVD.
* You can control the switching size with the setSwitchSize() method, default is 8.
* For small matrices (<8), it is thus preferable to directly use JacobiSVD. For larger ones, BDCSVD is highly
* recommended and can be several orders of magnitude faster.
* You can control the switching size with the setSwitchSize() method, default is 16.
* For small matrice (<16), it is thus preferable to directly use JacobiSVD. For larger ones, BDCSVD is highly
* recommended and can several order of magnitude faster.
*
* \warning this algorithm is unlikely to provide accurate result when compiled with unsafe math optimizations.
* For instance, this concerns Intel's compiler (ICC), which performs such optimization by default unless

View File

@@ -47,7 +47,7 @@ class bdcsvd_impl {
typedef Ref<ArrayXr> ArrayRef;
typedef Ref<ArrayXi> IndicesRef;
bdcsvd_impl() : m_algoswap(8), m_compU(false), m_compV(false), m_numIters(0), m_info(Success) {}
bdcsvd_impl() : m_algoswap(16), m_compU(false), m_compV(false), m_numIters(0), m_info(Success) {}
void allocate(Index diagSize, bool compU, bool compV);