Skip to content

Commit

Permalink
Improving debug print out to track bug
Browse files Browse the repository at this point in the history
Signed-off-by: Luc Berger-Vergiat <[email protected]>
  • Loading branch information
lucbv committed Nov 28, 2024
1 parent b24686b commit 66c5cc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions batched/dense/unit_test/Test_Batched_SerialQR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ struct qrFunctor {
if (rowIdx <= colIdx) {
if (Kokkos::abs(B(rowIdx, colIdx) - A(rowIdx, colIdx)) > tol * Kokkos::abs(A(rowIdx, colIdx))) {
error += 1;
Kokkos::printf("matIdx=%d, B(%d, %d)=%e instead of %e.\n", matIdx, rowIdx, colIdx, B(rowIdx, colIdx), A(rowIdx, colIdx));
Kokkos::printf("B stores R\nmatIdx=%d, B(%d, %d)=%e instead of %e.\n", matIdx, rowIdx, colIdx, B(rowIdx, colIdx), A(rowIdx, colIdx));
}
} else {
if (Kokkos::abs(B(rowIdx, colIdx)) > 1000 * tol) {
error += 1;
Kokkos::printf("matIdx=%d, B(%d, %d)=%e instead of 0.0.\n", matIdx, rowIdx, colIdx, B(rowIdx, colIdx));
Kokkos::printf("B stores R\nmatIdx=%d, B(%d, %d)=%e instead of 0.0.\n", matIdx, rowIdx, colIdx, B(rowIdx, colIdx));
}
}
}
Expand Down

0 comments on commit 66c5cc9

Please sign in to comment.