\doxysection{iteration.\+hpp}
\hypertarget{iteration_8hpp_source}{}\label{iteration_8hpp_source}\index{ginkgo/core/stop/iteration.hpp@{ginkgo/core/stop/iteration.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//\ SPDX-\/FileCopyrightText:\ 2017\ -\/\ 2025\ The\ Ginkgo\ authors}}
\DoxyCodeLine{00002\ \textcolor{comment}{//}}
\DoxyCodeLine{00003\ \textcolor{comment}{//\ SPDX-\/License-\/Identifier:\ BSD-\/3-\/Clause}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#ifndef\ GKO\_PUBLIC\_CORE\_STOP\_ITERATION\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_STOP\_ITERATION\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <ginkgo/core/stop/criterion.hpp>}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00013\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1stop}{stop}}\ \{}
\DoxyCodeLine{00014\ }
\DoxyCodeLine{00024\ \textcolor{keyword}{class\ }Iteration\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<Iteration,\ Criterion>\ \{}
\DoxyCodeLine{00025\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<Iteration,\ \doxymbox{\hyperlink{classgko_1_1stop_1_1Criterion}{Criterion}}>;}
\DoxyCodeLine{00026\ }
\DoxyCodeLine{00027\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00028\ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga1fc8e9d8be0c9ad2d72bc1ddfc6d8358}{GKO\_CREATE\_FACTORY\_PARAMETERS}}(parameters,\ \doxymbox{\hyperlink{classgko_1_1stop_1_1Iteration_1_1Factory}{Factory}})}
\DoxyCodeLine{00029\ \ \ \ \ \{}
\DoxyCodeLine{00033\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{structgko_1_1stop_1_1Iteration_1_1parameters__type_a7daf7ecb5cf107b9e7444b0898f691c4}{max\_iters}}\{0\};}
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1stop_1_1Iteration_1_1parameters__type}{parameters\_type}}\&\ with\_max\_iters(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ value)}
\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00037\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>max\_iters\ =\ value;}
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};}
\DoxyCodeLine{00039\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00040\ \ \ \ \ \};}
\DoxyCodeLine{00041\ \ \ \ \ GKO\_ENABLE\_CRITERION\_FACTORY(Iteration,\ parameters,\ Factory);}
\DoxyCodeLine{00042\ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga521f65604cc4cf427dcb2ecfa49b757c}{GKO\_ENABLE\_BUILD\_METHOD}}(Factory);}
\DoxyCodeLine{00043\ }
\DoxyCodeLine{00044\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00045\ \ \ \ \ \textcolor{keywordtype}{bool}\ check\_impl(\doxymbox{\hyperlink{namespacegko_a06d96f1ecdca6b86399173969771c3fb}{uint8}}\ stoppingId,\ \textcolor{keywordtype}{bool}\ setFinalized,}
\DoxyCodeLine{00046\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<stopping\_status>}}*\ stop\_status,\ \textcolor{keywordtype}{bool}*\ one\_changed,}
\DoxyCodeLine{00047\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ Updater\&\ updater)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keyword}{explicit}\ Iteration(std::shared\_ptr<const\ gko::Executor>\ exec)}
\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<Iteration,\ \doxymbox{\hyperlink{classgko_1_1stop_1_1Criterion}{Criterion}}>(\doxymbox{\hyperlink{namespacestd}{std}}::move(exec))}
\DoxyCodeLine{00051\ \ \ \ \ \{\}}
\DoxyCodeLine{00052\ }
\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keyword}{explicit}\ Iteration(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1stop_1_1Iteration_1_1Factory}{Factory}}*\ factory,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1stop_1_1CriterionArgs}{CriterionArgs}}\&\ args)}
\DoxyCodeLine{00054\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<Iteration,\ \doxymbox{\hyperlink{classgko_1_1stop_1_1Criterion}{Criterion}}>(}
\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ factory-\/>get\_executor()),}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ parameters\_\{factory-\/>get\_parameters()\}}
\DoxyCodeLine{00057\ \ \ \ \ \{\}}
\DoxyCodeLine{00058\ \};}
\DoxyCodeLine{00059\ }
\DoxyCodeLine{00060\ }
\DoxyCodeLine{00061\ \}\ \ \textcolor{comment}{//\ namespace\ stop}}
\DoxyCodeLine{00062\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00065\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_STOP\_ITERATION\_HPP\_}}

\end{DoxyCode}
