gko::LinOp
Abstract base for every linear operator in Ginkgo. A LinOp exposes
the action \(x \leftarrow A b\) through apply(b, x) (and the scaled
form \(x \leftarrow \alpha A b + \beta x\) through the four-argument
overload). Everything that behaves like an operator (sparse and dense
matrices, factorisations, Krylov solvers, preconditioners, composed
operators) is a LinOp, so callers can treat them uniformly: feed any
of them to a Krylov solver as the system matrix, the preconditioner,
or both.
Concrete classes derive from LinOp directly and implement
apply_impl. LinOp::apply logs the call, validates the operand
sizes, makes temporary copies of operands that live on a different
executor, and then calls apply_impl.
-
class LinOp
Inherits from
Subclassed by
gko::Combination< ValueType >
gko::Composition< ValueType >
gko::Composition< value_type >
gko::Composition< gko::default_precision >
gko::Composition< default_precision >
gko::experimental::distributed::Vector< ValueType >
gko::experimental::distributed::Vector< to_complex< value_type > >
gko::experimental::distributed::Vector< previous_precision< ValueType > >
gko::experimental::distributed::Vector< previous_precision< ValueType, 2 > >
gko::experimental::distributed::Vector< previous_precision< ValueType, 3 > >
gko::experimental::factorization::Factorization< value_type, index_type >
gko::matrix::Coo< ValueType, IndexType >
gko::matrix::Csr< value_type, index_type >
gko::matrix::Csr< ValueType, IndexType >
gko::matrix::Dense< ValueType >
gko::matrix::Dense< value_type >
gko::matrix::Dense< to_complex< ValueType > >
gko::matrix::Dense< absolute_type >
gko::matrix::Dense< remove_complex< ValueType > >
gko::matrix::Diagonal< ValueType >
gko::matrix::Ell< value_type, index_type >
gko::matrix::Ell< ValueType, IndexType >
gko::matrix::Fbcsr< ValueType, IndexType >
gko::matrix::Identity< ValueType >
gko::matrix::Permutation< index_type >
gko::matrix::Permutation< IndexType >
gko::matrix::SparsityCsr< value_type, index_type >
gko::matrix::SparsityCsr< IndexType, ValueType >
gko::matrix::SparsityCsr< ValueType, IndexType >
gko::multigrid::Pgm< ValueType, IndexType >
gko::preconditioner::Isai< IsaiType==isai_type::general ? isai_type::general :IsaiType==isai_type::spd ? isai_type::spd :IsaiType==isai_type::lower ? isai_type::upper :isai_type::lower, ValueType, IndexType >
gko::preconditioner::Isai< isai_type::lower, ValueType, IndexType >
gko::preconditioner::Isai< isai_type::upper, ValueType, IndexType >
gko::preconditioner::Isai< isai_type::general, ValueType, IndexType >
gko::preconditioner::Isai< isai_type::spd, ValueType, IndexType >
gko::preconditioner::Jacobi< ValueType, IndexType >
gko::solver::Bicg< ValueType >
gko::solver::Bicgstab< ValueType >
gko::solver::Cg< ValueType >
gko::solver::Cgs< ValueType >
gko::solver::Chebyshev< ValueType >
gko::solver::Fcg< ValueType >
gko::solver::Gcr< ValueType >
gko::solver::Gmres< ValueType >
gko::solver::Idr< ValueType >
gko::solver::Ir< ValueType >
gko::solver::LowerTrs< value_type, index_type >
gko::solver::LowerTrs< ValueType, IndexType >
gko::solver::Minres< ValueType >
gko::solver::PipeCg< ValueType >
gko::solver::UpperTrs< value_type, index_type >
gko::solver::UpperTrs< ValueType, IndexType >
gko::BlockOperator
gko::Combination< ValueType >
gko::Composition< ValueType >
gko::Perturbation< ValueType >
gko::experimental::distributed::Matrix< ValueType, LocalIndexType, GlobalIndexType >
gko::experimental::distributed::Vector< ValueType >
gko::experimental::distributed::preconditioner::Schwarz< ValueType, LocalIndexType, GlobalIndexType >
gko::experimental::factorization::Factorization< ValueType, IndexType >
gko::experimental::reorder::ScaledReordered< ValueType, IndexType >
gko::experimental::solver::Direct< ValueType, IndexType >
gko::ext::cuda::solver::Cudss< ValueType, IndexType >
gko::matrix::Coo< ValueType, IndexType >
gko::matrix::Csr< ValueType, IndexType >
gko::matrix::Dense< ValueType >
gko::matrix::Diagonal< ValueType >
gko::matrix::Ell< ValueType, IndexType >
gko::matrix::Fbcsr< ValueType, IndexType >
gko::matrix::Fft
gko::matrix::Fft2
gko::matrix::Fft3
gko::matrix::Hybrid< ValueType, IndexType >
gko::matrix::Identity< ValueType >
gko::matrix::Permutation< IndexType >
gko::matrix::RowGatherer< IndexType >
gko::matrix::ScaledPermutation< ValueType, IndexType >
gko::matrix::Sellp< ValueType, IndexType >
gko::matrix::SparsityCsr< ValueType, IndexType >
gko::multigrid::FixedCoarsening< ValueType, IndexType >
gko::multigrid::Pgm< ValueType, IndexType >
gko::multigrid::Pmis< ValueType, IndexType >
gko::multigrid::Rs< ValueType, IndexType >
gko::multigrid::UniformCoarsening< ValueType, IndexType >
gko::preconditioner::Ic< ValueType, IndexType >
gko::preconditioner::Ilu< ValueType, ReverseApply, IndexType >
gko::preconditioner::Isai< IsaiType, ValueType, IndexType >
gko::preconditioner::Jacobi< ValueType, IndexType >
gko::preconditioner::NullspaceProjection< ValueType >
gko::solver::Bicg< ValueType >
gko::solver::Bicgstab< ValueType >
gko::solver::CbGmres< ValueType >
gko::solver::Cg< ValueType >
gko::solver::Cgs< ValueType >
gko::solver::Chebyshev< ValueType >
gko::solver::Fcg< ValueType >
gko::solver::Gcr< ValueType >
gko::solver::Gmres< ValueType >
gko::solver::Idr< ValueType >
gko::solver::Ir< ValueType >
gko::solver::LowerTrs< ValueType, IndexType >
gko::solver::Minres< ValueType >
gko::solver::Multigrid
gko::solver::Nullspace< ValueType >
gko::solver::PipeCg< ValueType >
gko::solver::UpperTrs< ValueType, IndexType >
Public Functions
-
inline void apply(
- ptr_param<const LinOp> b,
- ptr_param<LinOp> x,
) const
Applies a linear operator to a vector (or a sequence of vectors).
Performs the operation x = op(b), where op is this linear operator.
- Parameters:
-
-
inline void apply(
- ptr_param<const LinOp> alpha,
- ptr_param<const LinOp> b,
- ptr_param<const LinOp> beta,
- ptr_param<LinOp> x,
) const
Performs the operation x = alpha * op(b) + beta * x.
- Parameters:
alpha – scaling of the result of op(b)
b – vector(s) on which the operator is applied
beta – scaling of the input x
x – output vector(s)
-
inline const dim<2> &get_size() const noexcept
Returns the size of the operator.
- Returns:
size of the operator
-
inline virtual bool apply_uses_initial_guess() const
Returns true if the linear operator uses the data given in x as an initial guess. Returns false otherwise.
- Returns:
true if the linear operator uses the data given in x as an initial guess. Returns false otherwise.
-
LinOp &operator=(const LinOp&) = default
Copy-assigns a LinOp. Preserves the executor and copies the size.
-
inline LinOp &operator=(LinOp &&other)
Move-assigns a LinOp. Preserves the executor and moves the size. The moved-from object has size 0x0 afterwards, but its executor is unchanged.
-
LinOp(const LinOp&) = default
Copy-constructs a LinOp. Inherits executor and size from the input.
-
inline LinOp(LinOp &&other)
Move-constructs a LinOp. Inherits executor and size from the input, which will have size 0x0 and unchanged executor afterwards.