From d44f74cf4d28f6956eaf96bb2ded9fcb1bd5f0de Mon Sep 17 00:00:00 2001 From: Tobias Ribizel Date: Tue, 22 Jun 2021 12:14:10 +0200 Subject: [PATCH] add matrix dimensions to matrix_statistics --- benchmark/matrix_statistics/matrix_statistics.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchmark/matrix_statistics/matrix_statistics.cpp b/benchmark/matrix_statistics/matrix_statistics.cpp index 4501f67a489..d8a3ce8fc1b 100644 --- a/benchmark/matrix_statistics/matrix_statistics.cpp +++ b/benchmark/matrix_statistics/matrix_statistics.cpp @@ -150,6 +150,10 @@ void extract_matrix_statistics(gko::matrix_data &data, ++col_dist[v.column]; } + add_or_set_member(problem, "rows", data.size[0], allocator); + add_or_set_member(problem, "columns", data.size[1], allocator); + add_or_set_member(problem, "nonzeros", data.nonzeros.size(), allocator); + std::sort(begin(row_dist), end(row_dist)); add_or_set_member(problem, "row_distribution", rapidjson::Value(rapidjson::kObjectType), allocator);