Ginkgo Generated from branch based on master. Ginkgo version 1.7.0
A numerical linear algebra library targeting many-core architectures
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
gko::stop::RelativeResidualNorm< ValueType > Class Template Reference

The RelativeResidualNorm 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 right-hand side, i.e. More...

#include <ginkgo/core/stop/residual_norm.hpp>

Inheritance diagram for gko::stop::RelativeResidualNorm< ValueType >:
[legend]
Collaboration diagram for gko::stop::RelativeResidualNorm< ValueType >:
[legend]

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_typeget_parameters () const
 
- Public Member Functions inherited from gko::EnableAbstractPolymorphicObject< AbstractObject, PolymorphicBase >
std::unique_ptr< AbstractObjectcreate_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< AbstractObjectcreate_default () const
 
std::unique_ptr< AbstractObjectclone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< AbstractObjectclone () const
 
AbstractObjectcopy_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)
 
AbstractObjectcopy_from (const std::shared_ptr< const PolymorphicObject > &other)
 
AbstractObjectmove_from (ptr_param< PolymorphicObject > other)
 
AbstractObjectclear ()
 
- Public Member Functions inherited from gko::PolymorphicObject
PolymorphicObjectoperator= (const PolymorphicObject &)
 
std::unique_ptr< PolymorphicObjectcreate_default (std::shared_ptr< const Executor > exec) const
 Creates a new "default" object of the same dynamic type as this object.
 
std::unique_ptr< PolymorphicObjectcreate_default () const
 Creates a new "default" object of the same dynamic type as this object.
 
std::unique_ptr< PolymorphicObjectclone (std::shared_ptr< const Executor > exec) const
 Creates a clone of the object.
 
std::unique_ptr< PolymorphicObjectclone () const
 Creates a clone of the object.
 
PolymorphicObjectcopy_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.
 
PolymorphicObjectcopy_from (const std::shared_ptr< const PolymorphicObject > &other)
 Copies another object into this object.
 
PolymorphicObjectmove_from (ptr_param< PolymorphicObject > other)
 Moves another object into this object.
 
PolymorphicObjectclear ()
 Transforms the object into its default state.
 
std::shared_ptr< const Executorget_executor () const noexcept
 Returns the Executor of the object.
 
- Public Member Functions inherited from gko::log::EnableLogging< PolymorphicObject >
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.
 
- Public Member Functions inherited from gko::log::Loggable
void remove_logger (ptr_param< const Logger > logger)
 

Static Public Member Functions

static auto build () -> decltype(Factory ::create())
 

Detailed Description

template<typename ValueType = default_precision>
class gko::stop::RelativeResidualNorm< ValueType >

The RelativeResidualNorm 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 right-hand side, i.e.

when norm(residual) / norm(right_hand_side) < threshold. For better performance, the checks are run thanks to kernels on the executor where the algorithm is executed.

Note
To use this stopping criterion there are some dependencies. The constructor depends on b in order to compute the norm of the right-hand side. If this is not correctly provided, an exception ::gko::NotSupported() is thrown.

The documentation for this class was generated from the following file: