\doxysection{gko::\+Cuda\+Executor Class Reference}
\hypertarget{classgko_1_1CudaExecutor}{}\label{classgko_1_1CudaExecutor}\index{gko::CudaExecutor@{gko::CudaExecutor}}


This is the \doxylink{classgko_1_1Executor}{Executor} subclass which represents the CUDA device.  




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



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


Collaboration diagram for gko::\+Cuda\+Executor:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1CudaExecutor__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a6466705137b8ac3974734837c7730d74}{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_1CudaExecutor_a8999e5a4598d224fadc6c0047ed6ca17}{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_1CudaExecutor_a903cf7e3460b14677c0bce5ca08a1b81}{synchronize}} () const override
\begin{DoxyCompactList}\small\item\em Synchronize the operations launched on the executor with its master. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{classgko_1_1scoped__device__id__guard}{scoped\+\_\+device\+\_\+id\+\_\+guard}} \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a4a5c086f447233fd8756d7fea639b8ff}{get\+\_\+scoped\+\_\+device\+\_\+id\+\_\+guard}} () const override
\item 
std::\+string \doxymbox{\hyperlink{classgko_1_1CudaExecutor_ac429a47e4fab2f11df0dd09fc9652a19}{get\+\_\+description}} () const override
\item 
\Hypertarget{classgko_1_1CudaExecutor_a7cfa915eadd2329eb897dc1ee2712488}\label{classgko_1_1CudaExecutor_a7cfa915eadd2329eb897dc1ee2712488} 
int {\bfseries get\+\_\+device\+\_\+id} () const noexcept
\begin{DoxyCompactList}\small\item\em Get the CUDA device id of the device associated to this executor. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1CudaExecutor_a245c1c35a18e6534d87ef6e9cad24f7c}\label{classgko_1_1CudaExecutor_a245c1c35a18e6534d87ef6e9cad24f7c} 
int {\bfseries get\+\_\+num\+\_\+warps\+\_\+per\+\_\+sm} () const noexcept
\begin{DoxyCompactList}\small\item\em Get the number of warps per SM of this executor. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1CudaExecutor_a449c2bf9c51b58a04fdb8b4a73377820}\label{classgko_1_1CudaExecutor_a449c2bf9c51b58a04fdb8b4a73377820} 
int {\bfseries get\+\_\+num\+\_\+multiprocessor} () const noexcept
\begin{DoxyCompactList}\small\item\em Get the number of multiprocessor of this executor. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1CudaExecutor_aa9d77db0b87322a8bef12380029b5310}\label{classgko_1_1CudaExecutor_aa9d77db0b87322a8bef12380029b5310} 
int {\bfseries get\+\_\+num\+\_\+warps} () const noexcept
\begin{DoxyCompactList}\small\item\em Get the number of warps of this executor. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1CudaExecutor_a6a3894e9f4d98b5f7523e067c88ef521}\label{classgko_1_1CudaExecutor_a6a3894e9f4d98b5f7523e067c88ef521} 
int {\bfseries get\+\_\+warp\+\_\+size} () const noexcept
\begin{DoxyCompactList}\small\item\em Get the warp size of this executor. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1CudaExecutor_a3868f53f82b6398acb1ba1f9647a6e46}\label{classgko_1_1CudaExecutor_a3868f53f82b6398acb1ba1f9647a6e46} 
int {\bfseries get\+\_\+major\+\_\+version} () const noexcept
\begin{DoxyCompactList}\small\item\em Get the major version of compute capability. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1CudaExecutor_aa7d7a5cd7aeb38b8ab8fe3e4d1538481}\label{classgko_1_1CudaExecutor_aa7d7a5cd7aeb38b8ab8fe3e4d1538481} 
int {\bfseries get\+\_\+minor\+\_\+version} () const noexcept
\begin{DoxyCompactList}\small\item\em Get the minor version of compute capability. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1CudaExecutor_a0e4dc9ea3719ebd8fe9e393629bf6c7c}\label{classgko_1_1CudaExecutor_a0e4dc9ea3719ebd8fe9e393629bf6c7c} 
int {\bfseries get\+\_\+compute\+\_\+capability} () const noexcept
\begin{DoxyCompactList}\small\item\em Get the compute capability. \end{DoxyCompactList}\item 
cublas\+Context \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1CudaExecutor_aae42e3ae7e95c21092afdc198adacc8a}{get\+\_\+cublas\+\_\+handle}} () const
\begin{DoxyCompactList}\small\item\em Get the cublas handle for this executor. \end{DoxyCompactList}\item 
cublas\+Context \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a1251802b1fa34107d00927e8bd3bd9a2}{get\+\_\+blas\+\_\+handle}} () const
\begin{DoxyCompactList}\small\item\em Get the cublas handle for this executor.    \end{DoxyCompactList}\item 
cusparse\+Context \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a7abd86b1590597a0f6a097585a446006}{get\+\_\+cusparse\+\_\+handle}} () const
\begin{DoxyCompactList}\small\item\em Get the cusparse handle for this executor. \end{DoxyCompactList}\item 
cusparse\+Context \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a0d41c86eba6b19b906bf3044c8f5bec2}{get\+\_\+sparselib\+\_\+handle}} () const
\begin{DoxyCompactList}\small\item\em Get the cusparse handle for this executor.    \end{DoxyCompactList}\item 
std::\+vector$<$ int $>$ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a14c70ca95b76c22ec3c5857e04cfea8e}{get\+\_\+closest\+\_\+pus}} () const
\begin{DoxyCompactList}\small\item\em Get the closest PUs. \end{DoxyCompactList}\item 
int \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a23a13ee1b82ea850660da25376d6cf4e}{get\+\_\+closest\+\_\+numa}} () const
\begin{DoxyCompactList}\small\item\em Get the closest NUMA node. \end{DoxyCompactList}\item 
CUstream\+\_\+st \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a935159e4376a4cd01408af020d0fc627}{get\+\_\+stream}} () const
\begin{DoxyCompactList}\small\item\em Returns the CUDA stream used by this executor. \end{DoxyCompactList}\item 
virtual void \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a4fdbf8100b039d3858634bf9c502f5d7}{run}} (const \doxymbox{\hyperlink{classgko_1_1Operation}{Operation}} \&op) const=0
\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_1CudaExecutor_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_1CudaExecutor_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 
static std::\+shared\+\_\+ptr$<$ Cuda\+Executor $>$ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a075a1957241de65c0cad59f9534430a2}{create}} (int device\+\_\+id, std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ master, bool device\+\_\+reset, \doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\+\_\+mode}} alloc\+\_\+mode=default\+\_\+cuda\+\_\+alloc\+\_\+mode, CUstream\+\_\+st \texorpdfstring{$\ast$}{*}stream=nullptr)
\begin{DoxyCompactList}\small\item\em Creates a new \doxylink{classgko_1_1CudaExecutor}{Cuda\+Executor}. \end{DoxyCompactList}\item 
static std::\+shared\+\_\+ptr$<$ Cuda\+Executor $>$ \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a3d456d0aa03be5ca3bef03c4afad4b68}{create}} (int device\+\_\+id, std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ master, std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1CudaAllocatorBase}{Cuda\+Allocator\+Base}} $>$ \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}}=std::\+make\+\_\+shared$<$ \doxymbox{\hyperlink{classgko_1_1CudaAllocator}{Cuda\+Allocator}} $>$(), CUstream\+\_\+st \texorpdfstring{$\ast$}{*}stream=nullptr)
\begin{DoxyCompactList}\small\item\em Creates a new \doxylink{classgko_1_1CudaExecutor}{Cuda\+Executor} with a custom allocator and device stream. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1CudaExecutor_aef0258494d14de0e56149b920c5173e5}\label{classgko_1_1CudaExecutor_aef0258494d14de0e56149b920c5173e5} 
static int {\bfseries get\+\_\+num\+\_\+devices} ()
\begin{DoxyCompactList}\small\item\em Get the number of devices present on the system. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This is the \doxylink{classgko_1_1Executor}{Executor} subclass which represents the CUDA device. 

\label{doc-func-members}
\Hypertarget{classgko_1_1CudaExecutor_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1CudaExecutor_a075a1957241de65c0cad59f9534430a2}\index{gko::CudaExecutor@{gko::CudaExecutor}!create@{create}}
\index{create@{create}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a075a1957241de65c0cad59f9534430a2} 
std::\+shared\+\_\+ptr$<$ Cuda\+Executor $>$ gko::\+\+Cuda\+Executor::\+create (\begin{DoxyParamCaption}\item[{int}]{device\+\_\+id}{, }\item[{std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{master}{, }\item[{bool}]{device\+\_\+reset}{, }\item[{\doxymbox{\hyperlink{namespacegko_afbed8e2cbd3ee4ca962e12f688858bdb}{allocation\+\_\+mode}}}]{alloc\+\_\+mode}{ = {\ttfamily default\+\_\+cuda\+\_\+alloc\+\_\+mode}, }\item[{CUstream\+\_\+st \texorpdfstring{$\ast$}{*}}]{stream}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a new \doxylink{classgko_1_1CudaExecutor}{Cuda\+Executor}. 


\begin{DoxyParams}{Parameters}
{\em device\+\_\+id} & the CUDA device id of this device \\
\hline
{\em master} & an executor on the host that is used to invoke the device kernels \\
\hline
{\em device\+\_\+reset} & this option no longer has any effect. \\
\hline
{\em alloc\+\_\+mode} & the allocation mode that the executor should operate on. See @allocation\+\_\+mode for more details \\
\hline
{\em stream} & the stream to execute operations on. \\
\hline
\end{DoxyParams}


References \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a075a1957241de65c0cad59f9534430a2}{create()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a075a1957241de65c0cad59f9534430a2}{create()}}, and \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a3d456d0aa03be5ca3bef03c4afad4b68}{create()}}.

\Hypertarget{classgko_1_1CudaExecutor_a3d456d0aa03be5ca3bef03c4afad4b68}\index{gko::CudaExecutor@{gko::CudaExecutor}!create@{create}}
\index{create@{create}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a3d456d0aa03be5ca3bef03c4afad4b68} 
std::\+shared\+\_\+ptr$<$ Cuda\+Executor $>$ gko::\+\+Cuda\+Executor::\+create (\begin{DoxyParamCaption}\item[{int}]{device\+\_\+id}{, }\item[{std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{master}{, }\item[{std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1CudaAllocatorBase}{Cuda\+Allocator\+Base}} $>$}]{alloc}{ = {\ttfamily std:\+:\+make\+\_\+shared$<$~\doxymbox{\hyperlink{classgko_1_1CudaAllocator}{Cuda\+Allocator}}~$>$()}, }\item[{CUstream\+\_\+st \texorpdfstring{$\ast$}{*}}]{stream}{ = {\ttfamily nullptr}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a new \doxylink{classgko_1_1CudaExecutor}{Cuda\+Executor} with a custom allocator and device stream. 


\begin{DoxyParams}{Parameters}
{\em device\+\_\+id} & the CUDA device id of this device \\
\hline
{\em master} & an executor on the host that is used to invoke the device kernels. \\
\hline
{\em \doxylink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{alloc}} & the allocator to use for device memory allocations. \\
\hline
{\em stream} & the stream to execute operations on. \\
\hline
\end{DoxyParams}


References \doxymbox{\hyperlink{classgko_1_1Executor_a99e1d008646298b06ce10979253de1ec}{gko::\+\+Executor::\+alloc()}}, and \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a075a1957241de65c0cad59f9534430a2}{create()}}.

\Hypertarget{classgko_1_1CudaExecutor_a1251802b1fa34107d00927e8bd3bd9a2}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_blas\_handle@{get\_blas\_handle}}
\index{get\_blas\_handle@{get\_blas\_handle}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_blas\_handle()}{get\_blas\_handle()}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a1251802b1fa34107d00927e8bd3bd9a2} 
cublas\+Context \texorpdfstring{$\ast$}{*} gko::\+\+Cuda\+Executor::\+get\+\_\+blas\+\_\+handle (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the cublas handle for this executor.    

\begin{DoxyReturn}{Returns}
the cublas handle (cublas\+Context\texorpdfstring{$\ast$}{*}) for this executor    
\end{DoxyReturn}


Referenced by \doxymbox{\hyperlink{classgko_1_1CudaExecutor_aae42e3ae7e95c21092afdc198adacc8a}{get\+\_\+cublas\+\_\+handle()}}.

\Hypertarget{classgko_1_1CudaExecutor_a23a13ee1b82ea850660da25376d6cf4e}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_closest\_numa@{get\_closest\_numa}}
\index{get\_closest\_numa@{get\_closest\_numa}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_closest\_numa()}{get\_closest\_numa()}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a23a13ee1b82ea850660da25376d6cf4e} 
int gko::\+\+Cuda\+Executor::\+get\+\_\+closest\+\_\+numa (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the closest NUMA node. 

\begin{DoxyReturn}{Returns}
the closest NUMA node closest to this device 
\end{DoxyReturn}
\Hypertarget{classgko_1_1CudaExecutor_a14c70ca95b76c22ec3c5857e04cfea8e}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_closest\_pus@{get\_closest\_pus}}
\index{get\_closest\_pus@{get\_closest\_pus}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_closest\_pus()}{get\_closest\_pus()}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a14c70ca95b76c22ec3c5857e04cfea8e} 
std::\+vector$<$ int $>$ gko::\+\+Cuda\+Executor::\+get\+\_\+closest\+\_\+pus (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the closest PUs. 

\begin{DoxyReturn}{Returns}
the array of PUs closest to this device 
\end{DoxyReturn}
\Hypertarget{classgko_1_1CudaExecutor_aae42e3ae7e95c21092afdc198adacc8a}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_cublas\_handle@{get\_cublas\_handle}}
\index{get\_cublas\_handle@{get\_cublas\_handle}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_cublas\_handle()}{get\_cublas\_handle()}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_aae42e3ae7e95c21092afdc198adacc8a} 
cublas\+Context \texorpdfstring{$\ast$}{*} gko::\+\+Cuda\+Executor::\+get\+\_\+cublas\+\_\+handle (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the cublas handle for this executor. 

\begin{DoxyReturn}{Returns}
the cublas handle (cublas\+Context\texorpdfstring{$\ast$}{*}) for this executor 
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a1251802b1fa34107d00927e8bd3bd9a2}{get\+\_\+blas\+\_\+handle()}}, and \doxymbox{\hyperlink{classgko_1_1CudaExecutor_aae42e3ae7e95c21092afdc198adacc8a}{get\+\_\+cublas\+\_\+handle()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1CudaExecutor_aae42e3ae7e95c21092afdc198adacc8a}{get\+\_\+cublas\+\_\+handle()}}.

\Hypertarget{classgko_1_1CudaExecutor_a7abd86b1590597a0f6a097585a446006}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_cusparse\_handle@{get\_cusparse\_handle}}
\index{get\_cusparse\_handle@{get\_cusparse\_handle}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_cusparse\_handle()}{get\_cusparse\_handle()}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a7abd86b1590597a0f6a097585a446006} 
cusparse\+Context \texorpdfstring{$\ast$}{*} gko::\+\+Cuda\+Executor::\+get\+\_\+cusparse\+\_\+handle (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the cusparse handle for this executor. 

\begin{DoxyReturn}{Returns}
the cusparse handle (cusparse\+Context\texorpdfstring{$\ast$}{*}) for this executor 
\end{DoxyReturn}


References \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a7abd86b1590597a0f6a097585a446006}{get\+\_\+cusparse\+\_\+handle()}}, and \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a0d41c86eba6b19b906bf3044c8f5bec2}{get\+\_\+sparselib\+\_\+handle()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a7abd86b1590597a0f6a097585a446006}{get\+\_\+cusparse\+\_\+handle()}}.

\Hypertarget{classgko_1_1CudaExecutor_ac429a47e4fab2f11df0dd09fc9652a19}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_description@{get\_description}}
\index{get\_description@{get\_description}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_description()}{get\_description()}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_ac429a47e4fab2f11df0dd09fc9652a19} 
std::\+string gko::\+\+Cuda\+Executor::\+get\+\_\+description (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}

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


Implements \doxymbox{\hyperlink{classgko_1_1Executor_a9b25713dfacc7914b69115f815e616b0}{gko::\+\+Executor}}.



References \doxymbox{\hyperlink{classgko_1_1CudaExecutor_ac429a47e4fab2f11df0dd09fc9652a19}{get\+\_\+description()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1CudaExecutor_ac429a47e4fab2f11df0dd09fc9652a19}{get\+\_\+description()}}.

\Hypertarget{classgko_1_1CudaExecutor_a8999e5a4598d224fadc6c0047ed6ca17}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_master@{get\_master}}
\index{get\_master@{get\_master}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_master()}{get\_master()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a8999e5a4598d224fadc6c0047ed6ca17} 
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ gko::\+\+Cuda\+Executor::\+get\+\_\+master (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}, {\ttfamily [noexcept]}}



Returns the master \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor} of this \doxylink{classgko_1_1Executor}{Executor}.    

\begin{DoxyReturn}{Returns}
the master \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor} of this \doxylink{classgko_1_1Executor}{Executor}.    
\end{DoxyReturn}


Implements \doxymbox{\hyperlink{classgko_1_1Executor_a30d5407c37711d49184914026d815708}{gko::\+\+Executor}}.



References \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a6466705137b8ac3974734837c7730d74}{get\+\_\+master()}}.

\Hypertarget{classgko_1_1CudaExecutor_a6466705137b8ac3974734837c7730d74}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_master@{get\_master}}
\index{get\_master@{get\_master}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_master()}{get\_master()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a6466705137b8ac3974734837c7730d74} 
std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ gko::\+\+Cuda\+Executor::\+get\+\_\+master (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}, {\ttfamily [noexcept]}}



Returns the master \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor} of this \doxylink{classgko_1_1Executor}{Executor}. 

\begin{DoxyReturn}{Returns}
the master \doxylink{classgko_1_1OmpExecutor}{Omp\+Executor} of this \doxylink{classgko_1_1Executor}{Executor}. 
\end{DoxyReturn}


Implements \doxymbox{\hyperlink{classgko_1_1Executor_aa23172c7579fe4a9a41af8eba62ed54f}{gko::\+\+Executor}}.



References \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a6466705137b8ac3974734837c7730d74}{get\+\_\+master()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a8999e5a4598d224fadc6c0047ed6ca17}{get\+\_\+master()}}, and \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a6466705137b8ac3974734837c7730d74}{get\+\_\+master()}}.

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



Implements \doxymbox{\hyperlink{classgko_1_1Executor}{gko::\+\+Executor}}.

\Hypertarget{classgko_1_1CudaExecutor_a0d41c86eba6b19b906bf3044c8f5bec2}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_sparselib\_handle@{get\_sparselib\_handle}}
\index{get\_sparselib\_handle@{get\_sparselib\_handle}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_sparselib\_handle()}{get\_sparselib\_handle()}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a0d41c86eba6b19b906bf3044c8f5bec2} 
cusparse\+Context \texorpdfstring{$\ast$}{*} gko::\+\+Cuda\+Executor::\+get\+\_\+sparselib\+\_\+handle (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the cusparse handle for this executor.    

\begin{DoxyReturn}{Returns}
the cusparse handle (cusparse\+Context\texorpdfstring{$\ast$}{*}) for this executor    
\end{DoxyReturn}


Referenced by \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a7abd86b1590597a0f6a097585a446006}{get\+\_\+cusparse\+\_\+handle()}}.

\Hypertarget{classgko_1_1CudaExecutor_a935159e4376a4cd01408af020d0fc627}\index{gko::CudaExecutor@{gko::CudaExecutor}!get\_stream@{get\_stream}}
\index{get\_stream@{get\_stream}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{get\_stream()}{get\_stream()}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a935159e4376a4cd01408af020d0fc627} 
CUstream\+\_\+st \texorpdfstring{$\ast$}{*} gko::\+\+Cuda\+Executor::\+get\+\_\+stream (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the CUDA stream used by this executor. 

Can be nullptr for the default stream.

\begin{DoxyReturn}{Returns}
the stream used to execute kernels and memory operations. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1CudaExecutor_a294787f033b02fd013af087d02a4ae1b}\index{gko::CudaExecutor@{gko::CudaExecutor}!run@{run}}
\index{run@{run}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{run()}{run()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_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_1CudaExecutor_a4fdbf8100b039d3858634bf9c502f5d7}\index{gko::CudaExecutor@{gko::CudaExecutor}!run@{run}}
\index{run@{run}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{run()}{run()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a4fdbf8100b039d3858634bf9c502f5d7} 
virtual void \doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{gko::\+\+Executor::\+run}} (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1Operation}{Operation}} \&}]{op}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\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}


Implements \doxymbox{\hyperlink{classgko_1_1Executor_a1de8e2668b76e66690acf5eef9e8324d}{gko::\+\+Executor}}.

\Hypertarget{classgko_1_1CudaExecutor_abe906f109824da54447e504ff88aa97f}\index{gko::CudaExecutor@{gko::CudaExecutor}!run@{run}}
\index{run@{run}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{run()}{run()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_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}
\Hypertarget{classgko_1_1CudaExecutor_a903cf7e3460b14677c0bce5ca08a1b81}\index{gko::CudaExecutor@{gko::CudaExecutor}!synchronize@{synchronize}}
\index{synchronize@{synchronize}!gko::CudaExecutor@{gko::CudaExecutor}}
\doxysubsubsection{\texorpdfstring{synchronize()}{synchronize()}}
{\footnotesize\ttfamily \label{classgko_1_1CudaExecutor_a903cf7e3460b14677c0bce5ca08a1b81} 
void gko::\+\+Cuda\+Executor::\+synchronize (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Synchronize the operations launched on the executor with its master. 



Implements \doxymbox{\hyperlink{classgko_1_1Executor_a24eeee7648c0f0fd07c9866d07154875}{gko::\+\+Executor}}.



References \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a903cf7e3460b14677c0bce5ca08a1b81}{synchronize()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1CudaExecutor_a903cf7e3460b14677c0bce5ca08a1b81}{synchronize()}}.



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