Skip to content

Commit c08620c

Browse files
committed
Fix formatting
1 parent 359c4a1 commit c08620c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/example8.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ int main() {
2525
rowInd[i] = i * 2; // two elements per row
2626
}
2727
for (auto i = 0; i < nnz; i++) {
28-
colInd[i] = (i % 2) * (std::max(i / 2, 1)); // column on 0 and diagonal (with additional entry in first row)
28+
colInd[i] =
29+
(i % 2) * (std::max(i / 2, 1)); // column on 0 and diagonal (with
30+
// additional entry in first row)
2931
values[i] = unif(re);
3032
}
3133

32-
local_data = dr::views::csr_matrix_view<V, I>(values, rowInd, colInd, {size, size}, nnz, root);
34+
local_data = dr::views::csr_matrix_view<V, I>(values, rowInd, colInd,
35+
{size, size}, nnz, root);
3336
}
3437

3538
dr::mp::distributed_sparse_matrix<
@@ -51,8 +54,10 @@ int main() {
5154
gemv(root, res, matrix, broadcasted_b);
5255

5356
if (root == dr::mp::rank()) {
54-
fmt::print("Matrix with {} x {} and number of non-zero entries equal to {} and entries:\n", matrix.shape().first, matrix.shape().second, matrix.size());
55-
for (auto [i, v]: matrix) {
57+
fmt::print("Matrix with {} x {} and number of non-zero entries equal to {} "
58+
"and entries:\n",
59+
matrix.shape().first, matrix.shape().second, matrix.size());
60+
for (auto [i, v] : matrix) {
5661
auto [n, m] = i;
5762
fmt::print("Matrix entry <{}, {}, {}>\n", n, m, v);
5863
}

0 commit comments

Comments
 (0)