Ginkgo  Generated from pipelines/1554403166 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
Public Member Functions | Public Attributes | Friends | List of all members
gko::stop::Criterion::Updater Class Reference

The Updater class serves for convenient argument passing to the Criterion's check function. More...

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

Collaboration diagram for gko::stop::Criterion::Updater:
[legend]

Public Member Functions

 Updater (const Updater &)=delete
 Prevent copying and moving the object This is to enforce the use of argument passing and calling check at the same time.
 
 Updater (Updater &&)=delete
 
Updateroperator= (const Updater &)=delete
 
Updateroperator= (Updater &&)=delete
 
bool check (uint8 stopping_id, bool set_finalized, array< stopping_status > *stop_status, bool *one_changed) const
 Calls the parent Criterion object's check method. More...
 
const Updaternum_iterations (size_type const &value) const
 
const Updaterignore_residual_check (bool const &value) const
 
const Updaterresidual (ptr_param< const LinOp > value) const
 
const Updaterresidual_norm (ptr_param< const LinOp > value) const
 
const Updaterimplicit_sq_residual_norm (ptr_param< const LinOp > value) const
 
const Updatersolution (ptr_param< const LinOp > value) const
 

Public Attributes

size_type num_iterations_ {}
 
bool ignore_residual_check_ {}
 
const LinOpresidual_ {}
 
const LinOpresidual_norm_ {}
 
const LinOpimplicit_sq_residual_norm_ {}
 
const LinOpsolution_ {}
 

Friends

class Criterion
 

Detailed Description

The Updater class serves for convenient argument passing to the Criterion's check function.

The pattern used is a Builder, except Updater builds a function's arguments before calling the function itself, and does not build an object. This allows calling a Criterion's check in the form of: stop_criterion->update() .num_iterations(num_iterations) .ignore_residual_check(ignore_residual_check) .residual_norm(residual_norm) .implicit_sq_residual_norm(implicit_sq_residual_norm) .residual(residual) .solution(solution) .check(converged);

If there is a need for a new form of data to pass to the Criterion, it should be added here.

Member Function Documentation

◆ check()

bool gko::stop::Criterion::Updater::check ( uint8  stopping_id,
bool  set_finalized,
array< stopping_status > *  stop_status,
bool *  one_changed 
) const
inline

Calls the parent Criterion object's check method.

References gko::stop::Criterion::check().


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