\doxysection{gko::\+matrix::\+Hybrid\texorpdfstring{$<$}{<} Value\+Type, Index\+Type \texorpdfstring{$>$}{>}::\+imbalance\+\_\+limit Class Reference}
\hypertarget{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}{}\label{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}\index{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit}}


\doxylink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}{imbalance\+\_\+limit} is a \doxylink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type}{strategy\+\_\+type} which decides the number of stored elements per row of the ell part according to the percent.  




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



Inheritance diagram for gko::\+matrix::\+Hybrid\texorpdfstring{$<$}{<} Value\+Type, Index\+Type \texorpdfstring{$>$}{>}::\+imbalance\+\_\+limit:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=201pt]{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+matrix::\+Hybrid\texorpdfstring{$<$}{<} Value\+Type, Index\+Type \texorpdfstring{$>$}{>}::\+imbalance\+\_\+limit:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=201pt]{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_ab835e526a3de2da3d827dcdb740f3b75}{imbalance\+\_\+limit}} (double percent=0.\+8)
\begin{DoxyCompactList}\small\item\em Creates a \doxylink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}{imbalance\+\_\+limit} strategy. \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_a22b64d0fa749e691b61c15edd9d1c608}{compute\+\_\+ell\+\_\+num\+\_\+stored\+\_\+elements\+\_\+per\+\_\+row}} (\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} $>$ \texorpdfstring{$\ast$}{*}row\+\_\+nnz) const override
\begin{DoxyCompactList}\small\item\em Computes the number of stored elements per row of the ell part. \end{DoxyCompactList}\item 
auto \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_a45fbcc5d1cb4a6e32a535d965b734da5}{get\+\_\+percentage}} () const
\begin{DoxyCompactList}\small\item\em Get the percent setting. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type}{gko::\+matrix::\+\+Hybrid$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type}}}
\begin{DoxyCompactItemize}
\item 
{\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}\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 $>$::\+imbalance\+\_\+limit}
\doxylink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}{imbalance\+\_\+limit} is a \doxylink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type}{strategy\+\_\+type} which decides the number of stored elements per row of the ell part according to the percent. 

It sorts the number of nonzeros of each row and takes the value at the position {\ttfamily floor(percent \texorpdfstring{$\ast$}{*} num\+\_\+row)} as the number of stored elements per row of the ell part. Thus, at least {\ttfamily percent} rows of all are in the ell part. 

\label{doc-constructors}
\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_doc-constructors}
\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_ab835e526a3de2da3d827dcdb740f3b75}\index{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit}!imbalance\_limit@{imbalance\_limit}}
\index{imbalance\_limit@{imbalance\_limit}!gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit}}
\doxysubsubsection{\texorpdfstring{imbalance\_limit()}{imbalance\_limit()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_ab835e526a3de2da3d827dcdb740f3b75} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{gko::\+matrix::\+\+Hybrid}}$<$ Value\+Type, Index\+Type $>$::\+imbalance\+\_\+limit::\+imbalance\+\_\+limit (\begin{DoxyParamCaption}\item[{double}]{percent}{ = {\ttfamily 0.8}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}



Creates a \doxylink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}{imbalance\+\_\+limit} strategy. 


\begin{DoxyParams}{Parameters}
{\em percent} & the row\+\_\+nnz\+[floor(num\+\_\+rows\texorpdfstring{$\ast$}{*}percent)]\+ is the number of stored elements per row of the ell part \\
\hline
\end{DoxyParams}


\label{doc-func-members}
\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_a22b64d0fa749e691b61c15edd9d1c608}\index{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit}!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 $>$::imbalance\_limit@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit}}
\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_1imbalance__limit_a22b64d0fa749e691b61c15edd9d1c608} 
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 $>$::\+imbalance\+\_\+limit::\+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 [inline]}, {\ttfamily [override]}, {\ttfamily [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}


Implements \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a249343543a23e1c50a12373d033904bb}{gko::\+matrix::\+\+Hybrid$<$ Value\+Type, Index\+Type $>$::\+strategy\+\_\+type}}.



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

\Hypertarget{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_a45fbcc5d1cb4a6e32a535d965b734da5}\index{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit}!get\_percentage@{get\_percentage}}
\index{get\_percentage@{get\_percentage}!gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit@{gko::matrix::Hybrid$<$ ValueType, IndexType $>$::imbalance\_limit}}
\doxysubsubsection{\texorpdfstring{get\_percentage()}{get\_percentage()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_a45fbcc5d1cb4a6e32a535d965b734da5} 
template$<$typename Value\+Type = default\+\_\+precision, typename Index\+Type = int32$>$ \\
auto \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{gko::\+matrix::\+\+Hybrid}}$<$ Value\+Type, Index\+Type $>$::\+imbalance\+\_\+limit::\+get\+\_\+percentage (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the percent setting. 

\begin{DoxyReturn}{Returns}
percent 
\end{DoxyReturn}


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