Skip to content

Commit 4c29bb0

Browse files
authored
clear out all non-normals on load
1 parent fe21ef7 commit 4c29bb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/imatrix/imatrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ bool IMatrixCollector::load_imatrix(const char * fname) {
343343

344344
// Recreate the state as expected by save_imatrix(), and corerct for weighted sum.
345345
for (int i = 0; i < nval; i++) {
346-
if (tmp[i]) {
346+
if (std::isnormal(tmp[i])) {
347347
e.values[i] += tmp[i];
348348
e.counts[i] += ncall;
349349
}

0 commit comments

Comments
 (0)