Skip to content

Commit fc083f0

Browse files
ginkgo-botpratikvn
andcommitted
Format files
Co-authored-by: Pratik Nayak <pratikvn@pm.me>
1 parent 6d6a09c commit fc083f0

34 files changed

Lines changed: 124 additions & 113 deletions

include/ginkgo/core/distributed/index_map.hpp

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
1+
// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

@@ -34,19 +34,19 @@ enum class index_space {
3434
* disjoint subsets \f$I_k, k = 1, \dots, P\f$, this class defines for each
3535
* subset an extended global index set \f$\hat{I}_k \supset I_K\f$. The extended
3636
* index set contains the global indices owned by part \f$k\f$, as well as
37-
* remote indices \f$R_k = \hat{I}_k \setminus I_k\f$, which are also accessed by
38-
* part \f$k\f$, but owned by parts \f$l \neq k\f$.
39-
* At the core, this class provides mappings from the global index space \f$I\f$
40-
* into different local index spaces. The combined local index space
41-
* (index_space::combined) is then defined as
37+
* remote indices \f$R_k = \hat{I}_k \setminus I_k\f$, which are also accessed
38+
* by part \f$k\f$, but owned by parts \f$l \neq k\f$. At the core, this class
39+
* provides mappings from the global index space \f$I\f$ into different local
40+
* index spaces. The combined local index space (index_space::combined) is then
41+
* defined as
4242
* $[0, \dots, |\hat{I}_k|)$. Additionally, the combined index space can be
4343
* separated into locally owned (index_space::local) and non-locally owned
4444
* (index_space::non_local). The locally owned indices are defined as
4545
* $[0, \dots, |I_k|)$, and the non-locally owned as $[0, \dots, |R_k|)$.
4646
* With these index sets, the following mappings are defined:
4747
*
48-
* - \f$c_k : \hat{I}_k \mapsto [0, \dots, |\hat{I}_k|)\f$ which maps global indices
49-
* into the combined/full local index space (denoted as
48+
* - \f$c_k : \hat{I}_k \mapsto [0, \dots, |\hat{I}_k|)\f$ which maps global
49+
* indices into the combined/full local index space (denoted as
5050
* index_space::combined),
5151
* - \f$l_k: I_k \mapsto [0, \dots, |I_k|)\f$ which maps global indices into the
5252
* locally owned index space (denoted as index_space::local),
@@ -57,9 +57,9 @@ enum class index_space {
5757
* index_space.
5858
*
5959
* The index map for \f$I_k\f$ has no knowledge about any other index maps for
60-
* \f$I_l, l \neq k\f$. In particular, any global index passed to the `map_to_local`
61-
* map that is not part of the specified index space, will be mapped to an
62-
* invalid_index.
60+
* \f$I_l, l \neq k\f$. In particular, any global index passed to the
61+
* `map_to_local` map that is not part of the specified index space, will be
62+
* mapped to an invalid_index.
6363
*
6464
* \tparam LocalIndexType type for local indices
6565
* \tparam GlobalIndexType type for global indices
@@ -148,12 +148,13 @@ class index_map {
148148
* The indices are grouped by their owning rank and sorted according to
149149
* their global index within each group.
150150
*
151-
* The set \f$R_k = \hat{I}_k \setminus I_k\f$ can also be written as the union
152-
* of the intersection of \f$\hat{I}_k\f$ with other disjoint sets
151+
* The set \f$R_k = \hat{I}_k \setminus I_k\f$ can also be written as the
152+
* union of the intersection of \f$\hat{I}_k\f$ with other disjoint sets
153153
* \f$I_l, l \neq k\f$, i.e.
154154
* $R_k = \bigcup_{j \neq k} \hat{I}_k \cap I_j = \bigcup_{j \neq k}
155-
* R_{k,j}$. The set \f$R_{k,j}\f$ can then be mapped by \f$l_j\f$ to get the local
156-
* indices wrt. part \f$j\f$. The indices here are mapped by \f$l_j\f$.
155+
* R_{k,j}$. The set \f$R_{k,j}\f$ can then be mapped by \f$l_j\f$ to get
156+
* the local indices wrt. part \f$j\f$. The indices here are mapped by
157+
* \f$l_j\f$.
157158
*/
158159
const segmented_array<LocalIndexType>& get_remote_local_idxs() const;
159160

include/ginkgo/core/distributed/vector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
1+
// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

include/ginkgo/core/factorization/ic.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
1+
// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

include/ginkgo/core/factorization/ilu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
1+
// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

include/ginkgo/core/factorization/par_ic.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
1+
// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

@@ -28,9 +28,9 @@ namespace factorization {
2828
/**
2929
* ParIC is an incomplete Cholesky factorization which is computed in parallel.
3030
*
31-
* \f$L\f$ is a lower triangular matrix, which approximates a given matrix \f$A\f$ with
32-
* \f$A \approx LL^H\f$. Here, \f$L + L^H\f$ has the same sparsity pattern as \f$A\f$, which
33-
* is also called IC(0).
31+
* \f$L\f$ is a lower triangular matrix, which approximates a given matrix
32+
* \f$A\f$ with \f$A \approx LL^H\f$. Here, \f$L + L^H\f$ has the same sparsity
33+
* pattern as \f$A\f$, which is also called IC(0).
3434
*
3535
* The ParIC algorithm generates the incomplete factors iteratively, using a
3636
* fixed-point iteration of the form
@@ -46,9 +46,9 @@ namespace factorization {
4646
* In general, the entries of \f$L\f$ can be iterated in parallel and in
4747
* asynchronous fashion, the algorithm asymptotically converges to the
4848
* incomplete factors \f$L\f$ and \f$L^H\f$ fulfilling $\left(R = A - L \cdot
49-
* L^H\right)\vert_\mathcal{S} = 0\vert_\mathcal{S}$ where \f$\mathcal{S}\f$ is the
50-
* pre-defined sparsity pattern (in case of IC(0) the sparsity pattern of the
51-
* system matrix \f$A\f$). The number of ParIC sweeps needed for convergence
49+
* L^H\right)\vert_\mathcal{S} = 0\vert_\mathcal{S}$ where \f$\mathcal{S}\f$ is
50+
* the pre-defined sparsity pattern (in case of IC(0) the sparsity pattern of
51+
* the system matrix \f$A\f$). The number of ParIC sweeps needed for convergence
5252
* depends on the parallelism level: For sequential execution, a single sweep
5353
* is sufficient, for fine-grained parallelism, the number of sweeps necessary
5454
* to get a good approximation of the incomplete factors depends heavily on the

include/ginkgo/core/factorization/par_ict.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
1+
// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

@@ -30,9 +30,10 @@ namespace factorization {
3030
* computed in parallel.
3131
*
3232
* \f$L\f$ is a lower triangular matrix which approximates a given symmetric
33-
* positive definite matrix \f$A\f$ with \f$A \approx LL^T\f$. Here, \f$L\f$ has a sparsity
34-
* pattern that is improved iteratively based on its element-wise magnitude.
35-
* The initial sparsity pattern is chosen based on the lower triangle of \f$A\f$.
33+
* positive definite matrix \f$A\f$ with \f$A \approx LL^T\f$. Here, \f$L\f$ has
34+
* a sparsity pattern that is improved iteratively based on its element-wise
35+
* magnitude. The initial sparsity pattern is chosen based on the lower triangle
36+
* of \f$A\f$.
3637
*
3738
* One iteration of the ParICT algorithm consists of the following steps:
3839
*

include/ginkgo/core/factorization/par_ilu.hpp

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
1+
// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

@@ -28,9 +28,10 @@ namespace factorization {
2828
/**
2929
* ParILU is an incomplete LU factorization which is computed in parallel.
3030
*
31-
* \f$L\f$ is a lower unitriangular, while \f$U\f$ is an upper triangular matrix, which
32-
* approximate a given matrix \f$A\f$ with \f$A \approx LU\f$. Here, \f$L\f$ and \f$U\f$ have
33-
* the same sparsity pattern as \f$A\f$, which is also called ILU(0).
31+
* \f$L\f$ is a lower unitriangular, while \f$U\f$ is an upper triangular
32+
* matrix, which approximate a given matrix \f$A\f$ with \f$A \approx LU\f$.
33+
* Here, \f$L\f$ and \f$U\f$ have the same sparsity pattern as \f$A\f$, which is
34+
* also called ILU(0).
3435
*
3536
* The ParILU algorithm generates the incomplete factors iteratively, using a
3637
* fixed-point iteration of the form
@@ -44,17 +45,18 @@ namespace factorization {
4445
* \end{cases}
4546
* $
4647
*
47-
* In general, the entries of \f$L\f$ and \f$U\f$ can be iterated in parallel and in
48-
* asynchronous fashion, the algorithm asymptotically converges to the
48+
* In general, the entries of \f$L\f$ and \f$U\f$ can be iterated in parallel
49+
* and in asynchronous fashion, the algorithm asymptotically converges to the
4950
* incomplete factors \f$L\f$ and \f$U\f$ fulfilling $\left(R = A - L \cdot
50-
* U\right)\vert_\mathcal{S} = 0\vert_\mathcal{S}$ where \f$\mathcal{S}\f$ is the
51-
* pre-defined sparsity pattern (in case of ILU(0) the sparsity pattern of the
52-
* system matrix \f$A\f$). The number of ParILU sweeps needed for convergence
53-
* depends on the parallelism level: For sequential execution, a single sweep
54-
* is sufficient, for fine-grained parallelism, the number of sweeps necessary
55-
* to get a good approximation of the incomplete factors depends heavily on the
56-
* problem. On the OpenMP executor, 3 sweeps usually give a decent approximation
57-
* in our experiments, while GPU executors can take 10 or more iterations.
51+
* U\right)\vert_\mathcal{S} = 0\vert_\mathcal{S}$ where \f$\mathcal{S}\f$ is
52+
* the pre-defined sparsity pattern (in case of ILU(0) the sparsity pattern of
53+
* the system matrix \f$A\f$). The number of ParILU sweeps needed for
54+
* convergence depends on the parallelism level: For sequential execution, a
55+
* single sweep is sufficient, for fine-grained parallelism, the number of
56+
* sweeps necessary to get a good approximation of the incomplete factors
57+
* depends heavily on the problem. On the OpenMP executor, 3 sweeps usually give
58+
* a decent approximation in our experiments, while GPU executors can take 10 or
59+
* more iterations.
5860
*
5961
* The ParILU algorithm in Ginkgo follows the design of E. Chow and A. Patel,
6062
* Fine-grained Parallel Incomplete LU Factorization, SIAM Journal on Scientific

include/ginkgo/core/factorization/par_ilut.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
1+
// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

@@ -29,11 +29,11 @@ namespace factorization {
2929
* ParILUT is an incomplete threshold-based LU factorization which is computed
3030
* in parallel.
3131
*
32-
* \f$L\f$ is a lower unitriangular, while \f$U\f$ is an upper triangular matrix, which
33-
* approximate a given matrix \f$A\f$ with \f$A \approx LU\f$. Here, \f$L\f$ and \f$U\f$ have
34-
* a sparsity pattern that is improved iteratively based on their element-wise
35-
* magnitude. The initial sparsity pattern is chosen based on the \f$ILU(0)\f$
36-
* factorization of \f$A\f$.
32+
* \f$L\f$ is a lower unitriangular, while \f$U\f$ is an upper triangular
33+
* matrix, which approximate a given matrix \f$A\f$ with \f$A \approx LU\f$.
34+
* Here, \f$L\f$ and \f$U\f$ have a sparsity pattern that is improved
35+
* iteratively based on their element-wise magnitude. The initial sparsity
36+
* pattern is chosen based on the \f$ILU(0)\f$ factorization of \f$A\f$.
3737
*
3838
* One iteration of the ParILUT algorithm consists of the following steps:
3939
*

include/ginkgo/core/matrix/csr.hpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors
1+
// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors
22
//
33
// SPDX-License-Identifier: BSD-3-Clause
44

@@ -1088,14 +1088,15 @@ class Csr : public EnableLinOp<Csr<ValueType, IndexType>>,
10881088
permute_mode mode = permute_mode::symmetric) const;
10891089

10901090
/**
1091-
* Creates a non-symmetrically permuted copy \f$A'\f$ of this matrix \f$A\f$ with
1092-
* the given row and column permutations \f$P\f$ and \f$Q\f$. The operation will
1093-
* compute \f$A'(i, j) = A(p[i], q[j])\f$, or \f$A' = P A Q^T\f$ if `invert` is
1094-
* `false`, and \f$A'(p[i], q[j]) = A(i,j)\f$, or \f$A' = P^{-1} A Q^{-T}\f$ if
1095-
* `invert` is `true`.
1091+
* Creates a non-symmetrically permuted copy \f$A'\f$ of this matrix \f$A\f$
1092+
* with the given row and column permutations \f$P\f$ and \f$Q\f$. The
1093+
* operation will compute \f$A'(i, j) = A(p[i], q[j])\f$, or \f$A' = P A
1094+
* Q^T\f$ if `invert` is `false`, and \f$A'(p[i], q[j]) = A(i,j)\f$, or
1095+
* \f$A' = P^{-1} A Q^{-T}\f$ if `invert` is `true`.
10961096
*
10971097
* @param row_permutation The permutation \f$P\f$ to apply to the rows
1098-
* @param column_permutation The permutation \f$Q\f$ to apply to the columns
1098+
* @param column_permutation The permutation \f$Q\f$ to apply to the
1099+
* columns
10991100
* @param invert If set to `false`, uses the input permutations, otherwise
11001101
* uses their inverses \f$P^{-1}, Q^{-1}\f$
11011102
* @return The permuted matrix.
@@ -1141,7 +1142,8 @@ class Csr : public EnableLinOp<Csr<ValueType, IndexType>>,
11411142
* reuse->update_values(matrix, permuted);
11421143
* ```
11431144
* @param row_permutation The permutation \f$P\f$ to apply to the rows
1144-
* @param column_permutation The permutation \f$Q\f$ to apply to the columns
1145+
* @param column_permutation The permutation \f$Q\f$ to apply to the
1146+
* columns
11451147
* @param invert If set to `false`, uses the input permutations, otherwise
11461148
* uses their inverses \f$P^{-1}, Q^{-1}\f$
11471149
* @return an std::pair consisting of the permuted matrix and the reuse info

include/ginkgo/core/matrix/dense.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,14 +452,15 @@ class Dense
452452
ptr_param<Dense> output, permute_mode mode) const;
453453

454454
/**
455-
* Creates a non-symmetrically permuted copy \f$A'\f$ of this matrix \f$A\f$ with
456-
* the given row and column permutations \f$P\f$ and \f$Q\f$. The operation will
457-
* compute \f$A'(i, j) = A(p[i], q[j])\f$, or \f$A' = P A Q^T\f$ if `invert` is
458-
* `false`, and \f$A'(p[i], q[j]) = A(i,j)\f$, or \f$A' = P^{-1} A Q^{-T}\f$ if
459-
* `invert` is `true`.
455+
* Creates a non-symmetrically permuted copy \f$A'\f$ of this matrix \f$A\f$
456+
* with the given row and column permutations \f$P\f$ and \f$Q\f$. The
457+
* operation will compute \f$A'(i, j) = A(p[i], q[j])\f$, or \f$A' = P A
458+
* Q^T\f$ if `invert` is `false`, and \f$A'(p[i], q[j]) = A(i,j)\f$, or
459+
* \f$A' = P^{-1} A Q^{-T}\f$ if `invert` is `true`.
460460
*
461461
* @param row_permutation The permutation \f$P\f$ to apply to the rows
462-
* @param column_permutation The permutation \f$Q\f$ to apply to the columns
462+
* @param column_permutation The permutation \f$Q\f$ to apply to the
463+
* columns
463464
* @param invert If set to `false`, uses the input permutations, otherwise
464465
* uses their inverses \f$P^{-1}, Q^{-1}\f$
465466
* @return The permuted matrix.

0 commit comments

Comments
 (0)