\doxysection{batch\+\_\+ell.\+hpp}
\hypertarget{batch__ell_8hpp_source}{}\label{batch__ell_8hpp_source}\index{ginkgo/core/matrix/batch\_ell.hpp@{ginkgo/core/matrix/batch\_ell.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\_BATCH\_ELL\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_MATRIX\_BATCH\_ELL\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <initializer\_list>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/array.hpp>}}
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/batch\_lin\_op.hpp>}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/batch\_multi\_vector.hpp>}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/executor.hpp>}}
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/mtx\_io.hpp>}}
\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/range\_accessors.hpp>}}
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/types.hpp>}}
\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/utils.hpp>}}
\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/utils\_helper.hpp>}}
\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ <ginkgo/core/matrix/ell.hpp>}}
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00025\ \textcolor{keyword}{namespace\ }batch\ \{}
\DoxyCodeLine{00026\ \textcolor{keyword}{namespace\ }matrix\ \{}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00051\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType\ =\ default\_precision,\ \textcolor{keyword}{typename}\ IndexType\ =\ \textcolor{keywordtype}{int}32>}
\DoxyCodeLine{00052\ \textcolor{keyword}{class\ }Ell\ final}
\DoxyCodeLine{00053\ \ \ \ \ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp}}<Ell<ValueType,\ IndexType>>,}
\DoxyCodeLine{00054\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00055\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Ell<next\_precision<ValueType,\ 2>,\ IndexType>>,}
\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00057\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00058\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Ell<next\_precision<ValueType,\ 3>,\ IndexType>>,}
\DoxyCodeLine{00059\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00060\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Ell<next\_precision<ValueType>,\ IndexType>>\ \{}
\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<Ell,\ \doxymbox{\hyperlink{classgko_1_1batch_1_1BatchLinOp}{BatchLinOp}}>;}
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Ell<\doxymbox{\hyperlink{namespacegko_a4ad20e5381a84928753efde0b2bc7f85}{to\_complex}}<ValueType>,\ IndexType>;}
\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Ell<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType>,\ IndexType>;}
\DoxyCodeLine{00064\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_TYPE;}
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keyword}{static\_assert}(std::is\_same<IndexType,\ int32>::value,}
\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}IndexType\ must\ be\ a\ 32\ bit\ integer"{}});}
\DoxyCodeLine{00067\ }
\DoxyCodeLine{00068\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp}}<Ell>::convert\_to;}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp}}<Ell>::move\_to;}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ IndexType;}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keyword}{using\ }unbatch\_type\ =\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Ell}{gko::matrix::Ell<value\_type,\ index\_type>}};}
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keyword}{using\ }absolute\_type\ =\ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<Ell>}};}
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keyword}{using\ }complex\_type\ =\ \doxymbox{\hyperlink{namespacegko_a4ad20e5381a84928753efde0b2bc7f85}{to\_complex<Ell>}};}
\DoxyCodeLine{00077\ }
\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(}
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ Ell<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}},\ IndexType>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00080\ }
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Ell<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}},\ IndexType>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00082\ }
\DoxyCodeLine{00083\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Ell<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 2>,\ IndexType>;}
\DoxyCodeLine{00085\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<}
\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ Ell<next\_precision<ValueType,\ 2>,\ IndexType>>::convert\_to;}
\DoxyCodeLine{00087\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Ell<next\_precision<ValueType,\ 2>,\ IndexType>>::move\_to;}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(}
\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ Ell<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}},\ IndexType>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Ell<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}},\ IndexType>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00093\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00094\ }
\DoxyCodeLine{00095\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00096\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Ell<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 3>,\ IndexType>;}
\DoxyCodeLine{00097\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<}
\DoxyCodeLine{00098\ \ \ \ \ \ \ \ \ Ell<next\_precision<ValueType,\ 3>,\ IndexType>>::convert\_to;}
\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Ell<next\_precision<ValueType,\ 3>,\ IndexType>>::move\_to;}
\DoxyCodeLine{00100\ }
\DoxyCodeLine{00101\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(}
\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ Ell<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}},\ IndexType>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00103\ }
\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Ell<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}},\ IndexType>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00105\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00106\ }
\DoxyCodeLine{00117\ \ \ \ \ std::unique\_ptr<unbatch\_type>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_ac1f88db07ca3ed174ed4dd33542a635c}{create\_view\_for\_item}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ item\_id);}
\DoxyCodeLine{00118\ }
\DoxyCodeLine{00122\ \ \ \ \ std::unique\_ptr<const\ unbatch\_type>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a801ccf1a0069959a67ca3095903f4d02}{create\_const\_view\_for\_item}}(}
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ item\_id)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00130\ \ \ \ \ value\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a4eee56c8f9f6c6fb9a237f446d2aec97}{get\_values}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ values\_.get\_data();\ \}}
\DoxyCodeLine{00131\ }
\DoxyCodeLine{00139\ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a7dc0308cdbeb2963a9a2e1a7dff4bf40}{get\_const\_values}}()\ const\ noexcept}
\DoxyCodeLine{00140\ \ \ \ \ \{}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_const\_data();}
\DoxyCodeLine{00142\ \ \ \ \ \}}
\DoxyCodeLine{00143\ }
\DoxyCodeLine{00149\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_ad0cd74cd514f76bb13ecc8ad352e677e}{get\_col\_idxs}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ col\_idxs\_.get\_data();\ \}}
\DoxyCodeLine{00150\ }
\DoxyCodeLine{00158\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a60dd5ea1813a7ea042e6ee006407ead0}{get\_const\_col\_idxs}}()\ const\ noexcept}
\DoxyCodeLine{00159\ \ \ \ \ \{}
\DoxyCodeLine{00160\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ col\_idxs\_.get\_const\_data();}
\DoxyCodeLine{00161\ \ \ \ \ \}}
\DoxyCodeLine{00162\ }
\DoxyCodeLine{00169\ \ \ \ \ index\_type\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a4b7267cec4e848aa249c920733343951}{get\_num\_stored\_elements\_per\_row}}()\ const\ noexcept}
\DoxyCodeLine{00170\ \ \ \ \ \{}
\DoxyCodeLine{00171\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ num\_elems\_per\_row\_;}
\DoxyCodeLine{00172\ \ \ \ \ \}}
\DoxyCodeLine{00173\ }
\DoxyCodeLine{00181\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a95d5b7fa35f32eb3bfcaf692099e528d}{get\_num\_stored\_elements}}()\ const\ noexcept}
\DoxyCodeLine{00182\ \ \ \ \ \{}
\DoxyCodeLine{00183\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_size();}
\DoxyCodeLine{00184\ \ \ \ \ \}}
\DoxyCodeLine{00185\ }
\DoxyCodeLine{00191\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a66f9fb4a46aee82750d8ef185149d207}{get\_num\_elements\_per\_item}}()\ const\ noexcept}
\DoxyCodeLine{00192\ \ \ \ \ \{}
\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a95d5b7fa35f32eb3bfcaf692099e528d}{get\_num\_stored\_elements}}()\ /\ this-\/>get\_num\_batch\_items();}
\DoxyCodeLine{00194\ \ \ \ \ \}}
\DoxyCodeLine{00195\ }
\DoxyCodeLine{00204\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_ae03c358c869331760f55698145369e73}{get\_col\_idxs\_for\_item}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id)\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00205\ \ \ \ \ \{}
\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ col\_idxs\_.get\_data();}
\DoxyCodeLine{00208\ \ \ \ \ \}}
\DoxyCodeLine{00209\ }
\DoxyCodeLine{00217\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a3e068a9fb0d3e1476f221e0e8a1e0b74}{get\_const\_col\_idxs\_for\_item}}(}
\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00219\ \ \ \ \ \{}
\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ col\_idxs\_.get\_const\_data();}
\DoxyCodeLine{00222\ \ \ \ \ \}}
\DoxyCodeLine{00223\ }
\DoxyCodeLine{00232\ \ \ \ \ value\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_afe5c1d5d310c76b01e789428b366da70}{get\_values\_for\_item}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id)\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00233\ \ \ \ \ \{}
\DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_data()\ +}
\DoxyCodeLine{00236\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ batch\_id\ *\ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a66f9fb4a46aee82750d8ef185149d207}{get\_num\_elements\_per\_item}}();}
\DoxyCodeLine{00237\ \ \ \ \ \}}
\DoxyCodeLine{00238\ }
\DoxyCodeLine{00246\ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_aeda49f1a148d97753cf611f34d05dfd9}{get\_const\_values\_for\_item}}(}
\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00248\ \ \ \ \ \{}
\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_const\_data()\ +}
\DoxyCodeLine{00251\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ batch\_id\ *\ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a66f9fb4a46aee82750d8ef185149d207}{get\_num\_elements\_per\_item}}();}
\DoxyCodeLine{00252\ \ \ \ \ \}}
\DoxyCodeLine{00253\ }
\DoxyCodeLine{00263\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Ell>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_ac9f808ed2b9586b98f4f115576d2cd96}{create}}(}
\DoxyCodeLine{00264\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00265\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\{\},}
\DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ IndexType\ num\_elems\_per\_row\ =\ 0);}
\DoxyCodeLine{00267\ }
\DoxyCodeLine{00284\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Ell>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a64a97dc3e3bf38c071d05f7c2e2f589b}{create}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size,}
\DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ IndexType\ num\_elems\_per\_row,}
\DoxyCodeLine{00287\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values,}
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ col\_idxs);}
\DoxyCodeLine{00289\ }
\DoxyCodeLine{00295\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ InputValueType,\ \textcolor{keyword}{typename}\ ColIndexType>}
\DoxyCodeLine{00296\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}explicitly\ construct\ the\ gko::array\ arguments\ instead\ of\ passing\ "{}}}
\DoxyCodeLine{00298\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}initializer\ lists"{}})}
\DoxyCodeLine{00299\ \ \ \ \ static\ \doxymbox{\hyperlink{namespacestd}{std}}::unique\_ptr<Ell>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_ac9f808ed2b9586b98f4f115576d2cd96}{create}}(}
\DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ exec,\ const\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim}}<2>\&\ size,}
\DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ const\ IndexType\ num\_elems\_per\_row,}
\DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::initializer\_list<InputValueType>\ values,}
\DoxyCodeLine{00303\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::initializer\_list<ColIndexType>\ col\_idxs)}
\DoxyCodeLine{00304\ \ \ \ \ \{}
\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_ac9f808ed2b9586b98f4f115576d2cd96}{create}}(exec,\ size,\ num\_elems\_per\_row,}
\DoxyCodeLine{00306\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\{exec,\ std::move(values)\},}
\DoxyCodeLine{00307\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\{exec,\ std::move(col\_idxs)\});}
\DoxyCodeLine{00308\ \ \ \ \ \}}
\DoxyCodeLine{00309\ }
\DoxyCodeLine{00326\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<const\ Ell>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a43d5b93a74ccd84dc47d9a4f0a71ec44}{create\_const}}(}
\DoxyCodeLine{00327\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ sizes,}
\DoxyCodeLine{00328\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ index\_type\ num\_elems\_per\_row,}
\DoxyCodeLine{00329\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<value\_type>\&\&\ values,}
\DoxyCodeLine{00330\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<index\_type>\&\&\ col\_idxs);}
\DoxyCodeLine{00331\ }
\DoxyCodeLine{00339\ \ \ \ \ Ell*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a4f6c25b9890b7aff0bc29cd0ee98580e}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00340\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x);}
\DoxyCodeLine{00341\ }
\DoxyCodeLine{00352\ \ \ \ \ Ell*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_aa562dba4cbc912febcfda934fba5329d}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ alpha,}
\DoxyCodeLine{00353\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00354\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ beta,}
\DoxyCodeLine{00355\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x);}
\DoxyCodeLine{00356\ }
\DoxyCodeLine{00360\ \ \ \ \ \textcolor{keyword}{const}\ Ell*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a161b12af939f212c4a747766adc82123}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00361\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00362\ }
\DoxyCodeLine{00368\ \ \ \ \ \textcolor{keyword}{const}\ Ell*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_a7257cff800f7ed296d94ccf9683a2ac7}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ alpha,}
\DoxyCodeLine{00369\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00370\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ beta,}
\DoxyCodeLine{00371\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00372\ }
\DoxyCodeLine{00379\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_af146bd8371b20f5c77ba09c741c19a80}{scale}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\&\ row\_scale,}
\DoxyCodeLine{00380\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\&\ col\_scale);}
\DoxyCodeLine{00381\ }
\DoxyCodeLine{00392\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell_aa22f942ac1839ec42472c640ddd32a69}{add\_scaled\_identity}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ alpha,}
\DoxyCodeLine{00393\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ beta);}
\DoxyCodeLine{00394\ }
\DoxyCodeLine{00395\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00396\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ compute\_num\_elems(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size,}
\DoxyCodeLine{00397\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ IndexType\ num\_elems\_per\_row)}
\DoxyCodeLine{00398\ \ \ \ \ \{}
\DoxyCodeLine{00399\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ size.\doxymbox{\hyperlink{structgko_1_1batch__dim_a380f449cd6305c8baba95569627503b2}{get\_num\_batch\_items}}()\ *\ size.\doxymbox{\hyperlink{structgko_1_1batch__dim_a2e5b548457e59a551328cb10cc38a688}{get\_common\_size}}()[0]\ *}
\DoxyCodeLine{00400\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ num\_elems\_per\_row;}
\DoxyCodeLine{00401\ \ \ \ \ \}}
\DoxyCodeLine{00402\ }
\DoxyCodeLine{00403\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Ell}{Ell}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00404\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\{\},}
\DoxyCodeLine{00405\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ IndexType\ num\_elems\_per\_row\ =\ 0);}
\DoxyCodeLine{00406\ }
\DoxyCodeLine{00407\ \ \ \ \ Ell(std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size,}
\DoxyCodeLine{00408\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ IndexType\ num\_elems\_per\_row,\ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values,}
\DoxyCodeLine{00409\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ col\_idxs);}
\DoxyCodeLine{00410\ }
\DoxyCodeLine{00411\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ b,}
\DoxyCodeLine{00412\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00413\ }
\DoxyCodeLine{00414\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ alpha,}
\DoxyCodeLine{00415\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ b,}
\DoxyCodeLine{00416\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ beta,}
\DoxyCodeLine{00417\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00418\ }
\DoxyCodeLine{00419\ \ \ \ \ index\_type\ num\_elems\_per\_row\_;}
\DoxyCodeLine{00420\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values\_;}
\DoxyCodeLine{00421\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ col\_idxs\_;}
\DoxyCodeLine{00422\ \};}
\DoxyCodeLine{00423\ }
\DoxyCodeLine{00424\ }
\DoxyCodeLine{00425\ \}\ \ \textcolor{comment}{//\ namespace\ matrix}}
\DoxyCodeLine{00426\ \}\ \ \textcolor{comment}{//\ namespace\ batch}}
\DoxyCodeLine{00427\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00428\ }
\DoxyCodeLine{00429\ }
\DoxyCodeLine{00430\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_MATRIX\_BATCH\_ELL\_HPP\_}}

\end{DoxyCode}
