mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix flaky tests: add iteration guards, yield in busy-waits, cap thread count
libeigen/eigen!2208 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -177,8 +177,8 @@ void svd_min_norm(const MatrixType& m) {
|
||||
int guard = 0;
|
||||
do {
|
||||
m2.setRandom();
|
||||
} while (SVD_FOR_MIN_NORM(MatrixType2)(m2).setThreshold(test_precision<Scalar>()).rank() != rank && (++guard) < 10);
|
||||
VERIFY(guard < 10);
|
||||
} while (SVD_FOR_MIN_NORM(MatrixType2)(m2).setThreshold(test_precision<Scalar>()).rank() != rank && (++guard) < 100);
|
||||
VERIFY(guard < 100);
|
||||
|
||||
RhsType2 rhs2 = RhsType2::Random(rank);
|
||||
// use QR to find a reference minimal norm solution
|
||||
|
||||
Reference in New Issue
Block a user