gko::batch::solver::BatchSolver#
Base class for every batched solver. Holds the system matrix and
preconditioner pointers and exposes the runtime setters shared across
all batched solvers — reset_tolerance, reset_max_iterations,
reset_tolerance_type, set_preconditioner_base. Derived solvers
plug in the iteration kernel.
-
class BatchSolver#
The BatchSolver is a base class for all batched solvers and provides the common getters and setter for these batched solver classes.
Subclassed by
gko::batch::solver::EnableBatchSolver< Bicgstab< default_precision >
default_precision >
gko::batch::solver::EnableBatchSolver< Cg< default_precision >
default_precision >
gko::batch::solver::EnableBatchSolver< ConcreteSolver
ValueType
PolymorphicBase >
Public Functions
-
inline std::shared_ptr<const BatchLinOp> get_system_matrix() const#
Returns the system operator (matrix) of the linear system.
- Returns:
the system operator (matrix)
-
inline std::shared_ptr<const BatchLinOp> get_preconditioner() const#
Returns the generated preconditioner.
- Returns:
the generated preconditioner.
-
inline double get_tolerance() const#
Get the residual tolerance used by the solver.
- Returns:
The residual tolerance.
-
inline void reset_tolerance(double res_tol)#
Update the residual tolerance to be used by the solver.
- Parameters:
res_tol – The residual tolerance to be used for subsequent invocations of the solver.
-
inline int get_max_iterations() const#
Get the maximum number of iterations set on the solver.
- Returns:
Maximum number of iterations.
-
inline void reset_max_iterations(int max_iterations)#
Set the maximum number of iterations for the solver to use, independent of the factory that created it.
- Parameters:
max_iterations – The maximum number of iterations for the solver.
-
inline ::gko::batch::stop::tolerance_type get_tolerance_type() const#
Get the tolerance type.
- Returns:
The tolerance type.
- inline void reset_tolerance_type(
- ::gko::batch::stop::tolerance_type tol_type,
Set the type of tolerance check to use inside the solver
- Parameters:
tol_type – The tolerance type.