From 459cfc33f02cd731627f85091d87f9ae91ec4a16 Mon Sep 17 00:00:00 2001 From: Hans Pabst Date: Wed, 2 Oct 2024 14:19:03 +0200 Subject: [PATCH] DBM: fixed potential overflow in FLOPS calculation --- src/dbm/dbm_multiply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbm/dbm_multiply.c b/src/dbm/dbm_multiply.c index c723082f2f..47f0282f78 100644 --- a/src/dbm/dbm_multiply.c +++ b/src/dbm/dbm_multiply.c @@ -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;