Skip to content

Commit 7429712

Browse files
yhmtsaiupsjMarcelKoch
committed
reference also has sparselib implementation
Co-authored-by: Tobias Ribizel <mail@ribizel.de> Co-authored-by: Marcel Koch <marcel.koch@kit.edu>
1 parent b056930 commit 7429712

4 files changed

Lines changed: 16 additions & 14 deletions

File tree

core/factorization/ic.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ std::unique_ptr<Composition<ValueType>> Ic<ValueType, IndexType>::generate(
102102
local_system_matrix.get(), false));
103103

104104
std::shared_ptr<const matrix_type> ic;
105-
// Compute LC factorization
105+
// Compute IC factorization
106106
if (parameters_.algorithm == incomplete_algorithm::syncfree ||
107-
exec == exec->get_master()) {
107+
(!std::dynamic_pointer_cast<const ReferenceExecutor>(exec) &&
108+
exec == exec->get_master())) {
108109
std::unique_ptr<gko::factorization::elimination_forest<IndexType>>
109110
forest;
110111
const auto nnz = local_system_matrix->get_num_stored_elements();

core/factorization/ilu.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ std::unique_ptr<Composition<ValueType>> Ilu<ValueType, IndexType>::generate_l_u(
9898
local_system_matrix.get(), false));
9999

100100
std::shared_ptr<const matrix_type> ilu;
101-
// Compute LU factorization
101+
// Compute ILU factorization
102102
if (parameters_.algorithm == incomplete_algorithm::syncfree ||
103-
exec == exec->get_master()) {
103+
(!std::dynamic_pointer_cast<const ReferenceExecutor>(exec) &&
104+
exec == exec->get_master())) {
104105
const auto nnz = local_system_matrix->get_num_stored_elements();
105106
const auto num_rows = local_system_matrix->get_size()[0];
106107
auto factors = share(

include/ginkgo/core/factorization/ic.hpp

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

@@ -103,10 +103,10 @@ class Ic : public Composition<ValueType> {
103103

104104
/**
105105
* Select the implementation which is supposed to be used for
106-
* the incomplete factorization. This only matters for the CUDA and HIP
107-
* executor where the choice is between the Ginkgo (syncfree) and the
108-
* cuSPARSE/hipSPARSE/reference (sparselib) implementation. Default is
109-
* sparselib.
106+
* the incomplete factorization. This only matters for the
107+
* CUDA/HIP/REFERENCE executor where the choice is between the Ginkgo
108+
* (syncfree) and the cuSPARSE/hipSPARSE/reference (sparselib)
109+
* implementation. Default is sparselib.
110110
*/
111111
incomplete_algorithm GKO_FACTORY_PARAMETER_SCALAR(
112112
algorithm, incomplete_algorithm::sparselib);

include/ginkgo/core/factorization/ilu.hpp

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

@@ -98,10 +98,10 @@ class Ilu : public Composition<ValueType> {
9898

9999
/**
100100
* Select the implementation which is supposed to be used for
101-
* the incomplete factorization. This only matters for the CUDA and HIP
102-
* executor where the choice is between the Ginkgo (syncfree) and the
103-
* cuSPARSE/hipSPARSE/reference (sparselib) implementation. Default is
104-
* sparselib.
101+
* the incomplete factorization. This only matters for the
102+
* CUDA/HIP/REFERENCE executor where the choice is between the Ginkgo
103+
* (syncfree) and the cuSPARSE/hipSPARSE/reference (sparselib)
104+
* implementation. Default is sparselib.
105105
*/
106106
incomplete_algorithm GKO_FACTORY_PARAMETER_SCALAR(
107107
algorithm, incomplete_algorithm::sparselib);

0 commit comments

Comments
 (0)