From 1d104907c7118ea681eebe035376c0f0f263b609 Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Wed, 17 Jun 2026 15:22:15 +0200 Subject: [PATCH] fix number_of_generated_coefficient computation and missing include --- CHANGELOG.md | 1 + include/htool/hmatrix/hmatrix_output.hpp | 6 +----- include/htool/matrix/utils/output.hpp | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1482a32..dda07481 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ All notable changes to this project will be documented in this file. - Fix uninitialized values in `Partitioning_N`. - Fix bug in task-based HLU, PR#81 thanks to @ABoisneault. +- Fix `number_of_generated_coefficient` computation. ## [1.0.2] - 2026-02-14 diff --git a/include/htool/hmatrix/hmatrix_output.hpp b/include/htool/hmatrix/hmatrix_output.hpp index c74707d5..e8c69789 100644 --- a/include/htool/hmatrix/hmatrix_output.hpp +++ b/include/htool/hmatrix/hmatrix_output.hpp @@ -171,11 +171,7 @@ std::map get_hmatrix_information(const HMatrixget_symmetry() != 'N') { - number_of_generated_coefficient += (local_number_of_rows * (local_number_of_cols + 1)) / 2.; - } else { - number_of_generated_coefficient += (local_number_of_rows * local_number_of_cols); - } + number_of_generated_coefficient += (local_number_of_rows * local_number_of_cols); } meaninfos[0] = (dense_blocks.size() == 0 ? 0 : meaninfos[0] / dense_blocks.size()); diff --git a/include/htool/matrix/utils/output.hpp b/include/htool/matrix/utils/output.hpp index fddedbe4..6bfc0808 100644 --- a/include/htool/matrix/utils/output.hpp +++ b/include/htool/matrix/utils/output.hpp @@ -2,6 +2,7 @@ #define HTOOL_MATRIX_UTILS_OUTPUT_HPP #include "../../misc/logger.hpp" +#include "../matrix.hpp" #include "modifiers.hpp" #include #include