diff --git a/benchmark/utils/formats.hpp b/benchmark/utils/formats.hpp index 208b5612139..62ac1443f52 100644 --- a/benchmark/utils/formats.hpp +++ b/benchmark/utils/formats.hpp @@ -210,6 +210,7 @@ std::shared_ptr create_gpu_strategy( /** * Checks whether the given matrix data exceeds the ELL imbalance limit set by * the --ell_imbalance_limit flag + * * @throws gko::Error if the imbalance limit is exceeded */ void check_ell_admissibility(const gko::matrix_data &data) @@ -222,8 +223,7 @@ void check_ell_admissibility(const gko::matrix_data &data) row_lengths[nz.row]++; } auto max_len = *std::max_element(row_lengths.begin(), row_lengths.end()); - auto avg_len = - std::max(data.nonzeros.size() / data.size[0], 1); + auto avg_len = data.nonzeros.size() / std::max(data.size[0], 1); if (max_len / avg_len > FLAGS_ell_imbalance_limit) { throw gko::Error(__FILE__, __LINE__, "Matrix exceeds ELL imbalance limit");