\doxysection{batch\+\_\+solver\+\_\+base.\+hpp}
\hypertarget{batch__solver__base_8hpp_source}{}\label{batch__solver__base_8hpp_source}\index{ginkgo/core/solver/batch\_solver\_base.hpp@{ginkgo/core/solver/batch\_solver\_base.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//\ SPDX-\/FileCopyrightText:\ 2017\ -\/\ 2024\ 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\_SOLVER\_BATCH\_SOLVER\_BASE\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_SOLVER\_BATCH\_SOLVER\_BASE\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/abstract\_factory.hpp>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/batch\_lin\_op.hpp>}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/batch\_multi\_vector.hpp>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/utils\_helper.hpp>}}
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ <ginkgo/core/log/batch\_logger.hpp>}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <ginkgo/core/matrix/batch\_identity.hpp>}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <ginkgo/core/stop/batch\_stop\_enum.hpp>}}
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ }
\DoxyCodeLine{00018\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00019\ \textcolor{keyword}{namespace\ }batch\ \{}
\DoxyCodeLine{00020\ \textcolor{keyword}{namespace\ }solver\ \{}
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00029\ \textcolor{keyword}{class\ }BatchSolver\ \{}
\DoxyCodeLine{00030\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00036\ \ \ \ \ std::shared\_ptr<const\ BatchLinOp>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a11ba46b13df4ad9e12f2409ac6e572f7}{get\_system\_matrix}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00037\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00038\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>system\_matrix\_;}
\DoxyCodeLine{00039\ \ \ \ \ \}}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00046\ \ \ \ \ std::shared\_ptr<const\ BatchLinOp>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_ac7c6859c7a6f08cb95048d56686f7e2d}{get\_preconditioner}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00047\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00048\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>preconditioner\_;}
\DoxyCodeLine{00049\ \ \ \ \ \}}
\DoxyCodeLine{00050\ }
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keywordtype}{double}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a419415d18e6b01226cddc621b84d5976}{get\_tolerance}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ this-\/>residual\_tol\_;\ \}}
\DoxyCodeLine{00057\ }
\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a57d2436e61f5ced92f8c367a15baf0c7}{reset\_tolerance}}(\textcolor{keywordtype}{double}\ res\_tol)}
\DoxyCodeLine{00065\ \ \ \ \ \{}
\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (res\_tol\ <\ 0)\ \{}
\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_INVALID\_STATE(\textcolor{stringliteral}{"{}Tolerance\ cannot\ be\ negative!"{}});}
\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00069\ \ \ \ \ \ \ \ \ this-\/>residual\_tol\_\ =\ res\_tol;}
\DoxyCodeLine{00070\ \ \ \ \ \}}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a4d0421d8f569772dc0637932907dcb07}{get\_max\_iterations}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ this-\/>max\_iterations\_;\ \}}
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00085\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a3d3bfb23cf2fc3b1aee8e9aad2a4e488}{reset\_max\_iterations}}(\textcolor{keywordtype}{int}\ max\_iterations)}
\DoxyCodeLine{00086\ \ \ \ \ \{}
\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (max\_iterations\ <\ 0)\ \{}
\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_INVALID\_STATE(\textcolor{stringliteral}{"{}Max\ iterations\ cannot\ be\ negative!"{}});}
\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ this-\/>max\_iterations\_\ =\ max\_iterations;}
\DoxyCodeLine{00091\ \ \ \ \ \}}
\DoxyCodeLine{00092\ }
\DoxyCodeLine{00098\ \ \ \ \ ::gko::batch::stop::tolerance\_type\ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a79f23896ce9872932b3848524eae4ee8}{get\_tolerance\_type}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00099\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>tol\_type\_;}
\DoxyCodeLine{00101\ \ \ \ \ \}}
\DoxyCodeLine{00102\ }
\DoxyCodeLine{00108\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_aae3b41a8e4e43d275f62a98610ec333b}{reset\_tolerance\_type}}(::gko::batch::stop::tolerance\_type\ tol\_type)}
\DoxyCodeLine{00109\ \ \ \ \ \{}
\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (tol\_type\ ==\ ::gko::batch::stop::tolerance\_type::absolute\ ||}
\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ \ \ \ \ tol\_type\ ==\ ::gko::batch::stop::tolerance\_type::relative)\ \{}
\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>tol\_type\_\ =\ tol\_type;}
\DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_INVALID\_STATE(\textcolor{stringliteral}{"{}Invalid\ tolerance\ type\ specified!"{}});}
\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00116\ \ \ \ \ \}}
\DoxyCodeLine{00117\ }
\DoxyCodeLine{00118\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00119\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver}{BatchSolver}}()\ \{\}}
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00121\ \ \ \ \ BatchSolver(std::shared\_ptr<const\ BatchLinOp>\ system\_matrix,}
\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ BatchLinOp>\ gen\_preconditioner,}
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ res\_tol,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ max\_iterations,}
\DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ const\ ::gko::batch::stop::tolerance\_type\ tol\_type)}
\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ :\ system\_matrix\_\{\doxymbox{\hyperlink{namespacestd}{std}}::move(system\_matrix)\},}
\DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ \ \ preconditioner\_\{\doxymbox{\hyperlink{namespacestd}{std}}::move(gen\_preconditioner)\},}
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \ \ residual\_tol\_\{res\_tol\},}
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \ \ max\_iterations\_\{max\_iterations\},}
\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ \ \ tol\_type\_\{tol\_type\},}
\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ \ \ workspace\_\{\}}
\DoxyCodeLine{00131\ \ \ \ \ \{\}}
\DoxyCodeLine{00132\ }
\DoxyCodeLine{00133\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_system\_matrix\_base(std::shared\_ptr<const\ BatchLinOp>\ system\_matrix)}
\DoxyCodeLine{00134\ \ \ \ \ \{}
\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ this-\/>system\_matrix\_\ =\ std::move(system\_matrix);}
\DoxyCodeLine{00136\ \ \ \ \ \}}
\DoxyCodeLine{00137\ }
\DoxyCodeLine{00138\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_preconditioner\_base(std::shared\_ptr<const\ BatchLinOp>\ precond)}
\DoxyCodeLine{00139\ \ \ \ \ \{}
\DoxyCodeLine{00140\ \ \ \ \ \ \ \ \ this-\/>preconditioner\_\ =\ std::move(precond);}
\DoxyCodeLine{00141\ \ \ \ \ \}}
\DoxyCodeLine{00142\ }
\DoxyCodeLine{00143\ \ \ \ \ std::shared\_ptr<const\ BatchLinOp>\ system\_matrix\_\{\};}
\DoxyCodeLine{00144\ \ \ \ \ std::shared\_ptr<const\ BatchLinOp>\ preconditioner\_\{\};}
\DoxyCodeLine{00145\ \ \ \ \ \textcolor{keywordtype}{double}\ residual\_tol\_\{\};}
\DoxyCodeLine{00146\ \ \ \ \ \textcolor{keywordtype}{int}\ max\_iterations\_\{\};}
\DoxyCodeLine{00147\ \ \ \ \ ::gko::batch::stop::tolerance\_type\ tol\_type\_\{\};}
\DoxyCodeLine{00148\ \ \ \ \ \textcolor{keyword}{mutable}\ array<unsigned\ char>\ workspace\_\{\};}
\DoxyCodeLine{00149\ \};}
\DoxyCodeLine{00150\ }
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ Parameters,\ \textcolor{keyword}{typename}\ Factory>}
\DoxyCodeLine{00153\ \textcolor{keyword}{struct\ }\doxymbox{\hyperlink{structgko_1_1batch_1_1solver_1_1enable__preconditioned__iterative__solver__factory__parameters}{enable\_preconditioned\_iterative\_solver\_factory\_parameters}}}
\DoxyCodeLine{00154\ \ \ \ \ :\ \doxymbox{\hyperlink{classgko_1_1enable__parameters__type}{enable\_parameters\_type}}<Parameters,\ Factory>\ \{}
\DoxyCodeLine{00161\ \ \ \ \ \textcolor{keywordtype}{int}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1batch_1_1solver_1_1enable__preconditioned__iterative__solver__factory__parameters_a27570adff31e3558786aced9c2a0042c}{max\_iterations}},\ 100);}
\DoxyCodeLine{00162\ }
\DoxyCodeLine{00169\ \ \ \ \ \textcolor{keywordtype}{double}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1batch_1_1solver_1_1enable__preconditioned__iterative__solver__factory__parameters_a2de5472d843daeead2e2be40963d1e51}{tolerance}},\ 1e-\/11);}
\DoxyCodeLine{00170\ }
\DoxyCodeLine{00175\ \ \ \ \ ::gko::batch::stop::tolerance\_type\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(}
\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1batch_1_1solver_1_1enable__preconditioned__iterative__solver__factory__parameters_a69d47d944c4173d4a067613a30338c0e}{tolerance\_type}},\ ::gko::batch::stop::tolerance\_type::absolute);}
\DoxyCodeLine{00177\ }
\DoxyCodeLine{00182\ \ \ \ \ std::shared\_ptr<const\ BatchLinOpFactory>\ GKO\_DEFERRED\_FACTORY\_PARAMETER(}
\DoxyCodeLine{00183\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1batch_1_1solver_1_1enable__preconditioned__iterative__solver__factory__parameters_a62d982e1f1bad507ea74ba0be81d859b}{preconditioner}});}
\DoxyCodeLine{00184\ }
\DoxyCodeLine{00189\ \ \ \ \ std::shared\_ptr<const\ BatchLinOp>\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(}
\DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1batch_1_1solver_1_1enable__preconditioned__iterative__solver__factory__parameters_ab9b3bdf2d54eecbfb9c322e3e4289295}{generated\_preconditioner}},\ \textcolor{keyword}{nullptr});}
\DoxyCodeLine{00191\ \};}
\DoxyCodeLine{00192\ }
\DoxyCodeLine{00193\ }
\DoxyCodeLine{00202\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ConcreteSolver,\ \textcolor{keyword}{typename}\ ValueType,}
\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{typename}\ PolymorphicBase\ =\ \doxymbox{\hyperlink{classgko_1_1batch_1_1BatchLinOp}{BatchLinOp}}>}
\DoxyCodeLine{00204\ \textcolor{keyword}{class\ }EnableBatchSolver}
\DoxyCodeLine{00205\ \ \ \ \ :\ \textcolor{keyword}{public}\ BatchSolver,}
\DoxyCodeLine{00206\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp}}<ConcreteSolver,\ PolymorphicBase>\ \{}
\DoxyCodeLine{00207\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00208\ \ \ \ \ \textcolor{keyword}{using\ }real\_type\ =\ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<ValueType>}};}
\DoxyCodeLine{00209\ }
\DoxyCodeLine{00210\ \ \ \ \ \textcolor{keyword}{const}\ ConcreteSolver*\ apply(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ b,}
\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ x)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00212\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ this-\/>validate\_application\_parameters(b.get(),\ x.get());}
\DoxyCodeLine{00214\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ exec\ =\ this-\/>get\_executor();}
\DoxyCodeLine{00215\ \ \ \ \ \ \ \ \ this-\/>apply\_impl(\doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ b).get(),}
\DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ x).get());}
\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ self();}
\DoxyCodeLine{00218\ \ \ \ \ \}}
\DoxyCodeLine{00219\ }
\DoxyCodeLine{00220\ \ \ \ \ \textcolor{keyword}{const}\ ConcreteSolver*\ apply(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ alpha,}
\DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ b,}
\DoxyCodeLine{00222\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ beta,}
\DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ x)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00224\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00225\ \ \ \ \ \ \ \ \ this-\/>validate\_application\_parameters(alpha.get(),\ b.get(),\ beta.get(),}
\DoxyCodeLine{00226\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x.get());}
\DoxyCodeLine{00227\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ exec\ =\ this-\/>get\_executor();}
\DoxyCodeLine{00228\ \ \ \ \ \ \ \ \ this-\/>apply\_impl(\doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ alpha).get(),}
\DoxyCodeLine{00229\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ b).get(),}
\DoxyCodeLine{00230\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ beta).get(),}
\DoxyCodeLine{00231\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ x).get());}
\DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ self();}
\DoxyCodeLine{00233\ \ \ \ \ \}}
\DoxyCodeLine{00234\ }
\DoxyCodeLine{00235\ \ \ \ \ ConcreteSolver*\ apply(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ b,}
\DoxyCodeLine{00236\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ x)}
\DoxyCodeLine{00237\ \ \ \ \ \{}
\DoxyCodeLine{00238\ \ \ \ \ \ \ \ \ this-\/>validate\_application\_parameters(b.get(),\ x.get());}
\DoxyCodeLine{00239\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ exec\ =\ this-\/>get\_executor();}
\DoxyCodeLine{00240\ \ \ \ \ \ \ \ \ this-\/>apply\_impl(\doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ b).get(),}
\DoxyCodeLine{00241\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ x).get());}
\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ self();}
\DoxyCodeLine{00243\ \ \ \ \ \}}
\DoxyCodeLine{00244\ }
\DoxyCodeLine{00245\ \ \ \ \ ConcreteSolver*\ apply(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ alpha,}
\DoxyCodeLine{00246\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ b,}
\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ beta,}
\DoxyCodeLine{00248\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}>\ x)}
\DoxyCodeLine{00249\ \ \ \ \ \{}
\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ this-\/>validate\_application\_parameters(alpha.get(),\ b.get(),\ beta.get(),}
\DoxyCodeLine{00251\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x.get());}
\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ exec\ =\ this-\/>get\_executor();}
\DoxyCodeLine{00253\ \ \ \ \ \ \ \ \ this-\/>apply\_impl(\doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ alpha).get(),}
\DoxyCodeLine{00254\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ b).get(),}
\DoxyCodeLine{00255\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ beta).get(),}
\DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_adf2f8602dc9453752a787b40bbf13fcf}{make\_temporary\_clone}}(exec,\ x).get());}
\DoxyCodeLine{00257\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ self();}
\DoxyCodeLine{00258\ \ \ \ \ \}}
\DoxyCodeLine{00259\ }
\DoxyCodeLine{00260\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00261\ \ \ \ \ GKO\_ENABLE\_SELF(ConcreteSolver);}
\DoxyCodeLine{00262\ }
\DoxyCodeLine{00263\ \ \ \ \ \textcolor{keyword}{explicit}\ EnableBatchSolver(std::shared\_ptr<const\ Executor>\ exec)}
\DoxyCodeLine{00264\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp<ConcreteSolver,\ PolymorphicBase>}}(std::move(exec))}
\DoxyCodeLine{00265\ \ \ \ \ \{\}}
\DoxyCodeLine{00266\ }
\DoxyCodeLine{00267\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ FactoryParameters>}
\DoxyCodeLine{00268\ \ \ \ \ \textcolor{keyword}{explicit}\ EnableBatchSolver(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00269\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ BatchLinOp>\ system\_matrix,}
\DoxyCodeLine{00270\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ FactoryParameters\&\ params)}
\DoxyCodeLine{00271\ \ \ \ \ \ \ \ \ :\ BatchSolver(system\_matrix,\ \textcolor{keyword}{nullptr},\ params.tolerance,}
\DoxyCodeLine{00272\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ params.max\_iterations,\ params.tolerance\_type),}
\DoxyCodeLine{00273\ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp<ConcreteSolver,\ PolymorphicBase>}}(}
\DoxyCodeLine{00274\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ exec,\ \doxymbox{\hyperlink{namespacegko_aacad7f87b38d3f26674ed034d442a1a0}{gko::transpose}}(system\_matrix-\/>get\_size()))}
\DoxyCodeLine{00275\ \ \ \ \ \{}
\DoxyCodeLine{00276\ \ \ \ \ \ \ \ \ GKO\_ASSERT\_BATCH\_HAS\_SQUARE\_DIMENSIONS(system\_matrix\_);}
\DoxyCodeLine{00277\ }
\DoxyCodeLine{00278\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ \textcolor{keyword}{typename}\ ConcreteSolver::value\_type;}
\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }Identity\ =\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Identity}{matrix::Identity<value\_type>}};}
\DoxyCodeLine{00280\ \ \ \ \ \ \ \ \ \textcolor{keyword}{using\ }real\_type\ =\ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<value\_type>}};}
\DoxyCodeLine{00281\ }
\DoxyCodeLine{00282\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (params.generated\_preconditioner)\ \{}
\DoxyCodeLine{00283\ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_ASSERT\_BATCH\_EQUAL\_DIMENSIONS(params.generated\_preconditioner,}
\DoxyCodeLine{00284\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{this});}
\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \ \ \ \ preconditioner\_\ =\ std::move(params.generated\_preconditioner);}
\DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (params.preconditioner)\ \{}
\DoxyCodeLine{00287\ \ \ \ \ \ \ \ \ \ \ \ \ preconditioner\_\ =\ params.preconditioner-\/>generate(system\_matrix\_);}
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ \textcolor{keywordtype}{id}\ =\ Identity::create(exec,\ system\_matrix-\/>get\_size());}
\DoxyCodeLine{00290\ \ \ \ \ \ \ \ \ \ \ \ \ preconditioner\_\ =\ std::move(\textcolor{keywordtype}{id});}
\DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00292\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ We\ use\ a\ workspace\ here\ to\ store\ the\ logger\ data\ (iteration\ count}}
\DoxyCodeLine{00293\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ and\ solver\ residual),\ and\ require\ a\ minimum\ size\ of}}
\DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ \`{}sizeof(real\_type)+\ sizeof(int)`}}
\DoxyCodeLine{00295\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ workspace\_size\ =}
\DoxyCodeLine{00296\ \ \ \ \ \ \ \ \ \ \ \ \ system\_matrix-\/>get\_num\_batch\_items()\ *\ 32;}
\DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ workspace\_.set\_executor(exec);}
\DoxyCodeLine{00298\ \ \ \ \ \ \ \ \ workspace\_.resize\_and\_reset(workspace\_size);}
\DoxyCodeLine{00299\ \ \ \ \ \}}
\DoxyCodeLine{00300\ }
\DoxyCodeLine{00301\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_system\_matrix(std::shared\_ptr<const\ BatchLinOp>\ new\_system\_matrix)}
\DoxyCodeLine{00302\ \ \ \ \ \{}
\DoxyCodeLine{00303\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ exec\ =\ self()-\/>get\_executor();}
\DoxyCodeLine{00304\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (new\_system\_matrix)\ \{}
\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_ASSERT\_BATCH\_EQUAL\_DIMENSIONS(self(),\ new\_system\_matrix);}
\DoxyCodeLine{00306\ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_ASSERT\_BATCH\_HAS\_SQUARE\_DIMENSIONS(new\_system\_matrix);}
\DoxyCodeLine{00307\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (new\_system\_matrix-\/>get\_executor()\ !=\ exec)\ \{}
\DoxyCodeLine{00308\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ new\_system\_matrix\ =\ \doxymbox{\hyperlink{namespacegko_aa194e34282452493231ca7b01ffb5e64}{gko::clone}}(exec,\ new\_system\_matrix);}
\DoxyCodeLine{00309\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00310\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00311\ \ \ \ \ \ \ \ \ this-\/>set\_system\_matrix\_base(new\_system\_matrix);}
\DoxyCodeLine{00312\ \ \ \ \ \}}
\DoxyCodeLine{00313\ }
\DoxyCodeLine{00314\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_preconditioner(std::shared\_ptr<const\ BatchLinOp>\ new\_precond)}
\DoxyCodeLine{00315\ \ \ \ \ \{}
\DoxyCodeLine{00316\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ exec\ =\ self()-\/>get\_executor();}
\DoxyCodeLine{00317\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (new\_precond)\ \{}
\DoxyCodeLine{00318\ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_ASSERT\_BATCH\_EQUAL\_DIMENSIONS(self(),\ new\_precond);}
\DoxyCodeLine{00319\ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_ASSERT\_BATCH\_HAS\_SQUARE\_DIMENSIONS(new\_precond);}
\DoxyCodeLine{00320\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (new\_precond-\/>get\_executor()\ !=\ exec)\ \{}
\DoxyCodeLine{00321\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ new\_precond\ =\ \doxymbox{\hyperlink{namespacegko_aa194e34282452493231ca7b01ffb5e64}{gko::clone}}(exec,\ new\_precond);}
\DoxyCodeLine{00322\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00323\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00324\ \ \ \ \ \ \ \ \ this-\/>set\_preconditioner\_base(new\_precond);}
\DoxyCodeLine{00325\ \ \ \ \ \}}
\DoxyCodeLine{00326\ }
\DoxyCodeLine{00327\ \ \ \ \ EnableBatchSolver\&\ operator=(\textcolor{keyword}{const}\ EnableBatchSolver\&\ other)}
\DoxyCodeLine{00328\ \ \ \ \ \{}
\DoxyCodeLine{00329\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\&other\ !=\ \textcolor{keyword}{this})\ \{}
\DoxyCodeLine{00330\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>set\_size(other.get\_size());}
\DoxyCodeLine{00331\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>set\_system\_matrix(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a11ba46b13df4ad9e12f2409ac6e572f7}{get\_system\_matrix}}());}
\DoxyCodeLine{00332\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>set\_preconditioner(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_ac7c6859c7a6f08cb95048d56686f7e2d}{get\_preconditioner}}());}
\DoxyCodeLine{00333\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a57d2436e61f5ced92f8c367a15baf0c7}{reset\_tolerance}}(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a419415d18e6b01226cddc621b84d5976}{get\_tolerance}}());}
\DoxyCodeLine{00334\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a3d3bfb23cf2fc3b1aee8e9aad2a4e488}{reset\_max\_iterations}}(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a4d0421d8f569772dc0637932907dcb07}{get\_max\_iterations}}());}
\DoxyCodeLine{00335\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_aae3b41a8e4e43d275f62a98610ec333b}{reset\_tolerance\_type}}(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a79f23896ce9872932b3848524eae4ee8}{get\_tolerance\_type}}());}
\DoxyCodeLine{00336\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00337\ }
\DoxyCodeLine{00338\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};}
\DoxyCodeLine{00339\ \ \ \ \ \}}
\DoxyCodeLine{00340\ }
\DoxyCodeLine{00341\ \ \ \ \ EnableBatchSolver\&\ operator=(EnableBatchSolver\&\&\ other)}
\DoxyCodeLine{00342\ \ \ \ \ \{}
\DoxyCodeLine{00343\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\&other\ !=\ \textcolor{keyword}{this})\ \{}
\DoxyCodeLine{00344\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>set\_size(other.get\_size());}
\DoxyCodeLine{00345\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>set\_system\_matrix(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a11ba46b13df4ad9e12f2409ac6e572f7}{get\_system\_matrix}}());}
\DoxyCodeLine{00346\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>set\_preconditioner(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_ac7c6859c7a6f08cb95048d56686f7e2d}{get\_preconditioner}}());}
\DoxyCodeLine{00347\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a57d2436e61f5ced92f8c367a15baf0c7}{reset\_tolerance}}(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a419415d18e6b01226cddc621b84d5976}{get\_tolerance}}());}
\DoxyCodeLine{00348\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a3d3bfb23cf2fc3b1aee8e9aad2a4e488}{reset\_max\_iterations}}(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a4d0421d8f569772dc0637932907dcb07}{get\_max\_iterations}}());}
\DoxyCodeLine{00349\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_aae3b41a8e4e43d275f62a98610ec333b}{reset\_tolerance\_type}}(other.\doxymbox{\hyperlink{classgko_1_1batch_1_1solver_1_1BatchSolver_a79f23896ce9872932b3848524eae4ee8}{get\_tolerance\_type}}());}
\DoxyCodeLine{00350\ \ \ \ \ \ \ \ \ \ \ \ \ other.set\_system\_matrix(\textcolor{keyword}{nullptr});}
\DoxyCodeLine{00351\ \ \ \ \ \ \ \ \ \ \ \ \ other.set\_preconditioner(\textcolor{keyword}{nullptr});}
\DoxyCodeLine{00352\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00353\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};}
\DoxyCodeLine{00354\ \ \ \ \ \}}
\DoxyCodeLine{00355\ }
\DoxyCodeLine{00356\ \ \ \ \ EnableBatchSolver(\textcolor{keyword}{const}\ EnableBatchSolver\&\ other)}
\DoxyCodeLine{00357\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp<ConcreteSolver,\ PolymorphicBase>}}(}
\DoxyCodeLine{00358\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ other.self()-\/>get\_executor(),\ other.self()-\/>get\_size())}
\DoxyCodeLine{00359\ \ \ \ \ \{}
\DoxyCodeLine{00360\ \ \ \ \ \ \ \ \ *\textcolor{keyword}{this}\ =\ other;}
\DoxyCodeLine{00361\ \ \ \ \ \}}
\DoxyCodeLine{00362\ }
\DoxyCodeLine{00363\ \ \ \ \ EnableBatchSolver(EnableBatchSolver\&\&\ other)}
\DoxyCodeLine{00364\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp<ConcreteSolver,\ PolymorphicBase>}}(}
\DoxyCodeLine{00365\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ other.self()-\/>get\_executor(),\ other.self()-\/>get\_size())}
\DoxyCodeLine{00366\ \ \ \ \ \{}
\DoxyCodeLine{00367\ \ \ \ \ \ \ \ \ *\textcolor{keyword}{this}\ =\ std::move(other);}
\DoxyCodeLine{00368\ \ \ \ \ \}}
\DoxyCodeLine{00369\ }
\DoxyCodeLine{00370\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}*\ b,}
\DoxyCodeLine{00371\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}*\ x)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00372\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00373\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ exec\ =\ this-\/>get\_executor();}
\DoxyCodeLine{00374\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (b-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector_a53513d38739f579a24242ac08d2c7a5c}{get\_common\_size}}()[1]\ >\ 1)\ \{}
\DoxyCodeLine{00375\ \ \ \ \ \ \ \ \ \ \ \ \ GKO\_NOT\_IMPLEMENTED;}
\DoxyCodeLine{00376\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00377\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ workspace\_view\ =\ workspace\_.as\_view();}
\DoxyCodeLine{00378\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ log\_data\_\ =\ std::make\_unique<log::detail::log\_data<real\_type>>(}
\DoxyCodeLine{00379\ \ \ \ \ \ \ \ \ \ \ \ \ exec,\ b-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector_a7e866dde6ed93bfb3489a74da31c82a6}{get\_num\_batch\_items}}(),\ workspace\_view);}
\DoxyCodeLine{00380\ }
\DoxyCodeLine{00381\ \ \ \ \ \ \ \ \ this-\/>solver\_apply(b,\ x,\ log\_data\_.get());}
\DoxyCodeLine{00382\ }
\DoxyCodeLine{00383\ \ \ \ \ \ \ \ \ this-\/>\textcolor{keyword}{template}\ \doxymbox{\hyperlink{namespacegko_1_1batch_1_1log}{log<gko::log::Logger::batch\_solver\_completed>}}(}
\DoxyCodeLine{00384\ \ \ \ \ \ \ \ \ \ \ \ \ log\_data\_-\/>iter\_counts,\ log\_data\_-\/>res\_norms);}
\DoxyCodeLine{00385\ \ \ \ \ \}}
\DoxyCodeLine{00386\ }
\DoxyCodeLine{00387\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}*\ alpha,}
\DoxyCodeLine{00388\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}*\ b,}
\DoxyCodeLine{00389\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}*\ beta,}
\DoxyCodeLine{00390\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}*\ x)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00391\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00392\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ x\_clone\ =\ x-\/>clone();}
\DoxyCodeLine{00393\ \ \ \ \ \ \ \ \ this-\/>apply(b,\ x\_clone.get());}
\DoxyCodeLine{00394\ \ \ \ \ \ \ \ \ x-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector_a298cd5dc53de21cf1c20bbbd2d3d20db}{scale}}(beta);}
\DoxyCodeLine{00395\ \ \ \ \ \ \ \ \ x-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector_acc3e19e9cac497c2192e0529996644a4}{add\_scaled}}(alpha,\ x\_clone.get());}
\DoxyCodeLine{00396\ \ \ \ \ \}}
\DoxyCodeLine{00397\ }
\DoxyCodeLine{00398\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ solver\_apply(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}*\ b,}
\DoxyCodeLine{00399\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<ValueType>}}*\ x,}
\DoxyCodeLine{00400\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ log::detail::log\_data<real\_type>*\ info)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{00401\ \};}
\DoxyCodeLine{00402\ }
\DoxyCodeLine{00403\ }
\DoxyCodeLine{00404\ \}\ \ \textcolor{comment}{//\ namespace\ solver}}
\DoxyCodeLine{00405\ \}\ \ \textcolor{comment}{//\ namespace\ batch}}
\DoxyCodeLine{00406\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00407\ }
\DoxyCodeLine{00408\ }
\DoxyCodeLine{00409\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_SOLVER\_BATCH\_SOLVER\_BASE\_HPP\_}}

\end{DoxyCode}
