\doxysection{gko::\+Reference\+Executor Class Reference}
\hypertarget{classgko_1_1ReferenceExecutor}{}\label{classgko_1_1ReferenceExecutor}\index{gko::ReferenceExecutor@{gko::ReferenceExecutor}}


This is a specialization of the \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor}, which runs the reference implementations of the kernels used for debugging purposes.  




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



Inheritance diagram for gko::\+Reference\+Executor:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1ReferenceExecutor__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+Reference\+Executor:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1ReferenceExecutor__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\doxymbox{\hyperlink{classgko_1_1scoped__device__id__guard}{scoped\+\_\+device\+\_\+id\+\_\+guard}} \doxymbox{\hyperlink{classgko_1_1ReferenceExecutor_a16395e2e87d019be3d11f4415831cce5}{get\+\_\+scoped\+\_\+device\+\_\+id\+\_\+guard}} () const override
\item 
std::\+string \doxymbox{\hyperlink{classgko_1_1ReferenceExecutor_a84e5353b33e9d648476aed0e76999358}{get\+\_\+description}} () const override
\item 
void \doxymbox{\hyperlink{classgko_1_1ReferenceExecutor_a82b41b42dbd26e8ac5b0146de79e5d34}{run}} (const \doxymbox{\hyperlink{classgko_1_1Operation}{Operation}} \&op) const override
\begin{DoxyCompactList}\small\item\em Runs the specified \doxylink{classgko_1_1Operation}{Operation} using this \doxylink{classgko_1_1Executor}{Executor}. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Closure\+Omp, typename Closure\+Cuda, typename Closure\+Hip, typename Closure\+Dpcpp$>$ }\\void \doxymbox{\hyperlink{classgko_1_1ReferenceExecutor_a294787f033b02fd013af087d02a4ae1b}{run}} (const Closure\+Omp \&op\+\_\+omp, const Closure\+Cuda \&op\+\_\+cuda, const Closure\+Hip \&op\+\_\+hip, const Closure\+Dpcpp \&op\+\_\+dpcpp) const
\begin{DoxyCompactList}\small\item\em Runs one of the passed in functors, depending on the \doxylink{classgko_1_1Executor}{Executor} type. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Closure\+Reference, typename Closure\+Omp, typename Closure\+Cuda, typename Closure\+Hip, typename Closure\+Dpcpp$>$ }\\void \doxymbox{\hyperlink{classgko_1_1ReferenceExecutor_abe906f109824da54447e504ff88aa97f}{run}} (std::\+string name, const Closure\+Reference \&op\+\_\+ref, const Closure\+Omp \&op\+\_\+omp, const Closure\+Cuda \&op\+\_\+cuda, const Closure\+Hip \&op\+\_\+hip, const Closure\+Dpcpp \&op\+\_\+dpcpp) const
\begin{DoxyCompactList}\small\item\em Runs one of the passed in functors, depending on the \doxylink{classgko_1_1Executor}{Executor} type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1OmpExecutor}{gko::\+\+Omp\+Executor}}}
\begin{DoxyCompactItemize}
\item 
std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ \doxymbox{\hyperlink{classgko_1_1OmpExecutor_a9db279007ed52b4e116c918e370f6474}{get\+\_\+master}} () noexcept override
\begin{DoxyCompactList}\small\item\em Returns the master \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor} of this \doxylink{classgko_1_1Executor}{Executor}. \end{DoxyCompactList}\item 
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ \doxymbox{\hyperlink{classgko_1_1OmpExecutor_a3b8664fadbd3799fdc44b85056ef94b1}{get\+\_\+master}} () const noexcept override
\begin{DoxyCompactList}\small\item\em Returns the master \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor} of this \doxylink{classgko_1_1Executor}{Executor}.    \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1OmpExecutor_ad4e421dcc3d1e5c7e396167a122e57ae}{synchronize}} () const override
\begin{DoxyCompactList}\small\item\em Synchronize the operations launched on the executor with its master. \end{DoxyCompactList}\item 
int {\bfseries get\+\_\+num\+\_\+cores} () const
\item 
int {\bfseries get\+\_\+num\+\_\+threads\+\_\+per\+\_\+core} () const
\item 
{\footnotesize template$<$typename Closure\+Omp, typename Closure\+Cuda, typename Closure\+Hip, typename Closure\+Dpcpp$>$ }\\void \doxymbox{\hyperlink{classgko_1_1OmpExecutor_a294787f033b02fd013af087d02a4ae1b}{run}} (const Closure\+Omp \&op\+\_\+omp, const Closure\+Cuda \&op\+\_\+cuda, const Closure\+Hip \&op\+\_\+hip, const Closure\+Dpcpp \&op\+\_\+dpcpp) const
\begin{DoxyCompactList}\small\item\em Runs one of the passed in functors, depending on the \doxylink{classgko_1_1Executor}{Executor} type. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Closure\+Reference, typename Closure\+Omp, typename Closure\+Cuda, typename Closure\+Hip, typename Closure\+Dpcpp$>$ }\\void \doxymbox{\hyperlink{classgko_1_1OmpExecutor_abe906f109824da54447e504ff88aa97f}{run}} (std::\+string name, const Closure\+Reference \&op\+\_\+ref, const Closure\+Omp \&op\+\_\+omp, const Closure\+Cuda \&op\+\_\+cuda, const Closure\+Hip \&op\+\_\+hip, const Closure\+Dpcpp \&op\+\_\+dpcpp) const
\begin{DoxyCompactList}\small\item\em Runs one of the passed in functors, depending on the \doxylink{classgko_1_1Executor}{Executor} type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1ReferenceExecutor_a8d1589ec28d78a8376d332e20a9a5ba3}\label{classgko_1_1ReferenceExecutor_a8d1589ec28d78a8376d332e20a9a5ba3} 
static std::\+shared\+\_\+ptr$<$ Reference\+Executor $>$ {\bfseries create} (std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1CpuAllocatorBase}{Cpu\+Allocator\+Base}} $>$ \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}}=std::\+make\+\_\+shared$<$ \doxymbox{\hyperlink{classgko_1_1CpuAllocator}{Cpu\+Allocator}} $>$())
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1OmpExecutor}{gko::\+\+Omp\+Executor}}}
\begin{DoxyCompactItemize}
\item 
static std::\+shared\+\_\+ptr$<$ Omp\+Executor $>$ {\bfseries create} (std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1CpuAllocatorBase}{Cpu\+Allocator\+Base}} $>$ \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}}=std::\+make\+\_\+shared$<$ \doxymbox{\hyperlink{classgko_1_1CpuAllocator}{Cpu\+Allocator}} $>$())
\begin{DoxyCompactList}\small\item\em Creates a new \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor}. \end{DoxyCompactList}\item 
static int {\bfseries get\+\_\+num\+\_\+omp\+\_\+threads} ()
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This is a specialization of the \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor}, which runs the reference implementations of the kernels used for debugging purposes. 

\label{doc-func-members}
\Hypertarget{classgko_1_1ReferenceExecutor_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1ReferenceExecutor_a84e5353b33e9d648476aed0e76999358}\index{gko::ReferenceExecutor@{gko::ReferenceExecutor}!get\_description@{get\_description}}
\index{get\_description@{get\_description}!gko::ReferenceExecutor@{gko::ReferenceExecutor}}
\doxysubsubsection{\texorpdfstring{get\_description()}{get\_description()}}
{\footnotesize\ttfamily \label{classgko_1_1ReferenceExecutor_a84e5353b33e9d648476aed0e76999358} 
std::\+string gko::\+\+Reference\+Executor::\+get\+\_\+description (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [override]}, {\ttfamily [virtual]}}

\begin{DoxyReturn}{Returns}
a textual representation of the executor and its device. 
\end{DoxyReturn}


Reimplemented from \doxymbox{\hyperlink{classgko_1_1OmpExecutor_a157fbc623333a1658f8a3915e7b2da2d}{gko::\+\+Omp\+Executor}}.

\Hypertarget{classgko_1_1ReferenceExecutor_a16395e2e87d019be3d11f4415831cce5}\index{gko::ReferenceExecutor@{gko::ReferenceExecutor}!get\_scoped\_device\_id\_guard@{get\_scoped\_device\_id\_guard}}
\index{get\_scoped\_device\_id\_guard@{get\_scoped\_device\_id\_guard}!gko::ReferenceExecutor@{gko::ReferenceExecutor}}
\doxysubsubsection{\texorpdfstring{get\_scoped\_device\_id\_guard()}{get\_scoped\_device\_id\_guard()}}
{\footnotesize\ttfamily \label{classgko_1_1ReferenceExecutor_a16395e2e87d019be3d11f4415831cce5} 
\doxymbox{\hyperlink{classgko_1_1scoped__device__id__guard}{scoped\+\_\+device\+\_\+id\+\_\+guard}} gko::\+\+Reference\+Executor::\+get\+\_\+scoped\+\_\+device\+\_\+id\+\_\+guard (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [override]}, {\ttfamily [virtual]}}



Reimplemented from \doxymbox{\hyperlink{classgko_1_1OmpExecutor}{gko::\+\+Omp\+Executor}}.

\Hypertarget{classgko_1_1ReferenceExecutor_a294787f033b02fd013af087d02a4ae1b}\index{gko::ReferenceExecutor@{gko::ReferenceExecutor}!run@{run}}
\index{run@{run}!gko::ReferenceExecutor@{gko::ReferenceExecutor}}
\doxysubsubsection{\texorpdfstring{run()}{run()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \label{classgko_1_1ReferenceExecutor_a294787f033b02fd013af087d02a4ae1b} 
template$<$typename Closure\+Omp, typename Closure\+Cuda, typename Closure\+Hip, typename Closure\+Dpcpp$>$ \\
void \doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{gko::\+\+Executor::\+run}} (\begin{DoxyParamCaption}\item[{const Closure\+Omp \&}]{op\+\_\+omp}{, }\item[{const Closure\+Cuda \&}]{op\+\_\+cuda}{, }\item[{const Closure\+Hip \&}]{op\+\_\+hip}{, }\item[{const Closure\+Dpcpp \&}]{op\+\_\+dpcpp}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Runs one of the passed in functors, depending on the \doxylink{classgko_1_1Executor}{Executor} type. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Closure\+Omp} & type of op\+\_\+omp \\
\hline
{\em Closure\+Cuda} & type of op\+\_\+cuda \\
\hline
{\em Closure\+Hip} & type of op\+\_\+hip \\
\hline
{\em Closure\+Dpcpp} & type of op\+\_\+dpcpp\\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em op\+\_\+omp} & functor to run in case of a \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor} or \doxylink{classgko_1_1ReferenceExecutor}{Reference\+Executor} \\
\hline
{\em op\+\_\+cuda} & functor to run in case of a \doxylink{classgko_1_1CudaExecutor}{Cuda\+Executor} \\
\hline
{\em op\+\_\+hip} & functor to run in case of a \doxylink{classgko_1_1HipExecutor}{Hip\+Executor} \\
\hline
{\em op\+\_\+dpcpp} & functor to run in case of a \doxylink{classgko_1_1DpcppExecutor}{Dpcpp\+Executor} \\
\hline
\end{DoxyParams}
\Hypertarget{classgko_1_1ReferenceExecutor_a82b41b42dbd26e8ac5b0146de79e5d34}\index{gko::ReferenceExecutor@{gko::ReferenceExecutor}!run@{run}}
\index{run@{run}!gko::ReferenceExecutor@{gko::ReferenceExecutor}}
\doxysubsubsection{\texorpdfstring{run()}{run()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \label{classgko_1_1ReferenceExecutor_a82b41b42dbd26e8ac5b0146de79e5d34} 
void gko::\+\+Reference\+Executor::\+run (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1Operation}{Operation}} \&}]{op}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [override]}, {\ttfamily [virtual]}}



Runs the specified \doxylink{classgko_1_1Operation}{Operation} using this \doxylink{classgko_1_1Executor}{Executor}. 


\begin{DoxyParams}{Parameters}
{\em op} & the operation to run \\
\hline
\end{DoxyParams}


Reimplemented from \doxymbox{\hyperlink{classgko_1_1OmpExecutor_a4fdbf8100b039d3858634bf9c502f5d7}{gko::\+\+Omp\+Executor}}.

\Hypertarget{classgko_1_1ReferenceExecutor_abe906f109824da54447e504ff88aa97f}\index{gko::ReferenceExecutor@{gko::ReferenceExecutor}!run@{run}}
\index{run@{run}!gko::ReferenceExecutor@{gko::ReferenceExecutor}}
\doxysubsubsection{\texorpdfstring{run()}{run()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \label{classgko_1_1ReferenceExecutor_abe906f109824da54447e504ff88aa97f} 
template$<$typename Closure\+Reference, typename Closure\+Omp, typename Closure\+Cuda, typename Closure\+Hip, typename Closure\+Dpcpp$>$ \\
void \doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{gko::\+\+Executor::\+run}} (\begin{DoxyParamCaption}\item[{std::\+string}]{name}{, }\item[{const Closure\+Reference \&}]{op\+\_\+ref}{, }\item[{const Closure\+Omp \&}]{op\+\_\+omp}{, }\item[{const Closure\+Cuda \&}]{op\+\_\+cuda}{, }\item[{const Closure\+Hip \&}]{op\+\_\+hip}{, }\item[{const Closure\+Dpcpp \&}]{op\+\_\+dpcpp}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Runs one of the passed in functors, depending on the \doxylink{classgko_1_1Executor}{Executor} type. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Closure\+Reference} & type of op\+\_\+ref \\
\hline
{\em Closure\+Omp} & type of op\+\_\+omp \\
\hline
{\em Closure\+Cuda} & type of op\+\_\+cuda \\
\hline
{\em Closure\+Hip} & type of op\+\_\+hip \\
\hline
{\em Closure\+Dpcpp} & type of op\+\_\+dpcpp\\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em name} & the name of the operation \\
\hline
{\em op\+\_\+ref} & functor to run in case of a \doxylink{classgko_1_1ReferenceExecutor}{Reference\+Executor} \\
\hline
{\em op\+\_\+omp} & functor to run in case of a \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor} \\
\hline
{\em op\+\_\+cuda} & functor to run in case of a \doxylink{classgko_1_1CudaExecutor}{Cuda\+Executor} \\
\hline
{\em op\+\_\+hip} & functor to run in case of a \doxylink{classgko_1_1HipExecutor}{Hip\+Executor} \\
\hline
{\em op\+\_\+dpcpp} & functor to run in case of a \doxylink{classgko_1_1DpcppExecutor}{Dpcpp\+Executor} \\
\hline
\end{DoxyParams}


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