Ginkgo  Generated from pipelines/1556235455 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
gko::stop::ResidualNorm< ValueType > Class Template Reference

The ResidualNorm class is a stopping criterion which stops the iteration process when the actual residual norm is below a certain threshold relative to. More...

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

Inheritance diagram for gko::stop::ResidualNorm< ValueType >:
[legend]
Collaboration diagram for gko::stop::ResidualNorm< 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< ResidualNormBase< ValueType >, Criterion >
std::unique_ptr< ResidualNormBase< ValueType > > create_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< ResidualNormBase< ValueType > > create_default () const
 
std::unique_ptr< ResidualNormBase< ValueType > > clone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< ResidualNormBase< ValueType > > clone () const
 
ResidualNormBase< ValueType > * copy_from (const PolymorphicObject *other)
 
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, ResidualNormBase< ValueType > > * copy_from (std::unique_ptr< Derived > &&other)
 
std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, ResidualNormBase< ValueType > > * copy_from (const std::unique_ptr< Derived > &other)
 
ResidualNormBase< ValueType > * copy_from (const std::shared_ptr< const PolymorphicObject > &other)
 
ResidualNormBase< ValueType > * move_from (ptr_param< PolymorphicObject > other)
 
ResidualNormBase< ValueType > * clear ()
 

Static Public Member Functions

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

Detailed Description

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

The ResidualNorm class is a stopping criterion which stops the iteration process when the actual residual norm is below a certain threshold relative to.

  1. the norm of the right-hand side, norm(residual) $\leq$ < threshold * norm(right_hand_side).
  2. the initial residual, norm(residual) $\leq$ threshold * norm(initial_residual).
  3. one, norm(residual) $\leq$ threshold.

For better performance, the checks are run on the executor where the algorithm is executed.

Note
To use this stopping criterion there are some dependencies. The constructor depends on either b or the initial_residual in order to compute their norms. If this is not correctly provided, an exception ::gko::NotSupported() is thrown.

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