\doxysection{diagonal.\+hpp}
\hypertarget{diagonal_8hpp_source}{}\label{diagonal_8hpp_source}\index{ginkgo/core/matrix/diagonal.hpp@{ginkgo/core/matrix/diagonal.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\_DIAGONAL\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_MATRIX\_DIAGONAL\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/array.hpp>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/lin\_op.hpp>}}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00014\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}}\ \{}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00018\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}};}
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType>}
\DoxyCodeLine{00021\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense}};}
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00039\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType\ =\ default\_precision>}
\DoxyCodeLine{00040\ \textcolor{keyword}{class\ }Diagonal}
\DoxyCodeLine{00041\ \ \ \ \ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<Diagonal<ValueType>>,}
\DoxyCodeLine{00042\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Csr<ValueType,\ int32>>,}
\DoxyCodeLine{00043\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Csr<ValueType,\ int64>>,}
\DoxyCodeLine{00044\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Diagonal<next\_precision<ValueType>>>,}
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00046\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Diagonal<next\_precision<ValueType,\ 2>>>,}
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00048\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00049\ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Diagonal<next\_precision<ValueType,\ 3>>>,}
\DoxyCodeLine{00050\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1Transposable}{Transposable}},}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData}{WritableToMatrixData}}<ValueType,\ int32>,}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData}{WritableToMatrixData}}<ValueType,\ int64>,}
\DoxyCodeLine{00054\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{ReadableFromMatrixData}}<ValueType,\ int32>,}
\DoxyCodeLine{00055\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{ReadableFromMatrixData}}<ValueType,\ int64>,}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1EnableAbsoluteComputation}{EnableAbsoluteComputation}}<remove\_complex<Diagonal<ValueType>>>\ \{}
\DoxyCodeLine{00057\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<Diagonal,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}>;}
\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}}<ValueType,\ \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}}>;}
\DoxyCodeLine{00059\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}}<ValueType,\ \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}}>;}
\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Diagonal<\doxymbox{\hyperlink{namespacegko_a4ad20e5381a84928753efde0b2bc7f85}{to\_complex}}<ValueType>>;}
\DoxyCodeLine{00061\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_TYPE;}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00063\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<Diagonal>::convert\_to;}
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<Diagonal>::move\_to;}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ int32>}}>::convert\_to;}
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ int32>}}>::move\_to;}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ int64>}}>::convert\_to;}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ int64>}}>::move\_to;}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Diagonal<next\_precision<ValueType>>>::convert\_to;}
\DoxyCodeLine{00071\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Diagonal<next\_precision<ValueType>>>::move\_to;}
\DoxyCodeLine{00072\ }
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}};}
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keyword}{using\ }mat\_data\ =\ \doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\_data<ValueType,\ int64>}};}
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keyword}{using\ }mat\_data32\ =\ \doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\_data<ValueType,\ int32>}};}
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keyword}{using\ }device\_mat\_data\ =\ \doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\_matrix\_data<ValueType,\ int64>}};}
\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keyword}{using\ }device\_mat\_data32\ =\ \doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\_matrix\_data<ValueType,\ int32>}};}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keyword}{using\ }absolute\_type\ =\ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<Diagonal>}};}
\DoxyCodeLine{00080\ }
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Diagonal<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType>>;}
\DoxyCodeLine{00082\ }
\DoxyCodeLine{00083\ \ \ \ \ std::unique\_ptr<LinOp>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_ae4bd12983de99205e870adf707d5f4d8}{transpose}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00085\ \ \ \ \ std::unique\_ptr<LinOp>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a52d222e0925ab14ba3bb5d4842c49c68}{conj\_transpose}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00086\ }
\DoxyCodeLine{00087\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(Diagonal<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}}>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Diagonal<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}}>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00090\ }
\DoxyCodeLine{00091\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Diagonal<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 2>>;}
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Diagonal<next\_precision<ValueType,\ 2>>>::convert\_to;}
\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Diagonal<next\_precision<ValueType,\ 2>>>::move\_to;}
\DoxyCodeLine{00095\ }
\DoxyCodeLine{00096\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(}
\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ Diagonal<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}}>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00098\ }
\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Diagonal<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}}>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00100\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Diagonal<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 3>>;}
\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Diagonal<next\_precision<ValueType,\ 3>>>::convert\_to;}
\DoxyCodeLine{00105\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Diagonal<next\_precision<ValueType,\ 3>>>::move\_to;}
\DoxyCodeLine{00106\ }
\DoxyCodeLine{00107\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(}
\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ Diagonal<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}}>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00109\ }
\DoxyCodeLine{00110\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Diagonal<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}}>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00111\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00112\ }
\DoxyCodeLine{00113\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ int32>}}*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00114\ }
\DoxyCodeLine{00115\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ int32>}}*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00116\ }
\DoxyCodeLine{00117\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ int64>}}*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00118\ }
\DoxyCodeLine{00119\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ int64>}}*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00121\ \ \ \ \ std::unique\_ptr<absolute\_type>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_aa94ce42bd04297ff98bf88fe781bb49b}{compute\_absolute}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00122\ }
\DoxyCodeLine{00123\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_ad349aae97a96df89ce2497657c774db7}{compute\_absolute\_inplace}}()\ \textcolor{keyword}{override};}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00130\ \ \ \ \ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a521c439edd75040c6ac61c63c812fb97}{get\_values}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ values\_.get\_data();\ \}}
\DoxyCodeLine{00131\ }
\DoxyCodeLine{00139\ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_ac52112af9277e2348bbeb984ab7bba0d}{get\_const\_values}}()\ const\ noexcept}
\DoxyCodeLine{00140\ \ \ \ \ \{}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_const\_data();}
\DoxyCodeLine{00142\ \ \ \ \ \}}
\DoxyCodeLine{00143\ }
\DoxyCodeLine{00151\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a1b0ac09acf678b127602191f20477cdc}{rapply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<const\ LinOp>}}\ b,\ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<LinOp>}}\ x)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00152\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00153\ \ \ \ \ \ \ \ \ GKO\_ASSERT\_REVERSE\_CONFORMANT(\textcolor{keyword}{this},\ b);}
\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ GKO\_ASSERT\_EQUAL\_ROWS(b,\ x);}
\DoxyCodeLine{00155\ \ \ \ \ \ \ \ \ GKO\_ASSERT\_EQUAL\_COLS(\textcolor{keyword}{this},\ x);}
\DoxyCodeLine{00156\ }
\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ this-\/>rapply\_impl(b.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}(),\ x.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}());}
\DoxyCodeLine{00158\ \ \ \ \ \}}
\DoxyCodeLine{00159\ }
\DoxyCodeLine{00169\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a35de90f46460a480ccb780b17ac5d1d7}{inverse\_apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<const\ LinOp>}}\ b,\ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<LinOp>}}\ x)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00170\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00171\ \ \ \ \ \ \ \ \ GKO\_ASSERT\_CONFORMANT(\textcolor{keyword}{this},\ b);}
\DoxyCodeLine{00172\ \ \ \ \ \ \ \ \ GKO\_ASSERT\_EQUAL\_ROWS(b,\ x);}
\DoxyCodeLine{00173\ \ \ \ \ \ \ \ \ GKO\_ASSERT\_EQUAL\_ROWS(\textcolor{keyword}{this},\ x);}
\DoxyCodeLine{00174\ }
\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ this-\/>inverse\_apply\_impl(b.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}(),\ x.\doxymbox{\hyperlink{classgko_1_1ptr__param_ad1245c2636fdba26d3a3fab9fec5e068}{get}}());}
\DoxyCodeLine{00176\ \ \ \ \ \}}
\DoxyCodeLine{00177\ }
\DoxyCodeLine{00178\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_abc58509ecdcb48399e12f9a081ed7545}{read}}(\textcolor{keyword}{const}\ mat\_data\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00179\ }
\DoxyCodeLine{00180\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_abc58509ecdcb48399e12f9a081ed7545}{read}}(\textcolor{keyword}{const}\ mat\_data32\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00181\ }
\DoxyCodeLine{00182\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_abc58509ecdcb48399e12f9a081ed7545}{read}}(\textcolor{keyword}{const}\ device\_mat\_data\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00183\ }
\DoxyCodeLine{00184\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_abc58509ecdcb48399e12f9a081ed7545}{read}}(\textcolor{keyword}{const}\ device\_mat\_data32\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00185\ }
\DoxyCodeLine{00186\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_abc58509ecdcb48399e12f9a081ed7545}{read}}(device\_mat\_data\&\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00187\ }
\DoxyCodeLine{00188\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_abc58509ecdcb48399e12f9a081ed7545}{read}}(device\_mat\_data32\&\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00189\ }
\DoxyCodeLine{00190\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_af82d8f7795fefcf5f38a38895e316c02}{write}}(mat\_data\&\ data)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00191\ }
\DoxyCodeLine{00192\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{namespacegko_af82d8f7795fefcf5f38a38895e316c02}{write}}(mat\_data32\&\ data)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00193\ }
\DoxyCodeLine{00202\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Diagonal>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a319ca63549f8ef7acebf666a0663c15d}{create}}(}
\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ size\ =\ 0);}
\DoxyCodeLine{00204\ }
\DoxyCodeLine{00219\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Diagonal>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a7ea54d3f274958d52e2c78634fa0cdbc}{create}}(}
\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ size,}
\DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values);}
\DoxyCodeLine{00222\ }
\DoxyCodeLine{00227\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ InputValueType>}
\DoxyCodeLine{00228\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{00229\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}explicitly\ construct\ the\ gko::array\ argument\ instead\ of\ passing\ an"{}}}
\DoxyCodeLine{00230\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}initializer\ list"{}})}
\DoxyCodeLine{00231\ \ \ \ \ static\ \doxymbox{\hyperlink{namespacestd}{std}}::unique\_ptr<Diagonal>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a319ca63549f8ef7acebf666a0663c15d}{create}}(}
\DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ exec,\ const\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ size,}
\DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::initializer\_list<InputValueType>\ values)}
\DoxyCodeLine{00234\ \ \ \ \ \{}
\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a319ca63549f8ef7acebf666a0663c15d}{create}}(exec,\ size,\ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\{exec,\ std::move(values)\});}
\DoxyCodeLine{00236\ \ \ \ \ \}}
\DoxyCodeLine{00237\ }
\DoxyCodeLine{00248\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<const\ Diagonal>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a0d20f0d945dc504e4a39e434c3b5a185}{create\_const}}(}
\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ size,}
\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<ValueType>\&\&\ values);}
\DoxyCodeLine{00251\ }
\DoxyCodeLine{00252\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00253\ \ \ \ \ Diagonal(std::shared\_ptr<const\ Executor>\ exec,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ size\ =\ 0);}
\DoxyCodeLine{00254\ }
\DoxyCodeLine{00255\ \ \ \ \ Diagonal(std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ size,}
\DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values);}
\DoxyCodeLine{00257\ }
\DoxyCodeLine{00258\ \ \ \ \ \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{00259\ }
\DoxyCodeLine{00260\ \ \ \ \ \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{00261\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00262\ }
\DoxyCodeLine{00263\ \ \ \ \ \textcolor{keywordtype}{void}\ rapply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ b,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00264\ }
\DoxyCodeLine{00265\ \ \ \ \ \textcolor{keywordtype}{void}\ inverse\_apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ b,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00266\ }
\DoxyCodeLine{00267\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00268\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values\_;}
\DoxyCodeLine{00269\ \};}
\DoxyCodeLine{00270\ }
\DoxyCodeLine{00271\ }
\DoxyCodeLine{00272\ \}\ \ \textcolor{comment}{//\ namespace\ matrix}}
\DoxyCodeLine{00273\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00274\ }
\DoxyCodeLine{00275\ }
\DoxyCodeLine{00276\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_MATRIX\_DIAGONAL\_HPP\_}}

\end{DoxyCode}
