\doxysection{sparsity\+\_\+csr.\+hpp}
\hypertarget{sparsity__csr_8hpp_source}{}\label{sparsity__csr_8hpp_source}\index{ginkgo/core/matrix/sparsity\_csr.hpp@{ginkgo/core/matrix/sparsity\_csr.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\_SPARSITY\_CSR\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_MATRIX\_SPARSITY\_CSR\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <vector>}}
\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/base/polymorphic\_object.hpp>}}
\DoxyCodeLine{00014\ }
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00017\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}}\ \{}
\DoxyCodeLine{00018\ }
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00021\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}};}
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType>}
\DoxyCodeLine{00025\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense}};}
\DoxyCodeLine{00026\ }
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00029\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Fbcsr}{Fbcsr}};}
\DoxyCodeLine{00030\ }
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00050\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType\ =\ default\_precision,\ \textcolor{keyword}{typename}\ IndexType\ =\ \textcolor{keywordtype}{int}32>}
\DoxyCodeLine{00051\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<SparsityCsr<ValueType,\ IndexType>>,}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Csr<ValueType,\ IndexType>>,}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Dense<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_1Transposable}{Transposable}}\ \{}
\DoxyCodeLine{00057\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<\doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}},\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}>;}
\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}}<ValueType,\ IndexType>;}
\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_1Fbcsr}{Fbcsr}}<ValueType,\ IndexType>;}
\DoxyCodeLine{00061\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_AND\_INDEX\_TYPE;}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00063\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<\doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}>::convert\_to;}
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<\doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}>::move\_to;}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}>::convert\_to;}
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}>::move\_to;}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}>::convert\_to;}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}>::move\_to;}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{ReadableFromMatrixData}}<ValueType,\ IndexType>::read;}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ IndexType;}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keyword}{using\ }transposed\_type\ =\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr<IndexType,\ ValueType>}};}
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keyword}{using\ }mat\_data\ =\ \doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\_data<ValueType,\ IndexType>}};}
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keyword}{using\ }device\_mat\_data\ =\ \doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\_matrix\_data<ValueType,\ IndexType>}};}
\DoxyCodeLine{00077\ }
\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00079\ }
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00081\ }
\DoxyCodeLine{00082\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00083\ }
\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00086\ \ \ \ \ \textcolor{keywordtype}{void}\ read(\textcolor{keyword}{const}\ mat\_data\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00087\ }
\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keywordtype}{void}\ read(\textcolor{keyword}{const}\ device\_mat\_data\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00089\ }
\DoxyCodeLine{00090\ \ \ \ \ \textcolor{keywordtype}{void}\ read(device\_mat\_data\&\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keywordtype}{void}\ write(mat\_data\&\ data)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00093\ }
\DoxyCodeLine{00094\ \ \ \ \ std::unique\_ptr<LinOp>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_aa724de1605232ebbe459761d3dfda7df}{transpose}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00095\ }
\DoxyCodeLine{00096\ \ \ \ \ std::unique\_ptr<LinOp>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_afda5b4823e98e847e8e4bfd867751b71}{conj\_transpose}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00097\ }
\DoxyCodeLine{00107\ \ \ \ \ std::unique\_ptr<SparsityCsr>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a10586060e6ae3ddf6a500611da2a6c8c}{to\_adjacency\_matrix}}()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00108\ }
\DoxyCodeLine{00112\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_ada754f69e64b81679d1b65df27810d07}{sort\_by\_column\_index}}();}
\DoxyCodeLine{00113\ }
\DoxyCodeLine{00114\ \ \ \ \ \textcolor{comment}{/*}}
\DoxyCodeLine{00115\ \textcolor{comment}{\ \ \ \ \ *\ Tests\ if\ all\ col\_idxs\ are\ sorted\ by\ column\ index}}
\DoxyCodeLine{00116\ \textcolor{comment}{\ \ \ \ \ *}}
\DoxyCodeLine{00117\ \textcolor{comment}{\ \ \ \ \ *\ @returns\ True\ if\ all\ col\_idxs\ are\ sorted.}}
\DoxyCodeLine{00118\ \textcolor{comment}{\ \ \ \ \ */}}
\DoxyCodeLine{00119\ \ \ \ \ \textcolor{keywordtype}{bool}\ is\_sorted\_by\_column\_index()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00126\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a16e851750eb5a1b6b154724b76102d91}{get\_col\_idxs}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ col\_idxs\_.get\_data();\ \}}
\DoxyCodeLine{00127\ }
\DoxyCodeLine{00135\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a75f5cf227f3d28116e6c2ffc96c0e3f1}{get\_const\_col\_idxs}}()\ const\ noexcept}
\DoxyCodeLine{00136\ \ \ \ \ \{}
\DoxyCodeLine{00137\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ col\_idxs\_.get\_const\_data();}
\DoxyCodeLine{00138\ \ \ \ \ \}}
\DoxyCodeLine{00139\ }
\DoxyCodeLine{00145\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_acc4686d5826536c691e1e5322cc055ee}{get\_row\_ptrs}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ row\_ptrs\_.get\_data();\ \}}
\DoxyCodeLine{00146\ }
\DoxyCodeLine{00154\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a91ab9f90686bd3a0b25c94d3a39efc5d}{get\_const\_row\_ptrs}}()\ const\ noexcept}
\DoxyCodeLine{00155\ \ \ \ \ \{}
\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ row\_ptrs\_.get\_const\_data();}
\DoxyCodeLine{00157\ \ \ \ \ \}}
\DoxyCodeLine{00158\ }
\DoxyCodeLine{00164\ \ \ \ \ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_afd34ea8d2dd36fbe7759ba1d680732ce}{get\_value}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ value\_.get\_data();\ \}}
\DoxyCodeLine{00165\ }
\DoxyCodeLine{00173\ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_abb91e6ca00a4778e855cf6aeafe8f102}{get\_const\_value}}()\ const\ noexcept}
\DoxyCodeLine{00174\ \ \ \ \ \{}
\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ value\_.get\_const\_data();}
\DoxyCodeLine{00176\ \ \ \ \ \}}
\DoxyCodeLine{00177\ }
\DoxyCodeLine{00183\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_ab21b21608859367a49311f941b10ddd6}{get\_num\_nonzeros}}()\ const\ noexcept\ \{\ \textcolor{keywordflow}{return}\ col\_idxs\_.get\_size();\ \}}
\DoxyCodeLine{00184\ }
\DoxyCodeLine{00192\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<SparsityCsr>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_af3b8c555c1350a5dc9f33688d769ee50}{create}}(}
\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\{\},}
\DoxyCodeLine{00194\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_nonzeros\ =\ \{\});}
\DoxyCodeLine{00195\ }
\DoxyCodeLine{00215\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<SparsityCsr>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a0fd936bd502e00c49376761f7431a098}{create}}(}
\DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ col\_idxs,\ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ row\_ptrs,}
\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ value\_type\ value\ =\ \doxymbox{\hyperlink{namespacegko_a0059e27f8f4bc348ff65c1e60caf47c8}{one<ValueType>}}());}
\DoxyCodeLine{00219\ }
\DoxyCodeLine{00225\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ColIndexType,\ \textcolor{keyword}{typename}\ RowPtrType>}
\DoxyCodeLine{00226\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{00227\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}explicitly\ construct\ the\ gko::array\ argument\ instead\ of\ passing\ "{}}}
\DoxyCodeLine{00228\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}initializer\ lists"{}})}
\DoxyCodeLine{00229\ \ \ \ \ static\ \doxymbox{\hyperlink{namespacestd}{std}}::unique\_ptr<\doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_af3b8c555c1350a5dc9f33688d769ee50}{create}}(}
\DoxyCodeLine{00230\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ exec,\ const\ \doxymbox{\hyperlink{structgko_1_1dim}{dim}}<2>\&\ size,}
\DoxyCodeLine{00231\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::initializer\_list<ColIndexType>\ col\_idxs,}
\DoxyCodeLine{00232\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::initializer\_list<RowPtrType>\ row\_ptrs,}
\DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ value\_type\ value\ =\ \doxymbox{\hyperlink{namespacegko_a0059e27f8f4bc348ff65c1e60caf47c8}{one}}<ValueType>())}
\DoxyCodeLine{00234\ \ \ \ \ \{}
\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_af3b8c555c1350a5dc9f33688d769ee50}{create}}(exec,\ size,\ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\{exec,\ std::move(col\_idxs)\},}
\DoxyCodeLine{00236\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\{exec,\ std::move(row\_ptrs)\},\ value);}
\DoxyCodeLine{00237\ \ \ \ \ \}}
\DoxyCodeLine{00238\ }
\DoxyCodeLine{00246\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<SparsityCsr>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_ad0ae4f845f7e3730abcb47b9df991cb4}{create}}(}
\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00248\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ LinOp>\ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}});}
\DoxyCodeLine{00249\ }
\DoxyCodeLine{00263\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<const\ SparsityCsr>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_af741e8f6ed23720b65c5aa43068a69d9}{create\_const}}(}
\DoxyCodeLine{00264\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00265\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<IndexType>\&\&\ col\_idxs,}
\DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<IndexType>\&\&\ row\_ptrs,}
\DoxyCodeLine{00267\ \ \ \ \ \ \ \ \ ValueType\ value\ =\ \doxymbox{\hyperlink{namespacegko_a0059e27f8f4bc348ff65c1e60caf47c8}{one<ValueType>}}())}
\DoxyCodeLine{00268\ \ \ \ \ \{}
\DoxyCodeLine{00269\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ cast\ const-\/ness\ away,\ but\ return\ a\ const\ object\ afterwards,}}
\DoxyCodeLine{00270\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ so\ we\ can\ ensure\ that\ no\ modifications\ take\ place.}}
\DoxyCodeLine{00271\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::unique\_ptr<const\ SparsityCsr>(\textcolor{keyword}{new}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}\{}
\DoxyCodeLine{00272\ \ \ \ \ \ \ \ \ \ \ \ \ exec,\ size,\ gko::detail::array\_const\_cast(std::move(col\_idxs)),}
\DoxyCodeLine{00273\ \ \ \ \ \ \ \ \ \ \ \ \ gko::detail::array\_const\_cast(std::move(row\_ptrs)),\ value\});}
\DoxyCodeLine{00274\ \ \ \ \ \}}
\DoxyCodeLine{00275\ }
\DoxyCodeLine{00280\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}\&\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a125b13b63dba6d32ce23607271c7ed52}{operator=}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}\&);}
\DoxyCodeLine{00281\ }
\DoxyCodeLine{00287\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}\&\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a116f0326dcd149883f91f5f5aa183d12}{operator=}}(\doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}\&\&);}
\DoxyCodeLine{00288\ }
\DoxyCodeLine{00293\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}\&);}
\DoxyCodeLine{00294\ }
\DoxyCodeLine{00300\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a41cd2d71fe4471517865b3baa5a5b5b5}{SparsityCsr}}(\doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}\&\&);}
\DoxyCodeLine{00301\ }
\DoxyCodeLine{00302\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00303\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00304\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\{\},\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_nonzeros\ =\ \{\});}
\DoxyCodeLine{00305\ }
\DoxyCodeLine{00306\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}(std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00307\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ col\_idxs,\ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ row\_ptrs,}
\DoxyCodeLine{00308\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value\_type\ value\ =\ \doxymbox{\hyperlink{namespacegko_a0059e27f8f4bc348ff65c1e60caf47c8}{one<ValueType>}}());}
\DoxyCodeLine{00309\ }
\DoxyCodeLine{00310\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1SparsityCsr_a67adb9f857dce1577325a1cf8fd67a92}{SparsityCsr}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00311\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ LinOp>\ \doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}});}
\DoxyCodeLine{00312\ }
\DoxyCodeLine{00313\ \ \ \ \ \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{00314\ }
\DoxyCodeLine{00315\ \ \ \ \ \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{00316\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00317\ }
\DoxyCodeLine{00318\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00319\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ col\_idxs\_;}
\DoxyCodeLine{00320\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ row\_ptrs\_;}
\DoxyCodeLine{00321\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ value\_;}
\DoxyCodeLine{00322\ \};}
\DoxyCodeLine{00323\ }
\DoxyCodeLine{00324\ }
\DoxyCodeLine{00325\ \}\ \ \textcolor{comment}{//\ namespace\ matrix}}
\DoxyCodeLine{00326\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00327\ }
\DoxyCodeLine{00328\ }
\DoxyCodeLine{00329\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_MATRIX\_SPARSITY\_CSR\_HPP\_}}

\end{DoxyCode}
