clear out all non-normals on load

This commit is contained in:
Sigbjørn Skjæret 2024-06-13 08:16:29 +02:00 committed by GitHub
parent fe21ef7920
commit 4c29bb0494
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -343,7 +343,7 @@ bool IMatrixCollector::load_imatrix(const char * fname) {
// Recreate the state as expected by save_imatrix(), and corerct for weighted sum. // Recreate the state as expected by save_imatrix(), and corerct for weighted sum.
for (int i = 0; i < nval; i++) { for (int i = 0; i < nval; i++) {
if (tmp[i]) { if (std::isnormal(tmp[i])) {
e.values[i] += tmp[i]; e.values[i] += tmp[i];
e.counts[i] += ncall; e.counts[i] += ncall;
} }