\doxysection{gko::\+matrix::\+Row\+Gatherer\texorpdfstring{$<$}{<} Index\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1matrix_1_1RowGatherer}{}\label{classgko_1_1matrix_1_1RowGatherer}\index{gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}}


\doxylink{classgko_1_1matrix_1_1RowGatherer}{Row\+Gatherer} is a matrix "{}format"{} which stores the gather indices arrays which can be used to gather rows to another matrix.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+matrix/\+row\+\_\+gatherer.\+hpp$>$}



Inheritance diagram for gko::\+matrix::\+Row\+Gatherer\texorpdfstring{$<$}{<} Index\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1matrix_1_1RowGatherer__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+matrix::\+Row\+Gatherer\texorpdfstring{$<$}{<} Index\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1matrix_1_1RowGatherer__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1RowGatherer_a087896776f0ec691e6b3efdfb10af5b9}\label{classgko_1_1matrix_1_1RowGatherer_a087896776f0ec691e6b3efdfb10af5b9} 
using {\bfseries index\+\_\+type} = Index\+Type
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Row\+Gatherer$<$ int32 $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries result\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a568e008a494699c223007ed604f074f0}{get\+\_\+row\+\_\+idxs}} () noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the row index array for gathering. \end{DoxyCompactList}\item 
const index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a7e1b17b5caabafd58539cc8f3f0301fe}{get\+\_\+const\+\_\+row\+\_\+idxs}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the row index array for gathering.    \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{gko::\+\+Enable\+Lin\+Op$<$ Row\+Gatherer$<$ int32 $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
const Row\+Gatherer$<$ \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}} $>$ \texorpdfstring{$\ast$}{*} {\bfseries apply} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ x) const
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Row\+Gatherer$<$ int32 $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
void {\bfseries convert\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) const override
\item 
void {\bfseries move\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) override
\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std::\+unique\+\_\+ptr$<$ Row\+Gatherer $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a71f9833fd87716ef40fa3752e18cb0bb}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&size=\{\})
\begin{DoxyCompactList}\small\item\em Creates uninitialized \doxylink{classgko_1_1matrix_1_1RowGatherer}{Row\+Gatherer} arrays of the specified size. \end{DoxyCompactList}\item 
static std::\+unique\+\_\+ptr$<$ Row\+Gatherer $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a8a23741b1f476465d39575a17442538c}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&size, \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$ row\+\_\+idxs)
\begin{DoxyCompactList}\small\item\em Creates a \doxylink{classgko_1_1matrix_1_1RowGatherer}{Row\+Gatherer} matrix from an already allocated (and initialized) row gathering array. \end{DoxyCompactList}\item 
static std::\+unique\+\_\+ptr$<$ const Row\+Gatherer $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a2abebd9fb8075150a71a0d0241a8040d}{create\+\_\+const}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&size, gko::\+detail::\+const\+\_\+array\+\_\+view$<$ Index\+Type $>$ \&\&row\+\_\+idxs)
\begin{DoxyCompactList}\small\item\em Creates a constant (immutable) \doxylink{classgko_1_1matrix_1_1RowGatherer}{Row\+Gatherer} matrix from a constant array. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1RowGatherer_a6caede6ce5717f68eacbd9b0e29dcc32}\label{classgko_1_1matrix_1_1RowGatherer_a6caede6ce5717f68eacbd9b0e29dcc32} 
class {\bfseries Enable\+Polymorphic\+Object$<$ Row\+Gatherer, Lin\+Op $>$}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Index\+Type = int32$>$\newline
class gko::\+matrix::\+\+Row\+Gatherer$<$ Index\+Type $>$}
\doxylink{classgko_1_1matrix_1_1RowGatherer}{Row\+Gatherer} is a matrix "{}format"{} which stores the gather indices arrays which can be used to gather rows to another matrix. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Index\+Type} & precision of rowgatherer array indices.\\
\hline
\end{DoxyTemplParams}
\begin{DoxyNote}{Note}
This format is used mainly to allow for an abstraction of the rowgatherer and provides the user with an apply method which calls the respective \doxylink{classgko_1_1matrix_1_1Dense}{Dense} rowgatherer operation. As such it only stores an array of the rowgatherer indices. 
\end{DoxyNote}


\label{doc-func-members}
\Hypertarget{classgko_1_1matrix_1_1RowGatherer_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1matrix_1_1RowGatherer_a8a23741b1f476465d39575a17442538c}\index{gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}!create@{create}}
\index{create@{create}!gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1RowGatherer_a8a23741b1f476465d39575a17442538c} 
template$<$typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ Row\+Gatherer $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer}{gko::\+matrix::\+\+Row\+Gatherer}}$<$ Index\+Type $>$::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&}]{size}{, }\item[{\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$}]{row\+\_\+idxs}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a \doxylink{classgko_1_1matrix_1_1RowGatherer}{Row\+Gatherer} matrix from an already allocated (and initialized) row gathering array. 


\begin{DoxyParams}{Parameters}
{\em exec} & \doxylink{classgko_1_1Executor}{Executor} associated to the matrix \\
\hline
{\em size} & size of the rowgatherer array. \\
\hline
{\em row\+\_\+idxs} & array of rowgatherer array\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
If {\ttfamily row\+\_\+idxs} is not an rvalue, not an array of Index\+Type, or is on the wrong executor, an internal copy will be created, and the original array data will not be used in the matrix.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
A smart pointer to the newly created matrix. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1RowGatherer_a71f9833fd87716ef40fa3752e18cb0bb}\index{gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}!create@{create}}
\index{create@{create}!gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1RowGatherer_a71f9833fd87716ef40fa3752e18cb0bb} 
template$<$typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ Row\+Gatherer $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer}{gko::\+matrix::\+\+Row\+Gatherer}}$<$ Index\+Type $>$::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&}]{size}{ = {\ttfamily \{\}}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates uninitialized \doxylink{classgko_1_1matrix_1_1RowGatherer}{Row\+Gatherer} arrays of the specified size. 


\begin{DoxyParams}{Parameters}
{\em exec} & \doxylink{classgko_1_1Executor}{Executor} associated to the matrix \\
\hline
{\em size} & size of the Row\+Gatherable matrix\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A smart pointer to the newly created matrix. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1RowGatherer_a2abebd9fb8075150a71a0d0241a8040d}\index{gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}!create\_const@{create\_const}}
\index{create\_const@{create\_const}!gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create\_const()}{create\_const()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1RowGatherer_a2abebd9fb8075150a71a0d0241a8040d} 
template$<$typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ const Row\+Gatherer $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer}{gko::\+matrix::\+\+Row\+Gatherer}}$<$ Index\+Type $>$::\+create\+\_\+const (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&}]{size}{, }\item[{gko::\+detail::\+const\+\_\+array\+\_\+view$<$ Index\+Type $>$ \&\&}]{row\+\_\+idxs}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a constant (immutable) \doxylink{classgko_1_1matrix_1_1RowGatherer}{Row\+Gatherer} matrix from a constant array. 


\begin{DoxyParams}{Parameters}
{\em exec} & the executor to create the matrix on \\
\hline
{\em size} & the dimensions of the matrix \\
\hline
{\em row\+\_\+idxs} & the gathered row indices of the matrix \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A smart pointer to the constant matrix wrapping the input arrays (if they reside on the same executor as the matrix) or a copy of the arrays on the correct executor. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1RowGatherer_a7e1b17b5caabafd58539cc8f3f0301fe}\index{gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}!get\_const\_row\_idxs@{get\_const\_row\_idxs}}
\index{get\_const\_row\_idxs@{get\_const\_row\_idxs}!gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_const\_row\_idxs()}{get\_const\_row\_idxs()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1RowGatherer_a7e1b17b5caabafd58539cc8f3f0301fe} 
template$<$typename Index\+Type = int32$>$ \\
const index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer}{gko::\+matrix::\+\+Row\+Gatherer}}$<$ Index\+Type $>$::\+get\+\_\+const\+\_\+row\+\_\+idxs (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the row index array for gathering.    

\begin{DoxyReturn}{Returns}
the pointer to the row index array for gathering.   
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This is the constant version of the function, which can be significantly more memory efficient than the non-\/constant version, so always prefer this version. 
\end{DoxyNote}
\Hypertarget{classgko_1_1matrix_1_1RowGatherer_a568e008a494699c223007ed604f074f0}\index{gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}!get\_row\_idxs@{get\_row\_idxs}}
\index{get\_row\_idxs@{get\_row\_idxs}!gko::matrix::RowGatherer$<$ IndexType $>$@{gko::matrix::RowGatherer$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_row\_idxs()}{get\_row\_idxs()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1RowGatherer_a568e008a494699c223007ed604f074f0} 
template$<$typename Index\+Type = int32$>$ \\
index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer}{gko::\+matrix::\+\+Row\+Gatherer}}$<$ Index\+Type $>$::\+get\+\_\+row\+\_\+idxs (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the row index array for gathering. 

\begin{DoxyReturn}{Returns}
the pointer to the row index array for gathering. 
\end{DoxyReturn}


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