![]() |
Ginkgo Generated from branch based on master. Ginkgo version 1.7.0
A numerical linear algebra library targeting many-core architectures
|
The ResidualNormReduction class is a stopping criterion which stops the iteration process when the residual norm is below a certain threshold relative to the norm of the initial residual, i.e. More...
#include <ginkgo/core/stop/residual_norm.hpp>
Classes | |
class | Factory |
struct | parameters_type |
Public Types | |
using | ComplexVector = matrix::Dense<to_complex<ValueType>> |
using | NormVector = matrix::Dense<remove_complex<ValueType>> |
using | Vector = matrix::Dense<ValueType> |
Public Member Functions | |
const parameters_type & | get_parameters () const |
![]() | |
std::unique_ptr< AbstractObject > | create_default (std::shared_ptr< const Executor > exec) const |
std::unique_ptr< AbstractObject > | create_default () const |
std::unique_ptr< AbstractObject > | clone (std::shared_ptr< const Executor > exec) const |
std::unique_ptr< AbstractObject > | clone () const |
AbstractObject * | copy_from (const PolymorphicObject *other) |
template<typename Derived > | |
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, AbstractObject > * | copy_from (std::unique_ptr< Derived > &&other) |
template<typename Derived > | |
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, AbstractObject > * | copy_from (const std::unique_ptr< Derived > &other) |
AbstractObject * | copy_from (const std::shared_ptr< const PolymorphicObject > &other) |
AbstractObject * | move_from (ptr_param< PolymorphicObject > other) |
AbstractObject * | clear () |
![]() | |
PolymorphicObject & | operator= (const PolymorphicObject &) |
std::unique_ptr< PolymorphicObject > | create_default (std::shared_ptr< const Executor > exec) const |
Creates a new "default" object of the same dynamic type as this object. | |
std::unique_ptr< PolymorphicObject > | create_default () const |
Creates a new "default" object of the same dynamic type as this object. | |
std::unique_ptr< PolymorphicObject > | clone (std::shared_ptr< const Executor > exec) const |
Creates a clone of the object. | |
std::unique_ptr< PolymorphicObject > | clone () const |
Creates a clone of the object. | |
PolymorphicObject * | copy_from (const PolymorphicObject *other) |
Copies another object into this object. | |
template<typename Derived , typename Deleter > | |
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, PolymorphicObject > * | copy_from (std::unique_ptr< Derived, Deleter > &&other) |
Moves another object into this object. | |
template<typename Derived , typename Deleter > | |
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, PolymorphicObject > * | copy_from (const std::unique_ptr< Derived, Deleter > &other) |
Copies another object into this object. | |
PolymorphicObject * | copy_from (const std::shared_ptr< const PolymorphicObject > &other) |
Copies another object into this object. | |
PolymorphicObject * | move_from (ptr_param< PolymorphicObject > other) |
Moves another object into this object. | |
PolymorphicObject * | clear () |
Transforms the object into its default state. | |
std::shared_ptr< const Executor > | get_executor () const noexcept |
Returns the Executor of the object. | |
![]() | |
void | add_logger (std::shared_ptr< const Logger > logger) override |
Adds a new logger to the list of subscribed loggers. | |
void | remove_logger (const Logger *logger) override |
Removes a logger from the list of subscribed loggers. | |
void | remove_logger (ptr_param< const Logger > logger) |
const std::vector< std::shared_ptr< const Logger > > & | get_loggers () const override |
Returns the vector containing all loggers registered at this object. | |
void | clear_loggers () override |
Remove all loggers registered at this object. | |
![]() | |
void | remove_logger (ptr_param< const Logger > logger) |
Static Public Member Functions | |
static auto | build () -> decltype(Factory ::create()) |
The ResidualNormReduction class is a stopping criterion which stops the iteration process when the residual norm is below a certain threshold relative to the norm of the initial residual, i.e.
when norm(residual) / norm(initial_residual) < threshold. For better performance, the checks are run thanks to kernels on the executor where the algorithm is executed.
initial_residual
in order to compute the first relative residual norm. The check method depends on either the residual_norm
or the residual
being set. When any of those is not correctly provided, an exception ::gko::NotSupported() is thrown.