\doxysection{gko::\+Polymorphic\+Object Class Reference}
\hypertarget{classgko_1_1PolymorphicObject}{}\label{classgko_1_1PolymorphicObject}\index{gko::PolymorphicObject@{gko::PolymorphicObject}}


A \doxylink{classgko_1_1PolymorphicObject}{Polymorphic\+Object} is the abstract base for all "{}heavy"{} objects in Ginkgo that behave polymorphically.  




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



Inheritance diagram for gko::\+Polymorphic\+Object:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=316pt]{classgko_1_1PolymorphicObject__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+Polymorphic\+Object:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=316pt]{classgko_1_1PolymorphicObject__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1PolymorphicObject_acc3772c9e1a9bf2cc0bec109f2829360}\label{classgko_1_1PolymorphicObject_acc3772c9e1a9bf2cc0bec109f2829360} 
Polymorphic\+Object \& {\bfseries operator=} (const Polymorphic\+Object \&)
\item 
std::\+unique\+\_\+ptr$<$ Polymorphic\+Object $>$ \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_ab6860a65c4c0e53ad2ffc56487cfb78b}{create\+\_\+default}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec) const
\begin{DoxyCompactList}\small\item\em Creates a new "{}default"{} object of the same dynamic type as this object. \end{DoxyCompactList}\item 
std::\+unique\+\_\+ptr$<$ Polymorphic\+Object $>$ \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a79a7e8ec664d4651df9125ce4653607b}{create\+\_\+default}} () const
\begin{DoxyCompactList}\small\item\em Creates a new "{}default"{} object of the same dynamic type as this object. \end{DoxyCompactList}\item 
std::\+unique\+\_\+ptr$<$ Polymorphic\+Object $>$ \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_ad633faaf91de363fc2ba2c1a0e8d07ad}{clone}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec) const
\begin{DoxyCompactList}\small\item\em Creates a clone of the object. \end{DoxyCompactList}\item 
std::\+unique\+\_\+ptr$<$ Polymorphic\+Object $>$ \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a892adf1d9fbc1e7c2e49a9be4d98de2c}{clone}} () const
\begin{DoxyCompactList}\small\item\em Creates a clone of the object. \end{DoxyCompactList}\item 
Polymorphic\+Object \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a3c431a34c3ad724e1337b73165f1da9b}{copy\+\_\+from}} (const Polymorphic\+Object \texorpdfstring{$\ast$}{*}other)
\begin{DoxyCompactList}\small\item\em Copies another object into this object. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Derived, typename Deleter$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ std::\+is\+\_\+base\+\_\+of$<$ Polymorphic\+Object, std::\+decay\+\_\+t$<$ Derived $>$ $>$::\+value, Polymorphic\+Object $>$ \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a525d7201e1c89a41e464b6562a5b8e23}{copy\+\_\+from}} (std::\+unique\+\_\+ptr$<$ Derived, Deleter $>$ \&\&other)
\begin{DoxyCompactList}\small\item\em Moves another object into this object. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Derived, typename Deleter$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ std::\+is\+\_\+base\+\_\+of$<$ Polymorphic\+Object, std::\+decay\+\_\+t$<$ Derived $>$ $>$::\+value, Polymorphic\+Object $>$ \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a5b3794e4e3e1a339e095436ac1c60fc8}{copy\+\_\+from}} (const std::\+unique\+\_\+ptr$<$ Derived, Deleter $>$ \&other)
\begin{DoxyCompactList}\small\item\em Copies another object into this object.    \end{DoxyCompactList}\item 
Polymorphic\+Object \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a49e1da638e13d055f105128f7040c1c7}{copy\+\_\+from}} (const std::\+shared\+\_\+ptr$<$ const Polymorphic\+Object $>$ \&other)
\begin{DoxyCompactList}\small\item\em Copies another object into this object.    \end{DoxyCompactList}\item 
Polymorphic\+Object \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a6729df9a3d3ed70ec5565568f03847de}{move\+\_\+from}} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ Polymorphic\+Object $>$ other)
\begin{DoxyCompactList}\small\item\em Moves another object into this object. \end{DoxyCompactList}\item 
Polymorphic\+Object \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_ad718977a6d5cf565a286f0247410cb11}{clear}} ()
\begin{DoxyCompactList}\small\item\em Transforms the object into its default state. \end{DoxyCompactList}\item 
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a89f50e50860bb1ab04b1615b2447ad38}{get\+\_\+executor}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns the \doxylink{classgko_1_1Executor}{Executor} of the object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1log_1_1EnableLogging}{gko::\+log::\+\+Enable\+Logging$<$ Polymorphic\+Object $>$}}}
\begin{DoxyCompactItemize}
\item 
void \doxymbox{\hyperlink{classgko_1_1log_1_1EnableLogging_a7b3493c14a37b4d46487d9c636d784f2}{add\+\_\+logger}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1log_1_1Logger}{Logger}} $>$ logger) override
\begin{DoxyCompactList}\small\item\em Adds a new logger to the list of subscribed loggers. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1log_1_1EnableLogging_aba5317f8a03956a61d770e9b07fc65cc}{remove\+\_\+logger}} (const \doxymbox{\hyperlink{classgko_1_1log_1_1Logger}{Logger}} \texorpdfstring{$\ast$}{*}logger) override
\begin{DoxyCompactList}\small\item\em Removes a logger from the list of subscribed loggers. \end{DoxyCompactList}\item 
const std::\+vector$<$ std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1log_1_1Logger}{Logger}} $>$ $>$ \& \doxymbox{\hyperlink{classgko_1_1log_1_1EnableLogging_a5e1fc384c289926c16b7f2236ec8c0ec}{get\+\_\+loggers}} () const override
\begin{DoxyCompactList}\small\item\em Returns the vector containing all loggers registered at this object. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1log_1_1EnableLogging_a46d9630d014e4bb094b9e4f7b7bdc5ee}{clear\+\_\+loggers}} () override
\begin{DoxyCompactList}\small\item\em Remove all loggers registered at this object. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1log_1_1Loggable}{gko::\+log::\+\+Loggable}}}
\begin{DoxyCompactItemize}
\item 
void {\bfseries remove\+\_\+logger} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1log_1_1Logger}{Logger}} $>$ logger)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A \doxylink{classgko_1_1PolymorphicObject}{Polymorphic\+Object} is the abstract base for all "{}heavy"{} objects in Ginkgo that behave polymorphically. 

It defines the basic utilities (copying moving, cloning, clearing the objects) for all such objects. It takes into account that these objects are dynamically allocated, managed by smart pointers, and used polymorphically. Additionally, it assumes their data can be allocated on different executors, and that they can be copied between those executors.

\begin{DoxyNote}{Note}
Most of the public methods of this class should not be overridden directly, and are thus not virtual. Instead, there are equivalent protected methods (ending in $<$method\+\_\+name$>$\+\_\+impl) that should be overridden instead. This allows polymorphic objects to implement default behavior around virtual methods (parameter checking, type casting).
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\doxylink{classgko_1_1EnablePolymorphicObject}{Enable\+Polymorphic\+Object} if you wish to implement a concrete polymorphic object and have sensible defaults generated automatically. Enable\+Abstract\+Polymorphic\+Object if you wish to implement a new abstract polymorphic object, and have the return types of the methods updated to your type (instead of having them return \doxylink{classgko_1_1PolymorphicObject}{Polymorphic\+Object}). 
\end{DoxySeeAlso}


\label{doc-func-members}
\Hypertarget{classgko_1_1PolymorphicObject_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1PolymorphicObject_ad718977a6d5cf565a286f0247410cb11}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!clear@{clear}}
\index{clear@{clear}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{clear()}{clear()}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_ad718977a6d5cf565a286f0247410cb11} 
Polymorphic\+Object \texorpdfstring{$\ast$}{*} gko::\+\+Polymorphic\+Object::\+clear (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Transforms the object into its default state. 

Equivalent to {\ttfamily this-\/\texorpdfstring{$>$}{>}\doxylink{classgko_1_1PolymorphicObject_a3c431a34c3ad724e1337b73165f1da9b}{copy\+\_\+from}(this-\/\texorpdfstring{$>$}{>}\doxylink{classgko_1_1PolymorphicObject_a79a7e8ec664d4651df9125ce4653607b}{create\+\_\+default()})}.

\begin{DoxySeeAlso}{See also}
clear\+\_\+impl() when implementing this method
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
this 
\end{DoxyReturn}
\Hypertarget{classgko_1_1PolymorphicObject_a892adf1d9fbc1e7c2e49a9be4d98de2c}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!clone@{clone}}
\index{clone@{clone}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{clone()}{clone()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_a892adf1d9fbc1e7c2e49a9be4d98de2c} 
std::\+unique\+\_\+ptr$<$ Polymorphic\+Object $>$ gko::\+\+Polymorphic\+Object::\+clone (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Creates a clone of the object. 

This is a shorthand for clone(std::\+shared\+\_\+ptr$<$const Executor$>$) that uses the executor of this object to construct the new object.

\begin{DoxyReturn}{Returns}
A clone of the \doxylink{classgko_1_1LinOp}{Lin\+Op}. 
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a892adf1d9fbc1e7c2e49a9be4d98de2c}{clone()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a892adf1d9fbc1e7c2e49a9be4d98de2c}{clone()}}.

\Hypertarget{classgko_1_1PolymorphicObject_ad633faaf91de363fc2ba2c1a0e8d07ad}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!clone@{clone}}
\index{clone@{clone}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{clone()}{clone()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_ad633faaf91de363fc2ba2c1a0e8d07ad} 
std::\+unique\+\_\+ptr$<$ Polymorphic\+Object $>$ gko::\+\+Polymorphic\+Object::\+clone (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Creates a clone of the object. 

This is the polymorphic equivalent of the {\itshape executor copy constructor} {\ttfamily decltype(\texorpdfstring{$\ast$}{*}this)(exec, this)}.


\begin{DoxyParams}{Parameters}
{\em exec} & the executor where the clone will be created\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A clone of the \doxylink{classgko_1_1LinOp}{Lin\+Op}. 
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a79a7e8ec664d4651df9125ce4653607b}{create\+\_\+default()}}.

\Hypertarget{classgko_1_1PolymorphicObject_a3c431a34c3ad724e1337b73165f1da9b}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!copy\_from@{copy\_from}}
\index{copy\_from@{copy\_from}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{copy\_from()}{copy\_from()}\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_a3c431a34c3ad724e1337b73165f1da9b} 
Polymorphic\+Object \texorpdfstring{$\ast$}{*} gko::\+\+Polymorphic\+Object::\+copy\+\_\+from (\begin{DoxyParamCaption}\item[{const Polymorphic\+Object \texorpdfstring{$\ast$}{*}}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Copies another object into this object. 

This is the polymorphic equivalent of the copy assignment operator.

\begin{DoxySeeAlso}{See also}
copy\+\_\+from\+\_\+impl(const Polymorphic\+Object \texorpdfstring{$\ast$}{*})
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em other} & the object to copy\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
this 
\end{DoxyReturn}


Referenced by \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a49e1da638e13d055f105128f7040c1c7}{copy\+\_\+from()}}, \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a5b3794e4e3e1a339e095436ac1c60fc8}{copy\+\_\+from()}}, and \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a525d7201e1c89a41e464b6562a5b8e23}{copy\+\_\+from()}}.

\Hypertarget{classgko_1_1PolymorphicObject_a49e1da638e13d055f105128f7040c1c7}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!copy\_from@{copy\_from}}
\index{copy\_from@{copy\_from}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{copy\_from()}{copy\_from()}\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_a49e1da638e13d055f105128f7040c1c7} 
Polymorphic\+Object \texorpdfstring{$\ast$}{*} gko::\+\+Polymorphic\+Object::\+copy\+\_\+from (\begin{DoxyParamCaption}\item[{const std::\+shared\+\_\+ptr$<$ const Polymorphic\+Object $>$ \&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Copies another object into this object.    

This is the polymorphic equivalent of the copy assignment operator.

\begin{DoxySeeAlso}{See also}
copy\+\_\+from\+\_\+impl(const Polymorphic\+Object \texorpdfstring{$\ast$}{*})
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em other} & the object to copy\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
this    
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a3c431a34c3ad724e1337b73165f1da9b}{copy\+\_\+from()}}.

\Hypertarget{classgko_1_1PolymorphicObject_a5b3794e4e3e1a339e095436ac1c60fc8}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!copy\_from@{copy\_from}}
\index{copy\_from@{copy\_from}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{copy\_from()}{copy\_from()}\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_a5b3794e4e3e1a339e095436ac1c60fc8} 
template$<$typename Derived, typename Deleter$>$ \\
std::\+enable\+\_\+if\+\_\+t$<$ std::\+is\+\_\+base\+\_\+of$<$ Polymorphic\+Object, std::\+decay\+\_\+t$<$ Derived $>$ $>$::\+value, Polymorphic\+Object $>$ \texorpdfstring{$\ast$}{*} gko::\+\+Polymorphic\+Object::\+copy\+\_\+from (\begin{DoxyParamCaption}\item[{const std::\+unique\+\_\+ptr$<$ Derived, Deleter $>$ \&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Copies another object into this object.    

This is the polymorphic equivalent of the copy assignment operator.

\begin{DoxySeeAlso}{See also}
copy\+\_\+from\+\_\+impl(const Polymorphic\+Object \texorpdfstring{$\ast$}{*})
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em other} & the object to copy\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
this   
\end{DoxyReturn}

\begin{DoxyTemplParams}{Template Parameters}
{\em Derived} & the actual pointee type of the parameter, it needs to be derived from \doxylink{classgko_1_1PolymorphicObject}{Polymorphic\+Object}. \\
\hline
{\em Deleter} & the deleter of the unique\+\_\+ptr parameter \\
\hline
\end{DoxyTemplParams}


References \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a3c431a34c3ad724e1337b73165f1da9b}{copy\+\_\+from()}}.

\Hypertarget{classgko_1_1PolymorphicObject_a525d7201e1c89a41e464b6562a5b8e23}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!copy\_from@{copy\_from}}
\index{copy\_from@{copy\_from}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{copy\_from()}{copy\_from()}\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_a525d7201e1c89a41e464b6562a5b8e23} 
template$<$typename Derived, typename Deleter$>$ \\
std::\+enable\+\_\+if\+\_\+t$<$ std::\+is\+\_\+base\+\_\+of$<$ Polymorphic\+Object, std::\+decay\+\_\+t$<$ Derived $>$ $>$::\+value, Polymorphic\+Object $>$ \texorpdfstring{$\ast$}{*} gko::\+\+Polymorphic\+Object::\+copy\+\_\+from (\begin{DoxyParamCaption}\item[{std::\+unique\+\_\+ptr$<$ Derived, Deleter $>$ \&\&}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Moves another object into this object. 

This is the polymorphic equivalent of the move assignment operator.

\begin{DoxySeeAlso}{See also}
copy\+\_\+from\+\_\+impl(std::\+unique\+\_\+ptr$<$\+Polymorphic\+Object$>$)
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em other} & the object to move from\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
this
\end{DoxyReturn}

\begin{DoxyTemplParams}{Template Parameters}
{\em Derived} & the actual pointee type of the parameter, it needs to be derived from \doxylink{classgko_1_1PolymorphicObject}{Polymorphic\+Object}. \\
\hline
{\em Deleter} & the deleter of the unique\+\_\+ptr parameter \\
\hline
\end{DoxyTemplParams}


References \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a3c431a34c3ad724e1337b73165f1da9b}{copy\+\_\+from()}}.

\Hypertarget{classgko_1_1PolymorphicObject_a79a7e8ec664d4651df9125ce4653607b}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!create\_default@{create\_default}}
\index{create\_default@{create\_default}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{create\_default()}{create\_default()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_a79a7e8ec664d4651df9125ce4653607b} 
std::\+unique\+\_\+ptr$<$ Polymorphic\+Object $>$ gko::\+\+Polymorphic\+Object::\+create\+\_\+default (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Creates a new "{}default"{} object of the same dynamic type as this object. 

This is a shorthand for create\+\_\+default(std::\+shared\+\_\+ptr$<$const Executor$>$) that uses the executor of this object to construct the new object.

\begin{DoxyReturn}{Returns}
a polymorphic object of the same type as this 
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a79a7e8ec664d4651df9125ce4653607b}{create\+\_\+default()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_ad633faaf91de363fc2ba2c1a0e8d07ad}{clone()}}, and \doxymbox{\hyperlink{classgko_1_1PolymorphicObject_a79a7e8ec664d4651df9125ce4653607b}{create\+\_\+default()}}.

\Hypertarget{classgko_1_1PolymorphicObject_ab6860a65c4c0e53ad2ffc56487cfb78b}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!create\_default@{create\_default}}
\index{create\_default@{create\_default}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{create\_default()}{create\_default()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_ab6860a65c4c0e53ad2ffc56487cfb78b} 
std::\+unique\+\_\+ptr$<$ Polymorphic\+Object $>$ gko::\+\+Polymorphic\+Object::\+create\+\_\+default (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Creates a new "{}default"{} object of the same dynamic type as this object. 

This is the polymorphic equivalent of the {\itshape executor default constructor} {\ttfamily decltype(\texorpdfstring{$\ast$}{*}this)(exec);}.


\begin{DoxyParams}{Parameters}
{\em exec} & the executor where the object will be created\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a polymorphic object of the same type as this 
\end{DoxyReturn}
\Hypertarget{classgko_1_1PolymorphicObject_a89f50e50860bb1ab04b1615b2447ad38}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!get\_executor@{get\_executor}}
\index{get\_executor@{get\_executor}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{get\_executor()}{get\_executor()}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_a89f50e50860bb1ab04b1615b2447ad38} 
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ gko::\+\+Polymorphic\+Object::\+get\+\_\+executor (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns the \doxylink{classgko_1_1Executor}{Executor} of the object. 

\begin{DoxyReturn}{Returns}
\doxylink{classgko_1_1Executor}{Executor} of the object 
\end{DoxyReturn}
\Hypertarget{classgko_1_1PolymorphicObject_a6729df9a3d3ed70ec5565568f03847de}\index{gko::PolymorphicObject@{gko::PolymorphicObject}!move\_from@{move\_from}}
\index{move\_from@{move\_from}!gko::PolymorphicObject@{gko::PolymorphicObject}}
\doxysubsubsection{\texorpdfstring{move\_from()}{move\_from()}}
{\footnotesize\ttfamily \label{classgko_1_1PolymorphicObject_a6729df9a3d3ed70ec5565568f03847de} 
Polymorphic\+Object \texorpdfstring{$\ast$}{*} gko::\+\+Polymorphic\+Object::\+move\+\_\+from (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ Polymorphic\+Object $>$}]{other}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Moves another object into this object. 

This is the polymorphic equivalent of the move assignment operator.

\begin{DoxySeeAlso}{See also}
move\+\_\+from\+\_\+impl(\+Polymorphic\+Object \texorpdfstring{$\ast$}{*})
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em other} & the object to move from\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
this 
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{gko::\+ptr\+\_\+param$<$ T $>$::\+get()}}.



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