\doxysection{gko::\+solver::\+Enable\+Preconditionable\texorpdfstring{$<$}{<} Derived\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1solver_1_1EnablePreconditionable}{}\label{classgko_1_1solver_1_1EnablePreconditionable}\index{gko::solver::EnablePreconditionable$<$ DerivedType $>$@{gko::solver::EnablePreconditionable$<$ DerivedType $>$}}


Mixin providing default operation for \doxylink{classgko_1_1Preconditionable}{Preconditionable} with correct value semantics.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+solver/\+solver\+\_\+base.\+hpp$>$}



Inheritance diagram for gko::\+solver::\+Enable\+Preconditionable\texorpdfstring{$<$}{<} Derived\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1solver_1_1EnablePreconditionable__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+solver::\+Enable\+Preconditionable\texorpdfstring{$<$}{<} Derived\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=251pt]{classgko_1_1solver_1_1EnablePreconditionable__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable_ad1f52e213256cd7c50811787dfcf4288}{set\+\_\+preconditioner}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ new\+\_\+precond) override
\begin{DoxyCompactList}\small\item\em Sets the preconditioner operator used by the \doxylink{classgko_1_1Preconditionable}{Preconditionable}. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1solver_1_1EnablePreconditionable_ab89378218874fc1441a4a3d995b01a02}\label{classgko_1_1solver_1_1EnablePreconditionable_ab89378218874fc1441a4a3d995b01a02} 
Enable\+Preconditionable \& {\bfseries operator=} (const Enable\+Preconditionable \&other)
\begin{DoxyCompactList}\small\item\em Creates a shallow copy of the provided preconditioner, clones it onto this executor if executors don\textquotesingle{}t match. \end{DoxyCompactList}\item 
Enable\+Preconditionable \& \doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable_aa677dd092a26e4b33d9a811460f53616}{operator=}} (Enable\+Preconditionable \&\&other)
\begin{DoxyCompactList}\small\item\em Moves the provided preconditioner, clones it onto this executor if executors don\textquotesingle{}t match. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1solver_1_1EnablePreconditionable_a53ed9a635f89650adc5a0223f86d6d9d}\label{classgko_1_1solver_1_1EnablePreconditionable_a53ed9a635f89650adc5a0223f86d6d9d} 
{\bfseries Enable\+Preconditionable} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{namespacegko_1_1preconditioner}{preconditioner}})
\item 
\Hypertarget{classgko_1_1solver_1_1EnablePreconditionable_a97b244d0fe8ea71e58c789542dc24641}\label{classgko_1_1solver_1_1EnablePreconditionable_a97b244d0fe8ea71e58c789542dc24641} 
{\bfseries Enable\+Preconditionable} (const Enable\+Preconditionable \&other)
\begin{DoxyCompactList}\small\item\em Creates a shallow copy of the provided preconditioner. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable_aaa7bb12e91c97393fbe2aca090ed177f}{Enable\+Preconditionable}} (Enable\+Preconditionable \&\&other)
\begin{DoxyCompactList}\small\item\em Moves the provided preconditioner. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1Preconditionable}{gko::\+\+Preconditionable}}}
\begin{DoxyCompactItemize}
\item 
virtual std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1Preconditionable_abde941e32b5fc5007a4afe0f6d3fdfbc}{get\+\_\+preconditioner}} () const
\begin{DoxyCompactList}\small\item\em Returns the preconditioner operator used by the \doxylink{classgko_1_1Preconditionable}{Preconditionable}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Derived\+Type$>$\newline
class gko::\+solver::\+\+Enable\+Preconditionable$<$ Derived\+Type $>$}
Mixin providing default operation for \doxylink{classgko_1_1Preconditionable}{Preconditionable} with correct value semantics. 

It ensures that the preconditioner stored in this class will always have the same executor as the object this mixin is used in, creating a clone on the correct executor if necessary.


\begin{DoxyTemplParams}{Template Parameters}
{\em Derived\+Type} & The type that this Mixin is used in. It must provide get\+\_\+size() and get\+\_\+executor() functions that return correctly initialized values when the \doxylink{classgko_1_1solver_1_1EnablePreconditionable}{Enable\+Preconditionable} constructor is called, i.\+e. the constructor must be provided by a base class added before \doxylink{classgko_1_1solver_1_1EnablePreconditionable}{Enable\+Preconditionable}, since the member initialization order also applying to multiple inheritance. \\
\hline
\end{DoxyTemplParams}


\label{doc-constructors}
\Hypertarget{classgko_1_1solver_1_1EnablePreconditionable_doc-constructors}
\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classgko_1_1solver_1_1EnablePreconditionable_aaa7bb12e91c97393fbe2aca090ed177f}\index{gko::solver::EnablePreconditionable$<$ DerivedType $>$@{gko::solver::EnablePreconditionable$<$ DerivedType $>$}!EnablePreconditionable@{EnablePreconditionable}}
\index{EnablePreconditionable@{EnablePreconditionable}!gko::solver::EnablePreconditionable$<$ DerivedType $>$@{gko::solver::EnablePreconditionable$<$ DerivedType $>$}}
\doxysubsubsection{\texorpdfstring{EnablePreconditionable()}{EnablePreconditionable()}}
{\footnotesize\ttfamily \label{classgko_1_1solver_1_1EnablePreconditionable_aaa7bb12e91c97393fbe2aca090ed177f} 
template$<$typename Derived\+Type$>$ \\
\doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable}{gko::\+solver::\+\+Enable\+Preconditionable}}$<$ Derived\+Type $>$::\+\+Enable\+Preconditionable (\begin{DoxyParamCaption}\item[{Enable\+Preconditionable$<$ Derived\+Type $>$ \&\&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Moves the provided preconditioner. 

The moved-\/from object has a nullptr preconditioner. 

\label{doc-func-members}
\Hypertarget{classgko_1_1solver_1_1EnablePreconditionable_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1solver_1_1EnablePreconditionable_aa677dd092a26e4b33d9a811460f53616}\index{gko::solver::EnablePreconditionable$<$ DerivedType $>$@{gko::solver::EnablePreconditionable$<$ DerivedType $>$}!operator=@{operator=}}
\index{operator=@{operator=}!gko::solver::EnablePreconditionable$<$ DerivedType $>$@{gko::solver::EnablePreconditionable$<$ DerivedType $>$}}
\doxysubsubsection{\texorpdfstring{operator=()}{operator=()}}
{\footnotesize\ttfamily \label{classgko_1_1solver_1_1EnablePreconditionable_aa677dd092a26e4b33d9a811460f53616} 
template$<$typename Derived\+Type$>$ \\
Enable\+Preconditionable \& \doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable}{gko::\+solver::\+\+Enable\+Preconditionable}}$<$ Derived\+Type $>$::\+operator= (\begin{DoxyParamCaption}\item[{Enable\+Preconditionable$<$ Derived\+Type $>$ \&\&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Moves the provided preconditioner, clones it onto this executor if executors don\textquotesingle{}t match. 

The moved-\/from object has a nullptr preconditioner. 

References \doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable_ad1f52e213256cd7c50811787dfcf4288}{set\+\_\+preconditioner()}}.

\Hypertarget{classgko_1_1solver_1_1EnablePreconditionable_ad1f52e213256cd7c50811787dfcf4288}\index{gko::solver::EnablePreconditionable$<$ DerivedType $>$@{gko::solver::EnablePreconditionable$<$ DerivedType $>$}!set\_preconditioner@{set\_preconditioner}}
\index{set\_preconditioner@{set\_preconditioner}!gko::solver::EnablePreconditionable$<$ DerivedType $>$@{gko::solver::EnablePreconditionable$<$ DerivedType $>$}}
\doxysubsubsection{\texorpdfstring{set\_preconditioner()}{set\_preconditioner()}}
{\footnotesize\ttfamily \label{classgko_1_1solver_1_1EnablePreconditionable_ad1f52e213256cd7c50811787dfcf4288} 
template$<$typename Derived\+Type$>$ \\
void \doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable}{gko::\+solver::\+\+Enable\+Preconditionable}}$<$ Derived\+Type $>$::\+set\+\_\+preconditioner (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$}]{new\+\_\+precond}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [override]}, {\ttfamily [virtual]}}



Sets the preconditioner operator used by the \doxylink{classgko_1_1Preconditionable}{Preconditionable}. 


\begin{DoxyParams}{Parameters}
{\em new\+\_\+precond} & the new preconditioner operator used by the \doxylink{classgko_1_1Preconditionable}{Preconditionable} \\
\hline
\end{DoxyParams}


Reimplemented from \doxymbox{\hyperlink{classgko_1_1Preconditionable_a95db3e56eb17efbcde951c5ed144582d}{gko::\+\+Preconditionable}}.



References \doxymbox{\hyperlink{namespacegko_aa194e34282452493231ca7b01ffb5e64}{gko::\+clone()}}, and \doxymbox{\hyperlink{classgko_1_1Preconditionable_a95db3e56eb17efbcde951c5ed144582d}{gko::\+\+Preconditionable::\+set\+\_\+preconditioner()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable_ab89378218874fc1441a4a3d995b01a02}{operator=()}}, and \doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable_aa677dd092a26e4b33d9a811460f53616}{operator=()}}.



The documentation for this class was generated from the following file:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+solver/\+solver\+\_\+base.\+hpp\end{DoxyCompactItemize}
