\doxysection{row\+\_\+gatherer.\+hpp}
\hypertarget{matrix_2row__gatherer_8hpp_source}{}\label{matrix_2row__gatherer_8hpp_source}\index{ginkgo/core/matrix/row\_gatherer.hpp@{ginkgo/core/matrix/row\_gatherer.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//\ SPDX-\/FileCopyrightText:\ 2017\ -\/\ 2024\ 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\_ROW\_GATHERER\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_MATRIX\_ROW\_GATHERER\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <algorithm>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <memory>}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <numeric>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{00013\ }
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/array.hpp>}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/exception.hpp>}}
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/exception\_helpers.hpp>}}
\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/executor.hpp>}}
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/lin\_op.hpp>}}
\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/types.hpp>}}
\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/utils.hpp>}}
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00023\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00024\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}}\ \{}
\DoxyCodeLine{00025\ }
\DoxyCodeLine{00026\ }
\DoxyCodeLine{00042\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ IndexType\ =\ \textcolor{keywordtype}{int}32>}
\DoxyCodeLine{00043\ \textcolor{keyword}{class\ }RowGatherer\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<RowGatherer<IndexType>>\ \{}
\DoxyCodeLine{00044\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<RowGatherer,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}>;}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00047\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ IndexType;}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00054\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a568e008a494699c223007ed604f074f0}{get\_row\_idxs}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ row\_idxs\_.get\_data();\ \}}
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a7e1b17b5caabafd58539cc8f3f0301fe}{get\_const\_row\_idxs}}()\ const\ noexcept}
\DoxyCodeLine{00064\ \ \ \ \ \{}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ row\_idxs\_.get\_const\_data();}
\DoxyCodeLine{00066\ \ \ \ \ \}}
\DoxyCodeLine{00067\ }
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<RowGatherer>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a71f9833fd87716ef40fa3752e18cb0bb}{create}}(}
\DoxyCodeLine{00077\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size\ =\ \{\});}
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<RowGatherer>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a8a23741b1f476465d39575a17442538c}{create}}(}
\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ row\_idxs);}
\DoxyCodeLine{00096\ }
\DoxyCodeLine{00107\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<const\ RowGatherer>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer_a2abebd9fb8075150a71a0d0241a8040d}{create\_const}}(}
\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<IndexType>\&\&\ row\_idxs);}
\DoxyCodeLine{00110\ }
\DoxyCodeLine{00111\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00112\ \ \ \ \ RowGatherer(std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size\ =\ \{\});}
\DoxyCodeLine{00113\ }
\DoxyCodeLine{00114\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1matrix_1_1RowGatherer}{RowGatherer}}(std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ row\_idxs);}
\DoxyCodeLine{00116\ }
\DoxyCodeLine{00117\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ in,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ out)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00118\ }
\DoxyCodeLine{00119\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ alpha,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ in,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ beta,}
\DoxyCodeLine{00120\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ out)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00121\ }
\DoxyCodeLine{00122\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00123\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{gko::array<index\_type>}}\ row\_idxs\_;}
\DoxyCodeLine{00124\ \};}
\DoxyCodeLine{00125\ }
\DoxyCodeLine{00126\ }
\DoxyCodeLine{00127\ \}\ \ \textcolor{comment}{//\ namespace\ matrix}}
\DoxyCodeLine{00128\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00129\ }
\DoxyCodeLine{00130\ }
\DoxyCodeLine{00131\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_MATRIX\_ROW\_GATHERER\_HPP\_}}

\end{DoxyCode}
