Skip to content

Commit

Permalink
correct counts on load
Browse files Browse the repository at this point in the history
  • Loading branch information
CISC authored Jun 13, 2024
1 parent 4ad3eb2 commit fe21ef7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/imatrix/imatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,10 @@ bool IMatrixCollector::load_imatrix(const char * fname) {

// Recreate the state as expected by save_imatrix(), and corerct for weighted sum.
for (int i = 0; i < nval; i++) {
e.values[i] += tmp[i];
e.counts[i] += ncall;
if (tmp[i]) {
e.values[i] += tmp[i];
e.counts[i] += ncall;
}
}
e.ncall += ncall;

Expand Down

0 comments on commit fe21ef7

Please sign in to comment.