From 044e040e51f7f530d4ce61aac60bac50e7f838d2 Mon Sep 17 00:00:00 2001 From: Dane Lacey Date: Wed, 23 Jul 2025 18:10:27 +0200 Subject: [PATCH] hotfix overflow in spgemm performance results --- examples/spgemm_helpers.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/spgemm_helpers.hpp b/examples/spgemm_helpers.hpp index 362fef6..243f9c2 100644 --- a/examples/spgemm_helpers.hpp +++ b/examples/spgemm_helpers.hpp @@ -52,7 +52,8 @@ std::cout << "Runtime: " << runtime << std::endl; \ std::cout << "Iterations: " << n_iter << std::endl; \ \ - long flops_per_iter = (result_nnz) * SPGEMM_FLOPS_PER_NZ; \ + long flops_per_iter = \ + static_cast(result_nnz) * SPGEMM_FLOPS_PER_NZ; \ double iter_per_second = n_iter / runtime; \ \ std::cout << "Performance: " << flops_per_iter * iter_per_second * F_TO_GF \