\doxysection{hybrid.\+hpp}
\hypertarget{hybrid_8hpp_source}{}\label{hybrid_8hpp_source}\index{ginkgo/core/matrix/hybrid.hpp@{ginkgo/core/matrix/hybrid.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//\ SPDX-\/FileCopyrightText:\ 2017\ -\/\ 2025\ The\ Ginkgo\ authors}}
\DoxyCodeLine{00002\ \textcolor{comment}{//}}
\DoxyCodeLine{00003\ \textcolor{comment}{//\ SPDX-\/License-\/Identifier:\ BSD-\/3-\/Clause}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#ifndef\ GKO\_PUBLIC\_CORE\_MATRIX\_HYBRID\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_MATRIX\_HYBRID\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <algorithm>}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/array.hpp>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/lin\_op.hpp>}}
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ <ginkgo/core/matrix/coo.hpp>}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <ginkgo/core/matrix/csr.hpp>}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <ginkgo/core/matrix/ell.hpp>}}
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ }
\DoxyCodeLine{00018\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00019\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}}\ \{}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType>}
\DoxyCodeLine{00023\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense}};}
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00025\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00026\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}};}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00041\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType\ =\ default\_precision,\ \textcolor{keyword}{typename}\ IndexType\ =\ \textcolor{keywordtype}{int}32>}
\DoxyCodeLine{00042\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}}
\DoxyCodeLine{00043\ \ \ \ \ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<Hybrid<ValueType,\ IndexType>>,}
\DoxyCodeLine{00044\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Hybrid<next\_precision<ValueType>,\ IndexType>>,}
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00046\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Hybrid<next\_precision<ValueType,\ 2>,\ IndexType>>,}
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00048\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00049\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Hybrid<next\_precision<ValueType,\ 3>,\ IndexType>>,}
\DoxyCodeLine{00050\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Dense<ValueType>>,}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Csr<ValueType,\ IndexType>>,}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1DiagonalExtractable}{DiagonalExtractable}}<ValueType>,}
\DoxyCodeLine{00054\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{ReadableFromMatrixData}}<ValueType,\ IndexType>,}
\DoxyCodeLine{00055\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData}{WritableToMatrixData}}<ValueType,\ IndexType>,}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1EnableAbsoluteComputation}{EnableAbsoluteComputation}}<}
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \ \ remove\_complex<Hybrid<ValueType,\ IndexType>>>\ \{}
\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}},\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}>;}
\DoxyCodeLine{00059\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense}}<ValueType>;}
\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}}<ValueType,\ IndexType>;}
\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_a4ad20e5381a84928753efde0b2bc7f85}{to\_complex}}<ValueType>,\ IndexType>;}
\DoxyCodeLine{00062\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_AND\_INDEX\_TYPE;}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00064\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}>::convert\_to;}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}>::move\_to;}
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<}
\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid<next\_precision<ValueType>}},\ IndexType>>::convert\_to;}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid<next\_precision<ValueType>}},\ IndexType>>::move\_to;}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}>::convert\_to;}
\DoxyCodeLine{00071\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}>::move\_to;}
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}>::convert\_to;}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}>::move\_to;}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{ReadableFromMatrixData}}<ValueType,\ IndexType>::read;}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ IndexType;}
\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keyword}{using\ }mat\_data\ =\ \doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\_data<ValueType,\ IndexType>}};}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keyword}{using\ }device\_mat\_data\ =\ \doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\_matrix\_data<ValueType,\ IndexType>}};}
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keyword}{using\ }coo\_type\ =\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo}{Coo<ValueType,\ IndexType>}};}
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keyword}{using\ }ell\_type\ =\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Ell}{Ell<ValueType,\ IndexType>}};}
\DoxyCodeLine{00082\ \ \ \ \ \textcolor{keyword}{using\ }absolute\_type\ =\ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<Hybrid>}};}
\DoxyCodeLine{00083\ }
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a307425e7a1b925583cec9d6dd30be301}{strategy\_type}}\ \{}
\DoxyCodeLine{00095\ \ \ \ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a307425e7a1b925583cec9d6dd30be301}{strategy\_type}}()}
\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ \ \ \ \ :\ ell\_num\_stored\_elements\_per\_row\_(\doxymbox{\hyperlink{namespacegko_a70dbe01ff95c7b953d3d737424c6feb5}{zero}}<\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}>()),}
\DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ coo\_nnz\_(\doxymbox{\hyperlink{namespacegko_a70dbe01ff95c7b953d3d737424c6feb5}{zero}}<\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}>())}
\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ \{\}}
\DoxyCodeLine{00103\ }
\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_ab7b115c95b89badb15eb49fb5974c249}{compute\_hybrid\_config}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<size\_type>}}\&\ row\_nnz,}
\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}*\ ell\_num\_stored\_elements\_per\_row,}
\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}*\ coo\_nnz)}
\DoxyCodeLine{00119\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<size\_type>}}\ ref\_row\_nnz(row\_nnz.\doxymbox{\hyperlink{classgko_1_1array_a169a0f4e9fc1aa81b8e7fef15de57af7}{get\_executor}}()-\/>get\_master(),}
\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ row\_nnz.\doxymbox{\hyperlink{classgko_1_1array_ad38e4c252d698a4581ffa0833ab98c3f}{get\_size}}());}
\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \ \ \ \ ref\_row\_nnz\ =\ row\_nnz;}
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \ \ \ \ ell\_num\_stored\_elements\_per\_row\_\ =}
\DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a249343543a23e1c50a12373d033904bb}{compute\_ell\_num\_stored\_elements\_per\_row}}(\&ref\_row\_nnz);}
\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ \ \ \ \ coo\_nnz\_\ =\ this-\/>compute\_coo\_nnz(ref\_row\_nnz);}
\DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ \ \ \ \ *ell\_num\_stored\_elements\_per\_row\ =\ ell\_num\_stored\_elements\_per\_row\_;}
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \ \ \ \ *coo\_nnz\ =\ coo\_nnz\_;}
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00129\ }
\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \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}
\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ell\_num\_stored\_elements\_per\_row\_;}
\DoxyCodeLine{00138\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00139\ }
\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_ae4e8729245df69e1b48ec56846e43b88}{get\_coo\_nnz}}()\ const\ noexcept\ \{\ \textcolor{keywordflow}{return}\ coo\_nnz\_;\ \}}
\DoxyCodeLine{00146\ }
\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ \textcolor{keyword}{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}}(}
\DoxyCodeLine{00155\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<size\_type>}}*\ row\_nnz)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{00156\ }
\DoxyCodeLine{00157\ \ \ \ \ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00166\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ compute\_coo\_nnz(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<size\_type>}}\&\ row\_nnz)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00167\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ coo\_nnz\ =\ 0;}
\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ row\_nnz\_val\ =\ row\_nnz.\doxymbox{\hyperlink{classgko_1_1array_a699ce7bef6d2838c8acd10d04f775e2a}{get\_const\_data}}();}
\DoxyCodeLine{00170\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ i\ =\ 0;\ i\ <\ row\_nnz.\doxymbox{\hyperlink{classgko_1_1array_ad38e4c252d698a4581ffa0833ab98c3f}{get\_size}}();\ i++)\ \{}
\DoxyCodeLine{00171\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (row\_nnz\_val[i]\ >\ ell\_num\_stored\_elements\_per\_row\_)\ \{}
\DoxyCodeLine{00172\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ coo\_nnz\ +=}
\DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ row\_nnz\_val[i]\ -\/\ ell\_num\_stored\_elements\_per\_row\_;}
\DoxyCodeLine{00174\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ coo\_nnz;}
\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00178\ }
\DoxyCodeLine{00179\ \ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00180\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ ell\_num\_stored\_elements\_per\_row\_;}
\DoxyCodeLine{00181\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ coo\_nnz\_;}
\DoxyCodeLine{00182\ \ \ \ \ \};}
\DoxyCodeLine{00183\ }
\DoxyCodeLine{00188\ \ \ \ \ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1column__limit_ac686f3f99034bffd091bd934bd1cf9f9}{column\_limit}}\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a307425e7a1b925583cec9d6dd30be301}{strategy\_type}}\ \{}
\DoxyCodeLine{00189\ \ \ \ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00195\ \ \ \ \ \ \ \ \ \textcolor{keyword}{explicit}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1column__limit_ac686f3f99034bffd091bd934bd1cf9f9}{column\_limit}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_column\ =\ 0)}
\DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ \ \ \ \ :\ num\_columns\_(num\_column)}
\DoxyCodeLine{00197\ \ \ \ \ \ \ \ \ \{\}}
\DoxyCodeLine{00198\ }
\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1column__limit_ac42c17b7b1e2cb43d4a4d86b6ca128cf}{compute\_ell\_num\_stored\_elements\_per\_row}}(}
\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<size\_type>}}*\ row\_nnz)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00201\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{00202\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ num\_columns\_;}
\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00204\ }
\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1column__limit_ae950e0c9f6be62fe23400cbe2f5e9cfb}{get\_num\_columns}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ num\_columns\_;\ \}}
\DoxyCodeLine{00211\ }
\DoxyCodeLine{00212\ \ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_columns\_;}
\DoxyCodeLine{00214\ \ \ \ \ \};}
\DoxyCodeLine{00215\ }
\DoxyCodeLine{00223\ \ \ \ \ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_ab835e526a3de2da3d827dcdb740f3b75}{imbalance\_limit}}\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a307425e7a1b925583cec9d6dd30be301}{strategy\_type}}\ \{}
\DoxyCodeLine{00224\ \ \ \ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00231\ \ \ \ \ \ \ \ \ \textcolor{keyword}{explicit}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_ab835e526a3de2da3d827dcdb740f3b75}{imbalance\_limit}}(\textcolor{keywordtype}{double}\ percent\ =\ 0.8)\ :\ percent\_(percent)}
\DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ \ \ \ \ percent\_\ =\ std::min(percent\_,\ 1.0);}
\DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ \ \ \ \ percent\_\ =\ std::max(percent\_,\ 0.0);}
\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00236\ }
\DoxyCodeLine{00237\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_a22b64d0fa749e691b61c15edd9d1c608}{compute\_ell\_num\_stored\_elements\_per\_row}}(}
\DoxyCodeLine{00238\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<size\_type>}}*\ row\_nnz)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00239\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{00240\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ row\_nnz\_val\ =\ row\_nnz-\/>\doxymbox{\hyperlink{classgko_1_1array_a10eab2ea8b6b4efaae84e6a143d61eed}{get\_data}}();}
\DoxyCodeLine{00241\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ num\_rows\ =\ row\_nnz-\/>\doxymbox{\hyperlink{classgko_1_1array_ad38e4c252d698a4581ffa0833ab98c3f}{get\_size}}();}
\DoxyCodeLine{00242\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (num\_rows\ ==\ 0)\ \{}
\DoxyCodeLine{00243\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{00244\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00245\ \ \ \ \ \ \ \ \ \ \ \ \ std::sort(row\_nnz\_val,\ row\_nnz\_val\ +\ num\_rows);}
\DoxyCodeLine{00246\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (percent\_\ <\ 1)\ \{}
\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ percent\_pos\ =\ \textcolor{keyword}{static\_cast<}\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\textcolor{keyword}{>}(num\_rows\ *\ percent\_);}
\DoxyCodeLine{00248\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ row\_nnz\_val[percent\_pos];}
\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ row\_nnz\_val[num\_rows\ -\/\ 1];}
\DoxyCodeLine{00251\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00253\ }
\DoxyCodeLine{00259\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit_a45fbcc5d1cb4a6e32a535d965b734da5}{get\_percentage}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ percent\_;\ \}}
\DoxyCodeLine{00260\ }
\DoxyCodeLine{00261\ \ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00262\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ percent\_;}
\DoxyCodeLine{00263\ \ \ \ \ \};}
\DoxyCodeLine{00264\ }
\DoxyCodeLine{00270\ \ \ \ \ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__bounded__limit_a97e364f42ea8a12cc04f3d49b0c4da8f}{imbalance\_bounded\_limit}}\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a307425e7a1b925583cec9d6dd30be301}{strategy\_type}}\ \{}
\DoxyCodeLine{00271\ \ \ \ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00275\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__bounded__limit_a97e364f42ea8a12cc04f3d49b0c4da8f}{imbalance\_bounded\_limit}}(\textcolor{keywordtype}{double}\ percent\ =\ 0.8,\ \textcolor{keywordtype}{double}\ ratio\ =\ 0.0001)}
\DoxyCodeLine{00276\ \ \ \ \ \ \ \ \ \ \ \ \ :\ strategy\_(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}{imbalance\_limit}}(percent)),\ ratio\_(ratio)}
\DoxyCodeLine{00277\ \ \ \ \ \ \ \ \ \{\}}
\DoxyCodeLine{00278\ }
\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__bounded__limit_a85c91fd71f1d7313aefb5629cfc81d57}{compute\_ell\_num\_stored\_elements\_per\_row}}(}
\DoxyCodeLine{00280\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<size\_type>}}*\ row\_nnz)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00281\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{00282\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ num\_rows\ =\ row\_nnz-\/>\doxymbox{\hyperlink{classgko_1_1array_ad38e4c252d698a4581ffa0833ab98c3f}{get\_size}}();}
\DoxyCodeLine{00283\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ ell\_cols\ =}
\DoxyCodeLine{00284\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ strategy\_.compute\_ell\_num\_stored\_elements\_per\_row(row\_nnz);}
\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::min(ell\_cols,}
\DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{static\_cast<}\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\textcolor{keyword}{>}(num\_rows\ *\ ratio\_));}
\DoxyCodeLine{00287\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00288\ }
\DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__bounded__limit_a3a4041e90455648ae2da9e6f6ced6ea1}{get\_percentage}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ strategy\_.get\_percentage();\ \}}
\DoxyCodeLine{00295\ }
\DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__bounded__limit_ae63efeeecdb8ad40616a73f9e757f2b8}{get\_ratio}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ ratio\_;\ \}}
\DoxyCodeLine{00302\ }
\DoxyCodeLine{00303\ \ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00304\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}{imbalance\_limit}}\ strategy\_;}
\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ ratio\_;}
\DoxyCodeLine{00306\ \ \ \ \ \};}
\DoxyCodeLine{00307\ }
\DoxyCodeLine{00308\ }
\DoxyCodeLine{00314\ \ \ \ \ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1minimal__storage__limit_ac7851b3c053f239e98e197cc2ef81f1e}{minimal\_storage\_limit}}\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a307425e7a1b925583cec9d6dd30be301}{strategy\_type}}\ \{}
\DoxyCodeLine{00315\ \ \ \ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00319\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1minimal__storage__limit_ac7851b3c053f239e98e197cc2ef81f1e}{minimal\_storage\_limit}}()}
\DoxyCodeLine{00320\ \ \ \ \ \ \ \ \ \ \ \ \ :\ strategy\_(}
\DoxyCodeLine{00321\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}{imbalance\_limit}}(static\_cast<double>(sizeof(IndexType))\ /}
\DoxyCodeLine{00322\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (sizeof(ValueType)\ +\ 2\ *\ sizeof(IndexType))))}
\DoxyCodeLine{00323\ \ \ \ \ \ \ \ \ \{\}}
\DoxyCodeLine{00324\ }
\DoxyCodeLine{00325\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1minimal__storage__limit_a29342a87bb931afb355b5eded6df8d0c}{compute\_ell\_num\_stored\_elements\_per\_row}}(}
\DoxyCodeLine{00326\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<size\_type>}}*\ row\_nnz)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00327\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{00328\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ strategy\_.compute\_ell\_num\_stored\_elements\_per\_row(row\_nnz);}
\DoxyCodeLine{00329\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00330\ }
\DoxyCodeLine{00336\ \ \ \ \ \ \ \ \ \textcolor{keyword}{auto}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1minimal__storage__limit_a2c30363cf1049d056594779857ea2112}{get\_percentage}}()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ strategy\_.get\_percentage();\ \}}
\DoxyCodeLine{00337\ }
\DoxyCodeLine{00338\ \ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00339\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__limit}{imbalance\_limit}}\ strategy\_;}
\DoxyCodeLine{00340\ \ \ \ \ \};}
\DoxyCodeLine{00341\ }
\DoxyCodeLine{00342\ }
\DoxyCodeLine{00347\ \ \ \ \ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1automatic_aadf787a2d56fe0e67c4108f14ee0cb6e}{automatic}}\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1strategy__type_a307425e7a1b925583cec9d6dd30be301}{strategy\_type}}\ \{}
\DoxyCodeLine{00348\ \ \ \ \ \textcolor{keyword}{public}:}
\DoxyCodeLine{00352\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1automatic_aadf787a2d56fe0e67c4108f14ee0cb6e}{automatic}}()\ :\ strategy\_(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__bounded__limit}{imbalance\_bounded\_limit}}(1.0\ /\ 3.0,\ 0.001))\ \{\}}
\DoxyCodeLine{00353\ }
\DoxyCodeLine{00354\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1automatic_a5e3af48e0956b121b32c8e6e0930a51c}{compute\_ell\_num\_stored\_elements\_per\_row}}(}
\DoxyCodeLine{00355\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<size\_type>}}*\ row\_nnz)\textcolor{keyword}{\ const\ override}}
\DoxyCodeLine{00356\ \textcolor{keyword}{\ \ \ \ \ \ \ \ }\{}
\DoxyCodeLine{00357\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ strategy\_.compute\_ell\_num\_stored\_elements\_per\_row(row\_nnz);}
\DoxyCodeLine{00358\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00359\ }
\DoxyCodeLine{00360\ \ \ \ \ \textcolor{keyword}{private}:}
\DoxyCodeLine{00361\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_1_1imbalance__bounded__limit}{imbalance\_bounded\_limit}}\ strategy\_;}
\DoxyCodeLine{00362\ \ \ \ \ \};}
\DoxyCodeLine{00363\ }
\DoxyCodeLine{00364\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType>,\ IndexType>;}
\DoxyCodeLine{00365\ }
\DoxyCodeLine{00366\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a7cb327baf9ca9018d06fa5554464d29d}{convert\_to}}(}
\DoxyCodeLine{00367\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}},\ IndexType>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00368\ }
\DoxyCodeLine{00369\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a6fcc3453bf500454b56a5f2f196b871c}{move\_to}}(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}},\ IndexType>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00370\ }
\DoxyCodeLine{00371\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00372\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 2>,\ IndexType>;}
\DoxyCodeLine{00373\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<}
\DoxyCodeLine{00374\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid<next\_precision<ValueType,\ 2>}},\ IndexType>>\doxymbox{\hyperlink{namespacegko_a7cb327baf9ca9018d06fa5554464d29d}{::convert\_to}};}
\DoxyCodeLine{00375\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<}
\DoxyCodeLine{00376\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid<next\_precision<ValueType,\ 2>}},\ IndexType>>\doxymbox{\hyperlink{namespacegko_a6fcc3453bf500454b56a5f2f196b871c}{::move\_to}};}
\DoxyCodeLine{00377\ }
\DoxyCodeLine{00378\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a7cb327baf9ca9018d06fa5554464d29d}{convert\_to}}(}
\DoxyCodeLine{00379\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}},\ IndexType>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00380\ }
\DoxyCodeLine{00381\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a6fcc3453bf500454b56a5f2f196b871c}{move\_to}}(}
\DoxyCodeLine{00382\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}},\ IndexType>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00383\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00384\ }
\DoxyCodeLine{00385\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00386\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 3>,\ IndexType>;}
\DoxyCodeLine{00387\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<}
\DoxyCodeLine{00388\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid<next\_precision<ValueType,\ 3>}},\ IndexType>>\doxymbox{\hyperlink{namespacegko_a7cb327baf9ca9018d06fa5554464d29d}{::convert\_to}};}
\DoxyCodeLine{00389\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<}
\DoxyCodeLine{00390\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid<next\_precision<ValueType,\ 3>}},\ IndexType>>\doxymbox{\hyperlink{namespacegko_a6fcc3453bf500454b56a5f2f196b871c}{::move\_to}};}
\DoxyCodeLine{00391\ }
\DoxyCodeLine{00392\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a7cb327baf9ca9018d06fa5554464d29d}{convert\_to}}(}
\DoxyCodeLine{00393\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}},\ IndexType>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00394\ }
\DoxyCodeLine{00395\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a6fcc3453bf500454b56a5f2f196b871c}{move\_to}}(}
\DoxyCodeLine{00396\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}},\ IndexType>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00397\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00398\ }
\DoxyCodeLine{00399\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a7cb327baf9ca9018d06fa5554464d29d}{convert\_to}}(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}*\ other)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00400\ }
\DoxyCodeLine{00401\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a6fcc3453bf500454b56a5f2f196b871c}{move\_to}}(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}*\ other)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00402\ }
\DoxyCodeLine{00403\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a7cb327baf9ca9018d06fa5554464d29d}{convert\_to}}(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}*\ other)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00404\ }
\DoxyCodeLine{00405\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_a6fcc3453bf500454b56a5f2f196b871c}{move\_to}}(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}*\ other)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00406\ }
\DoxyCodeLine{00407\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_abc58509ecdcb48399e12f9a081ed7545}{read}}(\textcolor{keyword}{const}\ mat\_data\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00408\ }
\DoxyCodeLine{00409\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_abc58509ecdcb48399e12f9a081ed7545}{read}}(\textcolor{keyword}{const}\ device\_mat\_data\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00410\ }
\DoxyCodeLine{00411\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_abc58509ecdcb48399e12f9a081ed7545}{read}}(device\_mat\_data\&\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00412\ }
\DoxyCodeLine{00413\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_af82d8f7795fefcf5f38a38895e316c02}{write}}(mat\_data\&\ data)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00414\ }
\DoxyCodeLine{00415\ \ \ \ \ std::unique\_ptr<Diagonal<ValueType>>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a779434a67614e111b4b1cb5e449e22bd}{extract\_diagonal}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00416\ }
\DoxyCodeLine{00417\ \ \ \ \ std::unique\_ptr<absolute\_type>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a3407d2dc1a5a88e1abdd977f61d37d31}{compute\_absolute}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00418\ }
\DoxyCodeLine{00419\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaee1f64830637ca6753380f317525d2a}{compute\_absolute\_inplace}}()\ \textcolor{keyword}{override};}
\DoxyCodeLine{00420\ }
\DoxyCodeLine{00426\ \ \ \ \ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a77ba63894e332e53e653a534d0cffbee}{get\_ell\_values}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ ell\_-\/>get\_values();\ \}}
\DoxyCodeLine{00427\ }
\DoxyCodeLine{00435\ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a6389aff031d73142a62f38438b8dd4f8}{get\_const\_ell\_values}}()\ const\ noexcept}
\DoxyCodeLine{00436\ \ \ \ \ \{}
\DoxyCodeLine{00437\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ell\_-\/>get\_const\_values();}
\DoxyCodeLine{00438\ \ \ \ \ \}}
\DoxyCodeLine{00439\ }
\DoxyCodeLine{00445\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aacce10a2adbbdb525afa4854501e21ff}{get\_ell\_col\_idxs}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ ell\_-\/>get\_col\_idxs();\ \}}
\DoxyCodeLine{00446\ }
\DoxyCodeLine{00454\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_ab909ecf0ab50bfdfff1fab20eef6c729}{get\_const\_ell\_col\_idxs}}()\ const\ noexcept}
\DoxyCodeLine{00455\ \ \ \ \ \{}
\DoxyCodeLine{00456\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ell\_-\/>get\_const\_col\_idxs();}
\DoxyCodeLine{00457\ \ \ \ \ \}}
\DoxyCodeLine{00458\ }
\DoxyCodeLine{00464\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a9ac6d0efc8627c915c73a0155e64548d}{get\_ell\_num\_stored\_elements\_per\_row}}()\ const\ noexcept}
\DoxyCodeLine{00465\ \ \ \ \ \{}
\DoxyCodeLine{00466\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ell\_-\/>get\_num\_stored\_elements\_per\_row();}
\DoxyCodeLine{00467\ \ \ \ \ \}}
\DoxyCodeLine{00468\ }
\DoxyCodeLine{00474\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a2472495b537b47555a04aa6ba11d5817}{get\_ell\_stride}}()\ const\ noexcept\ \{\ \textcolor{keywordflow}{return}\ ell\_-\/>get\_stride();\ \}}
\DoxyCodeLine{00475\ }
\DoxyCodeLine{00481\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a99ab36f3aeae944db440a8bbe324aaff}{get\_ell\_num\_stored\_elements}}()\ const\ noexcept}
\DoxyCodeLine{00482\ \ \ \ \ \{}
\DoxyCodeLine{00483\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ell\_-\/>get\_num\_stored\_elements();}
\DoxyCodeLine{00484\ \ \ \ \ \}}
\DoxyCodeLine{00485\ }
\DoxyCodeLine{00497\ \ \ \ \ value\_type\&\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a191d0876ac13478de4b5596076142cec}{ell\_val\_at}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ idx)\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00498\ \ \ \ \ \{}
\DoxyCodeLine{00499\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ell\_-\/>val\_at(row,\ idx);}
\DoxyCodeLine{00500\ \ \ \ \ \}}
\DoxyCodeLine{00501\ }
\DoxyCodeLine{00505\ \ \ \ \ value\_type\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a3e0ab990e82db430d0e05fe165a11620}{ell\_val\_at}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ idx)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00506\ \ \ \ \ \{}
\DoxyCodeLine{00507\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ell\_-\/>val\_at(row,\ idx);}
\DoxyCodeLine{00508\ \ \ \ \ \}}
\DoxyCodeLine{00509\ }
\DoxyCodeLine{00520\ \ \ \ \ index\_type\&\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aedc5c990092949506d7ae1e871d27fc2}{ell\_col\_at}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ idx)\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00521\ \ \ \ \ \{}
\DoxyCodeLine{00522\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ell\_-\/>col\_at(row,\ idx);}
\DoxyCodeLine{00523\ \ \ \ \ \}}
\DoxyCodeLine{00524\ }
\DoxyCodeLine{00528\ \ \ \ \ index\_type\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a3a2d9b00dd8b2333b05a97d968dfabff}{ell\_col\_at}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ idx)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00529\ \ \ \ \ \{}
\DoxyCodeLine{00530\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ell\_-\/>col\_at(row,\ idx);}
\DoxyCodeLine{00531\ \ \ \ \ \}}
\DoxyCodeLine{00532\ }
\DoxyCodeLine{00538\ \ \ \ \ \textcolor{keyword}{const}\ ell\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a7739e50805cc0416276b6d91006625a9}{get\_ell}}()\ const\ noexcept\ \{\ \textcolor{keywordflow}{return}\ ell\_.get();\ \}}
\DoxyCodeLine{00539\ }
\DoxyCodeLine{00545\ \ \ \ \ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_ad8dfa0d949ef70fb55955865eb7fc1c4}{get\_coo\_values}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ coo\_-\/>get\_values();\ \}}
\DoxyCodeLine{00546\ }
\DoxyCodeLine{00554\ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_af109d897c8ce8761d0a730973879d76d}{get\_const\_coo\_values}}()\ const\ noexcept}
\DoxyCodeLine{00555\ \ \ \ \ \{}
\DoxyCodeLine{00556\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ coo\_-\/>get\_const\_values();}
\DoxyCodeLine{00557\ \ \ \ \ \}}
\DoxyCodeLine{00558\ }
\DoxyCodeLine{00564\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a3ba3d3d0374de6e88fe1ddc3c48d6dfc}{get\_coo\_col\_idxs}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ coo\_-\/>get\_col\_idxs();\ \}}
\DoxyCodeLine{00565\ }
\DoxyCodeLine{00573\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aa48b474faeeb2ef2a8c554003e6ef549}{get\_const\_coo\_col\_idxs}}()\ const\ noexcept}
\DoxyCodeLine{00574\ \ \ \ \ \{}
\DoxyCodeLine{00575\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ coo\_-\/>get\_const\_col\_idxs();}
\DoxyCodeLine{00576\ \ \ \ \ \}}
\DoxyCodeLine{00577\ }
\DoxyCodeLine{00583\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a083639d935e37693f0b3f30b1571152d}{get\_coo\_row\_idxs}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ coo\_-\/>get\_row\_idxs();\ \}}
\DoxyCodeLine{00584\ }
\DoxyCodeLine{00592\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a4314ab010ad2cfe9493c69e680cfd763}{get\_const\_coo\_row\_idxs}}()\ const\ noexcept}
\DoxyCodeLine{00593\ \ \ \ \ \{}
\DoxyCodeLine{00594\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ coo\_-\/>get\_const\_row\_idxs();}
\DoxyCodeLine{00595\ \ \ \ \ \}}
\DoxyCodeLine{00596\ }
\DoxyCodeLine{00602\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a2fe06adb3323dcad710329e33a12dff4}{get\_coo\_num\_stored\_elements}}()\ const\ noexcept}
\DoxyCodeLine{00603\ \ \ \ \ \{}
\DoxyCodeLine{00604\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ coo\_-\/>get\_num\_stored\_elements();}
\DoxyCodeLine{00605\ \ \ \ \ \}}
\DoxyCodeLine{00606\ }
\DoxyCodeLine{00612\ \ \ \ \ \textcolor{keyword}{const}\ coo\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_ac7ad33716393689a358f175f4dd4bb68}{get\_coo}}()\ const\ noexcept\ \{\ \textcolor{keywordflow}{return}\ coo\_.get();\ \}}
\DoxyCodeLine{00613\ }
\DoxyCodeLine{00619\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a00e86ba08ecfc46dbc9b74b800d10a8d}{get\_num\_stored\_elements}}()\ const\ noexcept}
\DoxyCodeLine{00620\ \ \ \ \ \{}
\DoxyCodeLine{00621\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ coo\_-\/>get\_num\_stored\_elements()\ +}
\DoxyCodeLine{00622\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ell\_-\/>get\_num\_stored\_elements();}
\DoxyCodeLine{00623\ \ \ \ \ \}}
\DoxyCodeLine{00624\ }
\DoxyCodeLine{00630\ \ \ \ \ std::shared\_ptr<strategy\_type>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_abefcf128fc361a19a4a813954f6dc887}{get\_strategy}}()\ const\ noexcept}
\DoxyCodeLine{00631\ \ \ \ \ \{}
\DoxyCodeLine{00632\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ strategy\_;}
\DoxyCodeLine{00633\ \ \ \ \ \}}
\DoxyCodeLine{00634\ }
\DoxyCodeLine{00642\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ HybType>}
\DoxyCodeLine{00643\ \ \ \ \ std::shared\_ptr<typename\ HybType::strategy\_type>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_abefcf128fc361a19a4a813954f6dc887}{get\_strategy}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00644\ }
\DoxyCodeLine{00655\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Hybrid>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a77d913822e7f52abcf1197cf61438f86}{create}}(}
\DoxyCodeLine{00656\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00657\ \ \ \ \ \ \ \ \ std::shared\_ptr<strategy\_type>\ strategy\ =}
\DoxyCodeLine{00658\ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<automatic>());}
\DoxyCodeLine{00659\ }
\DoxyCodeLine{00671\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Hybrid>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_ae4ecc61af3e66b29360e0801ef1c14dd}{create}}(}
\DoxyCodeLine{00672\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00673\ \ \ \ \ \ \ \ \ std::shared\_ptr<strategy\_type>\ strategy\ =}
\DoxyCodeLine{00674\ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<automatic>());}
\DoxyCodeLine{00675\ }
\DoxyCodeLine{00688\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Hybrid>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a1d1f07190eafbcd4812d6414c32f589a}{create}}(}
\DoxyCodeLine{00689\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00690\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_stored\_elements\_per\_row,}
\DoxyCodeLine{00691\ \ \ \ \ \ \ \ \ std::shared\_ptr<strategy\_type>\ strategy\ =}
\DoxyCodeLine{00692\ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<automatic>());}
\DoxyCodeLine{00693\ }
\DoxyCodeLine{00706\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Hybrid>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a07a3a69e35a37f2ba9142366cdf82ade}{create}}(}
\DoxyCodeLine{00707\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00708\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_stored\_elements\_per\_row,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ stride,}
\DoxyCodeLine{00709\ \ \ \ \ \ \ \ \ std::shared\_ptr<strategy\_type>\ strategy);}
\DoxyCodeLine{00710\ }
\DoxyCodeLine{00724\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Hybrid>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_ace413d42e3fccd00dc96aed8ee2065a1}{create}}(}
\DoxyCodeLine{00725\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00726\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_stored\_elements\_per\_row,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ stride,}
\DoxyCodeLine{00727\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_nonzeros\ =\ \{\},}
\DoxyCodeLine{00728\ \ \ \ \ \ \ \ \ std::shared\_ptr<strategy\_type>\ strategy\ =}
\DoxyCodeLine{00729\ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<automatic>());}
\DoxyCodeLine{00730\ }
\DoxyCodeLine{00735\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}\&\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_ae61b348d2a0ffba04e2d74ea43443205}{operator=}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}\&);}
\DoxyCodeLine{00736\ }
\DoxyCodeLine{00742\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}\&\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_afc1d8a6ac1cb3ff9aa12000c129adaf3}{operator=}}(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}\&\&);}
\DoxyCodeLine{00743\ }
\DoxyCodeLine{00748\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}\&);}
\DoxyCodeLine{00749\ }
\DoxyCodeLine{00755\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a5cd84a8537ee3d83e76196a4fe6a89f7}{Hybrid}}(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}\&\&);}
\DoxyCodeLine{00756\ }
\DoxyCodeLine{00757\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00758\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}(std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size\ =\ \{\},}
\DoxyCodeLine{00759\ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_stored\_elements\_per\_row\ =\ 0,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ stride\ =\ 0,}
\DoxyCodeLine{00760\ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_nonzeros\ =\ 0,}
\DoxyCodeLine{00761\ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<strategy\_type>\ strategy\ =}
\DoxyCodeLine{00762\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<automatic>());}
\DoxyCodeLine{00763\ }
\DoxyCodeLine{00774\ \ \ \ \ \textcolor{keywordtype}{void}\ resize(\doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ new\_size,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ ell\_row\_nnz,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ coo\_nnz);}
\DoxyCodeLine{00775\ }
\DoxyCodeLine{00776\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ b,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00777\ }
\DoxyCodeLine{00778\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ alpha,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ b,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ beta,}
\DoxyCodeLine{00779\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00780\ }
\DoxyCodeLine{00781\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00782\ \ \ \ \ std::unique\_ptr<ell\_type>\ ell\_;}
\DoxyCodeLine{00783\ \ \ \ \ std::unique\_ptr<coo\_type>\ coo\_;}
\DoxyCodeLine{00784\ \ \ \ \ std::shared\_ptr<strategy\_type>\ strategy\_;}
\DoxyCodeLine{00785\ \};}
\DoxyCodeLine{00786\ }
\DoxyCodeLine{00787\ }
\DoxyCodeLine{00788\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00789\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ HybType>}
\DoxyCodeLine{00790\ std::shared\_ptr<typename\ HybType::strategy\_type>}
\DoxyCodeLine{00791\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_abefcf128fc361a19a4a813954f6dc887}{Hybrid<ValueType,\ IndexType>::get\_strategy}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00792\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00793\ \ \ \ \ \textcolor{keyword}{static\_assert}(}
\DoxyCodeLine{00794\ \ \ \ \ \ \ \ \ std::is\_same<HybType,\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_aaa1a9cee0a9e6a3868819e9b9018d8ed}{Hybrid}}<\textcolor{keyword}{typename}\ HybType::value\_type,}
\DoxyCodeLine{00795\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{typename}\ HybType::index\_type>>::value,}
\DoxyCodeLine{00796\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}The\ given\ \`{}HybType`\ type\ must\ be\ of\ type\ \`{}matrix::Hybrid`!"{}});}
\DoxyCodeLine{00797\ }
\DoxyCodeLine{00798\ \ \ \ \ std::shared\_ptr<typename\ HybType::strategy\_type>\ strategy;}
\DoxyCodeLine{00799\ \ \ \ \ \textcolor{keywordflow}{if}\ (std::dynamic\_pointer\_cast<automatic>(strategy\_))\ \{}
\DoxyCodeLine{00800\ \ \ \ \ \ \ \ \ strategy\ =\ std::make\_shared<typename\ HybType::automatic>();}
\DoxyCodeLine{00801\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (\textcolor{keyword}{auto}\ temp\ =\ std::dynamic\_pointer\_cast<minimal\_storage\_limit>(}
\DoxyCodeLine{00802\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ strategy\_))\ \{}
\DoxyCodeLine{00803\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ minimal\_storage\_limit\ is\ related\ to\ ValueType\ and\ IndexType\ size.}}
\DoxyCodeLine{00804\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\textcolor{keyword}{sizeof}(value\_type)\ ==\ \textcolor{keyword}{sizeof}(\textcolor{keyword}{typename}\ HybType::value\_type)\ \&\&}
\DoxyCodeLine{00805\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{sizeof}(index\_type)\ ==\ \textcolor{keyword}{sizeof}(\textcolor{keyword}{typename}\ HybType::index\_type))\ \{}
\DoxyCodeLine{00806\ \ \ \ \ \ \ \ \ \ \ \ \ strategy\ =}
\DoxyCodeLine{00807\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<typename\ HybType::minimal\_storage\_limit>();}
\DoxyCodeLine{00808\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00809\ \ \ \ \ \ \ \ \ \ \ \ \ strategy\ =\ std::make\_shared<typename\ HybType::imbalance\_limit>(}
\DoxyCodeLine{00810\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ temp-\/>get\_percentage());}
\DoxyCodeLine{00811\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00812\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (\textcolor{keyword}{auto}\ temp\ =\ std::dynamic\_pointer\_cast<imbalance\_bounded\_limit>(}
\DoxyCodeLine{00813\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ strategy\_))\ \{}
\DoxyCodeLine{00814\ \ \ \ \ \ \ \ \ strategy\ =\ std::make\_shared<typename\ HybType::imbalance\_bounded\_limit>(}
\DoxyCodeLine{00815\ \ \ \ \ \ \ \ \ \ \ \ \ temp-\/>get\_percentage(),\ temp-\/>get\_ratio());}
\DoxyCodeLine{00816\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (\textcolor{keyword}{auto}\ temp\ =}
\DoxyCodeLine{00817\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::dynamic\_pointer\_cast<imbalance\_limit>(strategy\_))\ \{}
\DoxyCodeLine{00818\ \ \ \ \ \ \ \ \ strategy\ =\ std::make\_shared<typename\ HybType::imbalance\_limit>(}
\DoxyCodeLine{00819\ \ \ \ \ \ \ \ \ \ \ \ \ temp-\/>get\_percentage());}
\DoxyCodeLine{00820\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (\textcolor{keyword}{auto}\ temp\ =\ std::dynamic\_pointer\_cast<column\_limit>(strategy\_))\ \{}
\DoxyCodeLine{00821\ \ \ \ \ \ \ \ \ strategy\ =\ std::make\_shared<typename\ HybType::column\_limit>(}
\DoxyCodeLine{00822\ \ \ \ \ \ \ \ \ \ \ \ \ temp-\/>get\_num\_columns());}
\DoxyCodeLine{00823\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00824\ \ \ \ \ \ \ \ \ GKO\_NOT\_SUPPORTED(strategy\_);}
\DoxyCodeLine{00825\ \ \ \ \ \}}
\DoxyCodeLine{00826\ \ \ \ \ \textcolor{keywordflow}{return}\ strategy;}
\DoxyCodeLine{00827\ \}}
\DoxyCodeLine{00828\ }
\DoxyCodeLine{00829\ }
\DoxyCodeLine{00830\ \}\ \ \textcolor{comment}{//\ namespace\ matrix}}
\DoxyCodeLine{00831\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00832\ }
\DoxyCodeLine{00833\ }
\DoxyCodeLine{00834\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_MATRIX\_HYBRID\_HPP\_}}

\end{DoxyCode}
