\doxysection{gko::\+matrix::\+Csr\texorpdfstring{$<$}{<} Value\+Type, Index\+Type \texorpdfstring{$>$}{>}::\+strategy\+\_\+type Class Reference}
\hypertarget{classgko_1_1matrix_1_1Csr_1_1strategy__type}{}\label{classgko_1_1matrix_1_1Csr_1_1strategy__type}\index{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}}


\doxylink{classgko_1_1matrix_1_1Csr_1_1strategy__type}{strategy\+\_\+type} is to decide how to set the csr algorithm.  




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



Inheritance diagram for gko::\+matrix::\+Csr\texorpdfstring{$<$}{<} Value\+Type, Index\+Type \texorpdfstring{$>$}{>}::\+strategy\+\_\+type:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1matrix_1_1Csr_1_1strategy__type__inherit__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1strategy__type_aae6804f7a0b899f03bc0d5e0f139129c}{strategy\+\_\+type}} (std::\+string name)
\begin{DoxyCompactList}\small\item\em Creates a \doxylink{classgko_1_1matrix_1_1Csr_1_1strategy__type}{strategy\+\_\+type}. \end{DoxyCompactList}\item 
std::\+string \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1strategy__type_a0c22b251b0c1dfd087a5c097488febe0}{get\+\_\+name}} ()
\begin{DoxyCompactList}\small\item\em Returns the name of strategy. \end{DoxyCompactList}\item 
virtual void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1strategy__type_a99ea39b16f0c281fdaf8c559f670c10b}{process}} (const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$ \&mtx\+\_\+row\+\_\+ptrs, \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$ \texorpdfstring{$\ast$}{*}mtx\+\_\+srow)=0
\begin{DoxyCompactList}\small\item\em Computes srow according to row pointers. \end{DoxyCompactList}\item 
virtual int64\+\_\+t \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1strategy__type_a07a6dda9dd04ed8abd914f3a69f330f2}{clac\+\_\+size}} (const int64\+\_\+t nnz)=0
\begin{DoxyCompactList}\small\item\em Computes the srow size according to the number of nonzeros. \end{DoxyCompactList}\item 
virtual std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1strategy__type_aae6804f7a0b899f03bc0d5e0f139129c}{strategy\+\_\+type}} $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1strategy__type_a7d1561856f7ae17ca5e39076cb6c4207}{copy}} ()=0
\begin{DoxyCompactList}\small\item\em Copy a strategy. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1Csr_1_1strategy__type_a9e1e07b9f14479534a4043eefd6320cc}\label{classgko_1_1matrix_1_1Csr_1_1strategy__type_a9e1e07b9f14479534a4043eefd6320cc} 
class {\bfseries automatical}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$\newline
class gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type}
\doxylink{classgko_1_1matrix_1_1Csr_1_1strategy__type}{strategy\+\_\+type} is to decide how to set the csr algorithm. 

The practical strategy method should inherit \doxylink{classgko_1_1matrix_1_1Csr_1_1strategy__type}{strategy\+\_\+type} and implement its {\ttfamily \doxylink{classgko_1_1matrix_1_1Csr_1_1strategy__type_a99ea39b16f0c281fdaf8c559f670c10b}{process}}, {\ttfamily \doxylink{classgko_1_1matrix_1_1Csr_1_1strategy__type_a07a6dda9dd04ed8abd914f3a69f330f2}{clac\+\_\+size}} function and the corresponding device kernel. 

\label{doc-constructors}
\Hypertarget{classgko_1_1matrix_1_1Csr_1_1strategy__type_doc-constructors}
\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classgko_1_1matrix_1_1Csr_1_1strategy__type_aae6804f7a0b899f03bc0d5e0f139129c}\index{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}!strategy\_type@{strategy\_type}}
\index{strategy\_type@{strategy\_type}!gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}}
\doxysubsubsection{\texorpdfstring{strategy\_type()}{strategy\_type()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Csr_1_1strategy__type_aae6804f7a0b899f03bc0d5e0f139129c} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{gko::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type::\+strategy\+\_\+type (\begin{DoxyParamCaption}\item[{std::\+string}]{name}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Creates a \doxylink{classgko_1_1matrix_1_1Csr_1_1strategy__type}{strategy\+\_\+type}. 


\begin{DoxyParams}{Parameters}
{\em name} & the name of strategy \\
\hline
\end{DoxyParams}


Referenced by \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1automatical_a270b30353a7069d11d44bad9f05d0a1d}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+automatical::\+automatical()}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1classical_a98620198be4dc96d661b7bd1007407b2}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+classical::\+classical()}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1cusparse_a9aae722e5f5838291bf1f1798277a83c}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+cusparse::\+cusparse()}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1load__balance_ad0b5c6131bed93ec17948968ec27d1c8}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+load\+\_\+balance::\+load\+\_\+balance()}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1merge__path_a3761055a7460cbdfb2fb330fda047e7a}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+merge\+\_\+path::\+merge\+\_\+path()}}, and \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1sparselib_a2b50338d0f7679bc94b09d63341c5c6f}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+sparselib::\+sparselib()}}.



\label{doc-func-members}
\Hypertarget{classgko_1_1matrix_1_1Csr_1_1strategy__type_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1matrix_1_1Csr_1_1strategy__type_a07a6dda9dd04ed8abd914f3a69f330f2}\index{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}!clac\_size@{clac\_size}}
\index{clac\_size@{clac\_size}!gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}}
\doxysubsubsection{\texorpdfstring{clac\_size()}{clac\_size()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Csr_1_1strategy__type_a07a6dda9dd04ed8abd914f3a69f330f2} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
virtual int64\+\_\+t \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{gko::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type::\+clac\+\_\+size (\begin{DoxyParamCaption}\item[{const int64\+\_\+t}]{nnz}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Computes the srow size according to the number of nonzeros. 


\begin{DoxyParams}{Parameters}
{\em nnz} & the number of nonzeros\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the size of srow 
\end{DoxyReturn}


Implemented in \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1automatical_a4c3e6ae322c261f0da10641c58e83398}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+automatical}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1classical_ae99f47abc647f84793d9f84a9605a77d}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+classical}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1cusparse_a094614c818d821cb0a71a4266fbef2d0}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+cusparse}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1load__balance_ac0413220bebe762defe180d900240fac}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+load\+\_\+balance}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1merge__path_a2072b7810a1fbc515ca87807ed8adcdb}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+merge\+\_\+path}}, and \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1sparselib_a106f7ba1d05091e56d27c3b50f141740}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+sparselib}}.

\Hypertarget{classgko_1_1matrix_1_1Csr_1_1strategy__type_a7d1561856f7ae17ca5e39076cb6c4207}\index{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}!copy@{copy}}
\index{copy@{copy}!gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}}
\doxysubsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Csr_1_1strategy__type_a7d1561856f7ae17ca5e39076cb6c4207} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
virtual std::\+shared\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1strategy__type_aae6804f7a0b899f03bc0d5e0f139129c}{strategy\+\_\+type}} $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{gko::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type::\+copy (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Copy a strategy. 

This is a workaround until strategies are revamped, since strategies like {\ttfamily \doxylink{classgko_1_1matrix_1_1Csr_1_1automatical}{automatical}} do not work when actually shared. 

Implemented in \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1automatical_a197c022bc128a9c6b55f3d4cf7d293ac}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+automatical}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1classical_a546d5af3262cd3bc1c201a0268d7fe28}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+classical}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1cusparse_a639d2496cc83184d2960d3976fb1abca}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+cusparse}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1load__balance_a250e60a86f788a0745b58c515d620bbf}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+load\+\_\+balance}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1merge__path_a35af6309c6fa366c55fd2059344b9ea6}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+merge\+\_\+path}}, and \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1sparselib_add8e101467e4e4cb44da0fbaa2c524c1}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+sparselib}}.

\Hypertarget{classgko_1_1matrix_1_1Csr_1_1strategy__type_a0c22b251b0c1dfd087a5c097488febe0}\index{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}!get\_name@{get\_name}}
\index{get\_name@{get\_name}!gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}}
\doxysubsubsection{\texorpdfstring{get\_name()}{get\_name()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Csr_1_1strategy__type_a0c22b251b0c1dfd087a5c097488febe0} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
std::\+string \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{gko::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type::\+get\+\_\+name (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Returns the name of strategy. 

\begin{DoxyReturn}{Returns}
the name of strategy 
\end{DoxyReturn}


Referenced by \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1automatical_a97d7160b757fe6d427ba048c349cb034}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+automatical::\+process()}}.

\Hypertarget{classgko_1_1matrix_1_1Csr_1_1strategy__type_a99ea39b16f0c281fdaf8c559f670c10b}\index{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}!process@{process}}
\index{process@{process}!gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Csr$<$ ValueType, IndexType $>$::strategy\_type}}
\doxysubsubsection{\texorpdfstring{process()}{process()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Csr_1_1strategy__type_a99ea39b16f0c281fdaf8c559f670c10b} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
virtual void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{gko::\+matrix::\+\+Csr}}$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type::\+process (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$ \&}]{mtx\+\_\+row\+\_\+ptrs}{, }\item[{\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$ \texorpdfstring{$\ast$}{*}}]{mtx\+\_\+srow}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Computes srow according to row pointers. 


\begin{DoxyParams}{Parameters}
{\em mtx\+\_\+row\+\_\+ptrs} & the row pointers of the matrix \\
\hline
{\em mtx\+\_\+srow} & the srow of the matrix \\
\hline
\end{DoxyParams}


Implemented in \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1automatical_a97d7160b757fe6d427ba048c349cb034}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+automatical}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1classical_a2740db9fa954cb7f8f4145a1f87f82a6}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+classical}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1cusparse_af444511e48f557734dd79d93f064bda8}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+cusparse}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1load__balance_a0849e0d936dda023474673d7316e73d8}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+load\+\_\+balance}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1merge__path_a7e8f5961354e58eaf7f2c25031dbd65f}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+merge\+\_\+path}}, and \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_1_1sparselib_a2167e481d117f8208525c15cf6b3bb4d}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$::\+sparselib}}.



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