Ginkgo
Generated from pipelines/1589998975 branch based on develop. Ginkgo version 1.10.0
A numerical linear algebra library targeting many-core architectures
|
The Updater class serves for convenient argument passing to the Criterion's check function. More...
#include <ginkgo/core/stop/criterion.hpp>
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 | |
Updater & | operator= (const Updater &)=delete |
Updater & | operator= (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 Updater & | num_iterations (size_type const &value) const |
const Updater & | ignore_residual_check (bool const &value) const |
const Updater & | residual (ptr_param< const LinOp > value) const |
const Updater & | residual_norm (ptr_param< const LinOp > value) const |
const Updater & | implicit_sq_residual_norm (ptr_param< const LinOp > value) const |
const Updater & | solution (ptr_param< const LinOp > value) const |
Public Attributes | |
size_type | num_iterations_ {} |
bool | ignore_residual_check_ {} |
const LinOp * | residual_ {} |
const LinOp * | residual_norm_ {} |
const LinOp * | implicit_sq_residual_norm_ {} |
const LinOp * | solution_ {} |
Friends | |
class | Criterion |
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.
|
inline |
Calls the parent Criterion object's check method.
References gko::stop::Criterion::check().