|
Ginkgo
Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_FACTORIZATION_FACTORIZATION_HPP_
6 #define GKO_PUBLIC_CORE_FACTORIZATION_FACTORIZATION_HPP_
9 #include <ginkgo/core/base/composition.hpp>
10 #include <ginkgo/core/base/lin_op.hpp>
11 #include <ginkgo/core/base/types.hpp>
12 #include <ginkgo/core/matrix/csr.hpp>
13 #include <ginkgo/core/matrix/diagonal.hpp>
17 namespace experimental {
18 namespace factorization {
25 enum class storage_type {
52 symm_combined_cholesky,
75 template <
typename ValueType,
typename IndexType>
80 using value_type = ValueType;
81 using index_type = IndexType;
94 std::unique_ptr<Factorization>
unpack()
const;
121 std::shared_ptr<const matrix_type>
get_combined()
const;
143 std::unique_ptr<composition_type> composition);
156 std::unique_ptr<composition_type> composition);
170 std::unique_ptr<matrix_type> matrix);
172 static std::unique_ptr<Factorization> create_from_combined_ldu(
173 std::unique_ptr<matrix_type> matrix);
175 static std::unique_ptr<Factorization> create_from_combined_cholesky(
176 std::unique_ptr<matrix_type> matrix);
178 static std::unique_ptr<Factorization> create_from_combined_ldl(
179 std::unique_ptr<matrix_type> matrix);
182 explicit Factorization(std::shared_ptr<const Executor> exec);
187 void apply_impl(
const LinOp* b,
LinOp* x)
const override;
190 LinOp* x)
const override;
193 storage_type storage_type_;
194 std::unique_ptr<Composition<ValueType>> factors_;
202 #endif // GKO_PUBLIC_CORE_FACTORIZATION_FACTORIZATION_HPP_
Represents a generic factorization consisting of two triangular factors (upper and lower) and an opti...
Definition: factorization.hpp:76
CSR is a matrix format which stores only the nonzero coefficients by compressing each row of the matr...
Definition: matrix.hpp:27
Definition: lin_op.hpp:118
static std::unique_ptr< Factorization > create_from_composition(std::unique_ptr< composition_type > composition)
Creates a Factorization from an existing composition.
std::shared_ptr< const matrix_type > get_upper_factor() const
Returns the upper triangular factor of the factorization, if available, nullptr otherwise.
std::shared_ptr< const matrix_type > get_combined() const
Returns the matrix storing a compact representation of the factorization, if available,...
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
static std::unique_ptr< Factorization > create_from_symm_composition(std::unique_ptr< composition_type > composition)
Creates a Factorization from an existing symmetric composition.
The Composition class can be used to compose linear operators op1, op2, ..., opn and obtain the opera...
Definition: composition.hpp:39
std::unique_ptr< Factorization > unpack() const
Transforms the factorization from a compact representation suitable only for triangular solves to a c...
This class is a utility which efficiently implements the diagonal matrix (a linear operator which sca...
Definition: lin_op.hpp:32
std::shared_ptr< const diag_type > get_diagonal() const
Returns the diagonal scaling matrix of the factorization, if available, nullptr otherwise.
Factorization(const Factorization &)
Creates a deep copy of the factorization.
static std::unique_ptr< Factorization > create_from_combined_lu(std::unique_ptr< matrix_type > matrix)
Creates a Factorization from an existing combined representation of an LU factorization.
The EnableLinOp mixin can be used to provide sensible default implementations of the majority of the ...
Definition: lin_op.hpp:878
std::shared_ptr< const matrix_type > get_lower_factor() const
Returns the lower triangular factor of the factorization, if available, nullptr otherwise.
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition: polymorphic_object.hpp:662
storage_type get_storage_type() const
Returns the storage type used by this factorization.