EnablePreconditionable< DerivedType > Class Template Reference#
|
Reference API
|
#include <ginkgo/core/solver/solver_base.hpp>
Public Member Functions | |
| void | set_preconditioner (std::shared_ptr< const LinOp > new_precond) override |
| EnablePreconditionable & | operator= (const EnablePreconditionable &other) |
| EnablePreconditionable & | operator= (EnablePreconditionable &&other) |
| EnablePreconditionable (std::shared_ptr< const LinOp > preconditioner) | |
| EnablePreconditionable (const EnablePreconditionable &other) | |
| EnablePreconditionable (EnablePreconditionable &&other) | |
Public Member Functions inherited from gko::Preconditionable | |
| virtual std::shared_ptr< const LinOp > | get_preconditioner () const |
Detailed Description
class gko::solver::EnablePreconditionable< DerivedType >
Mixin providing default operation for Preconditionable with correct value semantics. It ensures that the preconditioner stored in this class will always have the same executor as the object this mixin is used in, creating a clone on the correct executor if necessary.
- Template Parameters
-
DerivedType The type that this Mixin is used in. It must provide get_size() and get_executor() functions that return correctly initialized values when the EnablePreconditionable constructor is called, i.e. the constructor must be provided by a base class added before EnablePreconditionable, since the member initialization order also applying to multiple inheritance.
Constructor & Destructor Documentation
◆ EnablePreconditionable() [1/2]
|
inline |
Creates a shallow copy of the provided preconditioner.
◆ EnablePreconditionable() [2/2]
|
inline |
Moves the provided preconditioner. The moved-from object has a nullptr preconditioner.
Member Function Documentation
◆ operator=() [1/2]
|
inline |
Creates a shallow copy of the provided preconditioner, clones it onto this executor if executors don't match.
References gko::Preconditionable::get_preconditioner(), and gko::solver::EnablePreconditionable< DerivedType >::set_preconditioner().
◆ operator=() [2/2]
|
inline |
Moves the provided preconditioner, clones it onto this executor if executors don't match. The moved-from object has a nullptr preconditioner.
References gko::solver::EnablePreconditionable< DerivedType >::set_preconditioner().
◆ set_preconditioner()
|
inlineoverridevirtual |
Sets the preconditioner operator used by the Preconditionable.
- Parameters
-
new_precond the new preconditioner operator used by the Preconditionable
Reimplemented from gko::Preconditionable.
References gko::clone(), and gko::Preconditionable::set_preconditioner().
Referenced by gko::solver::EnablePreconditionable< DerivedType >::operator=(), and gko::solver::EnablePreconditionable< DerivedType >::operator=().
The documentation for this class was generated from the following file:
- ginkgo/core/solver/solver_base.hpp
Generated by
Public Member Functions inherited from