From 21d3c574f4c94ea499843d42b0c1622822706d6a Mon Sep 17 00:00:00 2001 From: aboisnea Date: Thu, 18 Dec 2025 14:37:04 +0100 Subject: [PATCH] Fix: wrong boolean tests in triangular_matrix_matrix_solve --- CHANGELOG.md | 1 + include/htool/matrix/linalg/factorization.hpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d0ef60b..bf63daa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fix wrong boolean tests in triangular_matrix_matrix_solve, PR #75 from @ABoisneault - Avoid empty-sized gemv, PR #64 from @prj- ## [1.0.0] - 2027-09-24 diff --git a/include/htool/matrix/linalg/factorization.hpp b/include/htool/matrix/linalg/factorization.hpp index 3370b52e..09b34833 100644 --- a/include/htool/matrix/linalg/factorization.hpp +++ b/include/htool/matrix/linalg/factorization.hpp @@ -32,7 +32,7 @@ void triangular_matrix_matrix_solve(char side, char UPLO, char transa, char diag if (ipiv.size() > 0) { int index = 0; while (index < ipiv.size() and not is_pivoted) { - is_pivoted = (ipiv[index] == index + 1); + is_pivoted = !(ipiv[index] == index + 1); index += 1; } } @@ -53,7 +53,7 @@ void triangular_matrix_matrix_solve(char side, char UPLO, char transa, char diag } Blas::trsm(&side, &UPLO, &transa, &diag, &m, &n, &alpha, A.data(), &lda, B.data(), &ldb); - // std::cout <<"TEST "<