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


\doxylink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type}{strategy\+\_\+type} is to decide how to set the hybrid config.  




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



Inheritance diagram for gko::\+matrix::\+Hybrid\texorpdfstring{$<$}{<} Value\+Type, Index\+Type \texorpdfstring{$>$}{>}::\+strategy\+\_\+type:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1matrix_1_1Hybrid_1_1strategy__type__inherit__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a307425e7a1b925583cec9d6dd30be301}\label{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a307425e7a1b925583cec9d6dd30be301} 
{\bfseries strategy\+\_\+type} ()
\begin{DoxyCompactList}\small\item\em Creates a \doxylink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type}{strategy\+\_\+type}. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_ab7b115c95b89badb15eb49fb5974c249}{compute\+\_\+hybrid\+\_\+config}} (const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} $>$ \&row\+\_\+nnz, \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \texorpdfstring{$\ast$}{*}ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row, \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \texorpdfstring{$\ast$}{*}coo\+\_\+nnz)
\begin{DoxyCompactList}\small\item\em Computes the config of the \doxylink{classgko_1_1matrix_1_1Hybrid}{Hybrid} matrix (ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row and coo\+\_\+nnz). \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a9282863b7637d6e3612bdf3bd9762b0a}{get\+\_\+ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns the number of stored elements per row of the ell part. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_ae4e8729245df69e1b48ec56846e43b88}{get\+\_\+coo\+\_\+nnz}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns the number of nonzeros of the coo part. \end{DoxyCompactList}\item 
virtual \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a249343543a23e1c50a12373d033904bb}{compute\+\_\+ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row}} (\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} $>$ \texorpdfstring{$\ast$}{*}row\+\_\+nnz) const =0
\begin{DoxyCompactList}\small\item\em Computes the number of stored elements per row of the ell part. \end{DoxyCompactList}\end{DoxyCompactItemize}


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

It computes the number of stored elements per row of the ell part and then set the number of residual nonzeros as the number of nonzeros of the coo part.

The practical strategy method should inherit \doxylink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type}{strategy\+\_\+type} and implement its {\ttfamily \doxylink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a249343543a23e1c50a12373d033904bb}{compute\+\_\+ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row}} function. 

\label{doc-func-members}
\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a249343543a23e1c50a12373d033904bb}\index{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type}!compute\_ell\_num\_stored\_elements\_per\_row@{compute\_ell\_num\_stored\_elements\_per\_row}}
\index{compute\_ell\_num\_stored\_elements\_per\_row@{compute\_ell\_num\_stored\_elements\_per\_row}!gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type}}
\doxysubsubsection{\texorpdfstring{compute\_ell\_num\_stored\_elements\_per\_row()}{compute\_ell\_num\_stored\_elements\_per\_row()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a249343543a23e1c50a12373d033904bb} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
virtual \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{gko::\+matrix::\+\+Hybrid}}$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type::\+compute\+\_\+ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} $>$ \texorpdfstring{$\ast$}{*}}]{row\+\_\+nnz}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Computes the number of stored elements per row of the ell part. 


\begin{DoxyParams}{Parameters}
{\em row\+\_\+nnz} & the number of nonzeros of each row\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the number of stored elements per row of the ell part 
\end{DoxyReturn}


Implemented in \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1automatic_a5e3af48e0956b121b32c8e6e0930a51c}{gko::\+matrix::\+\+Hybrid$<$ Value\+Type, Index\+Type $>$::\+automatic}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1column__limit_ac42c17b7b1e2cb43d4a4d86b6ca128cf}{gko::\+matrix::\+\+Hybrid$<$ Value\+Type, Index\+Type $>$::\+column\+\_\+limit}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__bounded__limit_a85c91fd71f1d7313aefb5629cfc81d57}{gko::\+matrix::\+\+Hybrid$<$ Value\+Type, Index\+Type $>$::\+imbalance\+\_\+bounded\+\_\+limit}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_a22b64d0fa749e691b61c15edd9d1c608}{gko::\+matrix::\+\+Hybrid$<$ Value\+Type, Index\+Type $>$::\+imbalance\+\_\+limit}}, and \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1minimal__storage__limit_a29342a87bb931afb355b5eded6df8d0c}{gko::\+matrix::\+\+Hybrid$<$ Value\+Type, Index\+Type $>$::\+minimal\+\_\+storage\+\_\+limit}}.



References \doxymbox{\hyperlink{classgko_1_1array_a699ce7bef6d2838c8acd10d04f775e2a}{gko::\+array$<$ Value\+Type $>$::\+get\+\_\+const\+\_\+data()}}, and \doxymbox{\hyperlink{classgko_1_1array_ad38e4c252d698a4581ffa0833ab98c3f}{gko::\+array$<$ Value\+Type $>$::\+get\+\_\+size()}}.



Referenced by \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_ab7b115c95b89badb15eb49fb5974c249}{compute\+\_\+hybrid\+\_\+config()}}.

\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_ab7b115c95b89badb15eb49fb5974c249}\index{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type}!compute\_hybrid\_config@{compute\_hybrid\_config}}
\index{compute\_hybrid\_config@{compute\_hybrid\_config}!gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type}}
\doxysubsubsection{\texorpdfstring{compute\_hybrid\_config()}{compute\_hybrid\_config()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_ab7b115c95b89badb15eb49fb5974c249} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{gko::\+matrix::\+\+Hybrid}}$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type::\+compute\+\_\+hybrid\+\_\+config (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} $>$ \&}]{row\+\_\+nnz}{, }\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \texorpdfstring{$\ast$}{*}}]{ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row}{, }\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \texorpdfstring{$\ast$}{*}}]{coo\+\_\+nnz}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Computes the config of the \doxylink{classgko_1_1matrix_1_1Hybrid}{Hybrid} matrix (ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row and coo\+\_\+nnz). 

For now, it copies row\+\_\+nnz to the reference executor and performs all operations on the reference executor.


\begin{DoxyParams}{Parameters}
{\em row\+\_\+nnz} & the number of nonzeros of each row \\
\hline
{\em ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row} & the output number of stored elements per row of the ell part \\
\hline
{\em coo\+\_\+nnz} & the output number of nonzeros of the coo part \\
\hline
\end{DoxyParams}


References \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a249343543a23e1c50a12373d033904bb}{compute\+\_\+ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row()}}, \doxymbox{\hyperlink{classgko_1_1array_a169a0f4e9fc1aa81b8e7fef15de57af7}{gko::\+array$<$ Value\+Type $>$::\+get\+\_\+executor()}}, and \doxymbox{\hyperlink{classgko_1_1array_ad38e4c252d698a4581ffa0833ab98c3f}{gko::\+array$<$ Value\+Type $>$::\+get\+\_\+size()}}.

\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_ae4e8729245df69e1b48ec56846e43b88}\index{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type}!get\_coo\_nnz@{get\_coo\_nnz}}
\index{get\_coo\_nnz@{get\_coo\_nnz}!gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type}}
\doxysubsubsection{\texorpdfstring{get\_coo\_nnz()}{get\_coo\_nnz()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_ae4e8729245df69e1b48ec56846e43b88} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{gko::\+matrix::\+\+Hybrid}}$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type::\+get\+\_\+coo\+\_\+nnz (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns the number of nonzeros of the coo part. 

\begin{DoxyReturn}{Returns}
the number of nonzeros of the coo part 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a9282863b7637d6e3612bdf3bd9762b0a}\index{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type}!get\_ell\_num\_stored\_elements\_per\_row@{get\_ell\_num\_stored\_elements\_per\_row}}
\index{get\_ell\_num\_stored\_elements\_per\_row@{get\_ell\_num\_stored\_elements\_per\_row}!gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::strategy\_type}}
\doxysubsubsection{\texorpdfstring{get\_ell\_num\_stored\_elements\_per\_row()}{get\_ell\_num\_stored\_elements\_per\_row()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a9282863b7637d6e3612bdf3bd9762b0a} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{gko::\+matrix::\+\+Hybrid}}$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type::\+get\+\_\+ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns the number of stored elements per row of the ell part. 

\begin{DoxyReturn}{Returns}
the number of stored elements per row of the ell part 
\end{DoxyReturn}


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