Skip to content

Commit

Permalink
Merge improved benchmark output
Browse files Browse the repository at this point in the history
Adds matrix dimensions (rows, columns, nonzeros) to the output of matrix_statistics.

Related PR: #801
  • Loading branch information
upsj committed Jun 23, 2021
2 parents e331ad3 + d44f74c commit 3112263
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions benchmark/matrix_statistics/matrix_statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ void extract_matrix_statistics(gko::matrix_data<etype, gko::int64> &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);
Expand Down

0 comments on commit 3112263

Please sign in to comment.