\doxysection{batch\+\_\+dense.\+hpp}
\hypertarget{batch__dense_8hpp_source}{}\label{batch__dense_8hpp_source}\index{ginkgo/core/matrix/batch\_dense.hpp@{ginkgo/core/matrix/batch\_dense.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\_DENSE\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_MATRIX\_BATCH\_DENSE\_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/matrix/dense.hpp>}}
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00023\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00024\ \textcolor{keyword}{namespace\ }batch\ \{}
\DoxyCodeLine{00025\ \textcolor{keyword}{namespace\ }matrix\ \{}
\DoxyCodeLine{00026\ }
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00047\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType\ =\ default\_precision>}
\DoxyCodeLine{00048\ \textcolor{keyword}{class\ }Dense\ final\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp}}<Dense<ValueType>>,}
\DoxyCodeLine{00049\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00050\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Dense<next\_precision<ValueType,\ 2>>>,}
\DoxyCodeLine{00051\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00052\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Dense<next\_precision<ValueType,\ 3>>>,}
\DoxyCodeLine{00054\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00055\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Dense<next\_precision<ValueType>>>\ \{}
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<Dense,\ \doxymbox{\hyperlink{classgko_1_1batch_1_1BatchLinOp}{BatchLinOp}}>;}
\DoxyCodeLine{00057\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Dense<\doxymbox{\hyperlink{namespacegko_a4ad20e5381a84928753efde0b2bc7f85}{to\_complex}}<ValueType>>;}
\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Dense<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType>>;}
\DoxyCodeLine{00059\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_TYPE;}
\DoxyCodeLine{00060\ }
\DoxyCodeLine{00061\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp}}<Dense>::convert\_to;}
\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp}}<Dense>::move\_to;}
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}};}
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keyword}{using\ }transposed\_type\ =\ Dense<ValueType>;}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keyword}{using\ }unbatch\_type\ =\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{gko::matrix::Dense<ValueType>}};}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keyword}{using\ }absolute\_type\ =\ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<Dense>}};}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{using\ }complex\_type\ =\ \doxymbox{\hyperlink{namespacegko_a4ad20e5381a84928753efde0b2bc7f85}{to\_complex<Dense>}};}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(Dense<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}}>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Dense<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}}>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Dense<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 2>>;}
\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Dense<next\_precision<ValueType,\ 2>>>::convert\_to;}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Dense<next\_precision<ValueType,\ 2>>>::move\_to;}
\DoxyCodeLine{00080\ }
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(Dense<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}}>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00082\ }
\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Dense<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}}>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00084\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00086\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00087\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Dense<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 3>>;}
\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Dense<next\_precision<ValueType,\ 3>>>::convert\_to;}
\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Dense<next\_precision<ValueType,\ 3>>>::move\_to;}
\DoxyCodeLine{00090\ }
\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(Dense<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}}>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00092\ }
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Dense<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}}>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00094\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00095\ }
\DoxyCodeLine{00106\ \ \ \ \ std::unique\_ptr<unbatch\_type>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a22c9b493e93ca63a0f3dcb6000e6fff6}{create\_view\_for\_item}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ item\_id);}
\DoxyCodeLine{00107\ }
\DoxyCodeLine{00111\ \ \ \ \ std::unique\_ptr<const\ unbatch\_type>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_ab906eae08119b036f2ac5a26a56b16b8}{create\_const\_view\_for\_item}}(}
\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ item\_id)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00113\ }
\DoxyCodeLine{00121\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a9a55a60161580b34da0acd6a9af1f278}{get\_cumulative\_offset}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00122\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00124\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ batch\_id\ *\ this-\/>get\_common\_size()[0]\ *}
\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>get\_common\_size()[1];}
\DoxyCodeLine{00126\ \ \ \ \ \}}
\DoxyCodeLine{00127\ }
\DoxyCodeLine{00133\ \ \ \ \ value\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a6230225be6d912b9d8f72ade4a098c48}{get\_values}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ values\_.get\_data();\ \}}
\DoxyCodeLine{00134\ }
\DoxyCodeLine{00142\ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_af89bd9c5040ed7dd79cfd112d853b2b1}{get\_const\_values}}()\ const\ noexcept}
\DoxyCodeLine{00143\ \ \ \ \ \{}
\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_const\_data();}
\DoxyCodeLine{00145\ \ \ \ \ \}}
\DoxyCodeLine{00146\ }
\DoxyCodeLine{00158\ \ \ \ \ value\_type\&\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_ac0004ba648096ee1769c51b8b4c2b367}{at}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ col)}
\DoxyCodeLine{00159\ \ \ \ \ \{}
\DoxyCodeLine{00160\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00161\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_data()[linearize\_index(batch\_id,\ row,\ col)];}
\DoxyCodeLine{00162\ \ \ \ \ \}}
\DoxyCodeLine{00163\ }
\DoxyCodeLine{00167\ \ \ \ \ value\_type\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a699398ed2e99ce8224ec2fc9fb6d2069}{at}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ col)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00168\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00170\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_const\_data()[linearize\_index(batch\_id,\ row,\ col)];}
\DoxyCodeLine{00171\ \ \ \ \ \}}
\DoxyCodeLine{00172\ }
\DoxyCodeLine{00187\ \ \ \ \ ValueType\&\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_aa13885ff00e2bfb233bf475556fc4b0a}{at}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ idx)\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00188\ \ \ \ \ \{}
\DoxyCodeLine{00189\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00190\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_data()[linearize\_index(batch\_id,\ idx)];}
\DoxyCodeLine{00191\ \ \ \ \ \}}
\DoxyCodeLine{00192\ }
\DoxyCodeLine{00196\ \ \ \ \ ValueType\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_ae7394aa20cd43578c691995b81516939}{at}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ idx)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00197\ \ \ \ \ \{}
\DoxyCodeLine{00198\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_const\_data()[linearize\_index(batch\_id,\ idx)];}
\DoxyCodeLine{00200\ \ \ \ \ \}}
\DoxyCodeLine{00201\ }
\DoxyCodeLine{00210\ \ \ \ \ value\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_abe0a01ab85963a20386e6ca2c064b582}{get\_values\_for\_item}}(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id)\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00211\ \ \ \ \ \{}
\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_data()\ +\ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a9a55a60161580b34da0acd6a9af1f278}{get\_cumulative\_offset}}(batch\_id);}
\DoxyCodeLine{00214\ \ \ \ \ \}}
\DoxyCodeLine{00215\ }
\DoxyCodeLine{00223\ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_afb7ed5a66d88dcd971128089422a3672}{get\_const\_values\_for\_item}}(}
\DoxyCodeLine{00224\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch\_id)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00225\ \ \ \ \ \{}
\DoxyCodeLine{00226\ \ \ \ \ \ \ \ \ GKO\_ASSERT(batch\_id\ <\ this-\/>get\_num\_batch\_items());}
\DoxyCodeLine{00227\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_const\_data()\ +\ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a9a55a60161580b34da0acd6a9af1f278}{get\_cumulative\_offset}}(batch\_id);}
\DoxyCodeLine{00228\ \ \ \ \ \}}
\DoxyCodeLine{00229\ }
\DoxyCodeLine{00237\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_ad8eb22005182873bb825f480d433a155}{get\_num\_stored\_elements}}()\ const\ noexcept}
\DoxyCodeLine{00238\ \ \ \ \ \{}
\DoxyCodeLine{00239\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_size();}
\DoxyCodeLine{00240\ \ \ \ \ \}}
\DoxyCodeLine{00241\ }
\DoxyCodeLine{00247\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a1711cd053116a336e16953af10fcf8c8}{get\_num\_elements\_per\_item}}()\ const\ noexcept}
\DoxyCodeLine{00248\ \ \ \ \ \{}
\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_ad8eb22005182873bb825f480d433a155}{get\_num\_stored\_elements}}()\ /\ this-\/>get\_num\_batch\_items();}
\DoxyCodeLine{00250\ \ \ \ \ \}}
\DoxyCodeLine{00251\ }
\DoxyCodeLine{00260\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Dense>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_aab5c2438bd15c76b499b86de2ca4507a}{create}}(}
\DoxyCodeLine{00261\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00262\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\{\});}
\DoxyCodeLine{00263\ }
\DoxyCodeLine{00278\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Dense>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a1435a7379f4af08f142eb2a3155e5afc}{create}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size,}
\DoxyCodeLine{00280\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values);}
\DoxyCodeLine{00281\ }
\DoxyCodeLine{00286\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ InputValueType>}
\DoxyCodeLine{00287\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}explicitly\ construct\ the\ gko::array\ argument\ instead\ of\ passing\ an"{}}}
\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}initializer\ list"{}})}
\DoxyCodeLine{00290\ \ \ \ \ static\ \doxymbox{\hyperlink{namespacestd}{std}}::unique\_ptr<Dense>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_aab5c2438bd15c76b499b86de2ca4507a}{create}}(}
\DoxyCodeLine{00291\ \ \ \ \ \ \ \ \ \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{00292\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::initializer\_list<InputValueType>\ values)}
\DoxyCodeLine{00293\ \ \ \ \ \{}
\DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_aab5c2438bd15c76b499b86de2ca4507a}{create}}(exec,\ size,\ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\{exec,\ std::move(values)\});}
\DoxyCodeLine{00295\ \ \ \ \ \}}
\DoxyCodeLine{00296\ }
\DoxyCodeLine{00311\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<const\ Dense>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_ab9a2a2cdc6319b4d4bcbdacdbac35fe4}{create\_const}}(}
\DoxyCodeLine{00312\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ sizes,}
\DoxyCodeLine{00313\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<ValueType>\&\&\ values);}
\DoxyCodeLine{00314\ }
\DoxyCodeLine{00322\ \ \ \ \ Dense*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a62bcdc87d7cc6ec7672f54cbedd55aff}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00323\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x);}
\DoxyCodeLine{00324\ }
\DoxyCodeLine{00335\ \ \ \ \ Dense*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_adf941f38aa93727796d9d1f0abbb755f}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ alpha,}
\DoxyCodeLine{00336\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00337\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ beta,}
\DoxyCodeLine{00338\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x);}
\DoxyCodeLine{00339\ }
\DoxyCodeLine{00343\ \ \ \ \ \textcolor{keyword}{const}\ Dense*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a4312bd8ce39e24a2ce6230ff5fdc4a83}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00344\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00345\ }
\DoxyCodeLine{00351\ \ \ \ \ \textcolor{keyword}{const}\ Dense*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_adbb4ad11cea3ffc2aaeebf8e726e92c0}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ alpha,}
\DoxyCodeLine{00352\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00353\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ beta,}
\DoxyCodeLine{00354\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00355\ }
\DoxyCodeLine{00362\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a964f12513ce49375e6e35a2d70bd5dd5}{scale}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\&\ row\_scale,}
\DoxyCodeLine{00363\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\&\ col\_scale);}
\DoxyCodeLine{00364\ }
\DoxyCodeLine{00373\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_ad4434699a5858fb5fff0b478cca0c753}{scale\_add}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ alpha,}
\DoxyCodeLine{00374\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense}{batch::matrix::Dense<value\_type>}}>\ b);}
\DoxyCodeLine{00375\ }
\DoxyCodeLine{00384\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_ace47e041c2848a059439ecc5b96c2810}{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{00385\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ beta);}
\DoxyCodeLine{00386\ }
\DoxyCodeLine{00387\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00388\ \ \ \ \ \textcolor{keyword}{inline}\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ compute\_num\_elems(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size)}
\DoxyCodeLine{00389\ \ \ \ \ \{}
\DoxyCodeLine{00390\ \ \ \ \ \ \ \ \ \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{00391\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ size.\doxymbox{\hyperlink{structgko_1_1batch__dim_a2e5b548457e59a551328cb10cc38a688}{get\_common\_size}}()[1];}
\DoxyCodeLine{00392\ \ \ \ \ \}}
\DoxyCodeLine{00393\ }
\DoxyCodeLine{00394\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense}{Dense}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00395\ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\{\});}
\DoxyCodeLine{00396\ }
\DoxyCodeLine{00397\ \ \ \ \ Dense(std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size,}
\DoxyCodeLine{00398\ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values);}
\DoxyCodeLine{00399\ }
\DoxyCodeLine{00400\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ b,}
\DoxyCodeLine{00401\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00402\ }
\DoxyCodeLine{00403\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ alpha,}
\DoxyCodeLine{00404\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ b,}
\DoxyCodeLine{00405\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ beta,}
\DoxyCodeLine{00406\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00407\ }
\DoxyCodeLine{00408\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ linearize\_index(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ row,}
\DoxyCodeLine{00409\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ col)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00410\ \ \ \ \ \{}
\DoxyCodeLine{00411\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>\doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Dense_a9a55a60161580b34da0acd6a9af1f278}{get\_cumulative\_offset}}(batch)\ +}
\DoxyCodeLine{00412\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ row\ *\ this-\/>get\_size().get\_common\_size()[1]\ +\ col;}
\DoxyCodeLine{00413\ \ \ \ \ \}}
\DoxyCodeLine{00414\ }
\DoxyCodeLine{00415\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ linearize\_index(\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ batch,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ idx)\ \textcolor{keyword}{const}\ \textcolor{keyword}{noexcept}}
\DoxyCodeLine{00416\ \ \ \ \ \{}
\DoxyCodeLine{00417\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ linearize\_index(batch,\ idx\ /\ this-\/>get\_common\_size()[1],}
\DoxyCodeLine{00418\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ idx\ \%\ this-\/>get\_common\_size()[1]);}
\DoxyCodeLine{00419\ \ \ \ \ \}}
\DoxyCodeLine{00420\ }
\DoxyCodeLine{00421\ \ \ \ \ array<value\_type>\ values\_;}
\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\_DENSE\_HPP\_}}

\end{DoxyCode}
