DBM: fixed potential overflow in FLOPS calculation

This commit is contained in:
Hans Pabst 2024-10-02 14:19:03 +02:00
parent 8f7c1fd443
commit 459cfc33f0

View file

@ -280,7 +280,7 @@ static void multiply_packs(const bool transa, const bool transb,
// Count flops.
dbm_library_counter_increment(m, n, k);
const int task_flops = 2 * m * n * k;
const int64_t task_flops = 2LL * m * n * k;
flop_sum += task_flops;
if (task_flops == 0) {
continue;