Fix bugs in usage messaging.

This commit is contained in:
Marcel Keller
2023-01-31 10:32:21 +11:00
parent e42d11c554
commit bccfea7b95
3 changed files with 6 additions and 2 deletions

View File

@@ -311,6 +311,8 @@ class Data_Files
}
void reset_usage() { usage.reset(); skipped.reset(); }
void set_usage(const DataPositions& pos) { usage = pos; }
};
template<class T> inline

View File

@@ -330,6 +330,8 @@ void thread_info<sint, sgf2n>::Sub_Main_Func()
// wind down thread by thread
machine.stats += Proc.stats;
// prevent faulty usage message
Proc.DataF.set_usage(actual_usage);
delete processor;
queues->finished(actual_usage, P.total_comm());

View File

@@ -70,10 +70,10 @@ BufferPrep<T>::~BufferPrep()
{
if (not T::clear::invertible and field_type == DATA_INT and not T::has_mac)
// add dabits with computation modulo power of two but without MAC
used_bits += my_usage.at(DATA_DABIT);
used_dabits += my_usage.at(DATA_BIT);
}
else
used_dabits += used_bits;
used_bits += used_dabits;
this->print_left("bits", bits.size(), type_string, used_bits);
this->print_left("dabits", dabits.size(), type_string, used_dabits);