\doxysection{nested\+\_\+dissection.\+hpp}
\hypertarget{nested__dissection_8hpp_source}{}\label{nested__dissection_8hpp_source}\index{ginkgo/core/reorder/nested\_dissection.hpp@{ginkgo/core/reorder/nested\_dissection.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\_REORDER\_NESTED\_DISSECTION\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_REORDER\_NESTED\_DISSECTION\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <ginkgo/config.hpp>}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#if\ GKO\_HAVE\_METIS}}
\DoxyCodeLine{00013\ }
\DoxyCodeLine{00014\ }
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <memory>}}
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <unordered\_map>}}
\DoxyCodeLine{00017\ }
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/abstract\_factory.hpp>}}
\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/array.hpp>}}
\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/dim.hpp>}}
\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/lin\_op.hpp>}}
\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/polymorphic\_object.hpp>}}
\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/types.hpp>}}
\DoxyCodeLine{00024\ \textcolor{preprocessor}{\#include\ <ginkgo/core/matrix/csr.hpp>}}
\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#include\ <ginkgo/core/matrix/permutation.hpp>}}
\DoxyCodeLine{00026\ }
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00029\ \textcolor{keyword}{namespace\ }experimental\ \{}
\DoxyCodeLine{00035\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1experimental_1_1reorder}{reorder}}\ \{}
\DoxyCodeLine{00036\ }
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00046\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00047\ \textcolor{keyword}{class\ }NestedDissection}
\DoxyCodeLine{00048\ \ \ \ \ :\ \textcolor{keyword}{public}\ EnablePolymorphicObject<NestedDissection<ValueType,\ IndexType>,}
\DoxyCodeLine{00049\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LinOpFactory>,}
\DoxyCodeLine{00050\ \ \ \ \ \ \ \textcolor{keyword}{public}\ EnablePolymorphicAssignment<}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \ \ NestedDissection<ValueType,\ IndexType>>\ \{}
\DoxyCodeLine{00052\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_AND\_INDEX\_TYPE;}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00054\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00055\ \ \ \ \ \textcolor{keyword}{struct\ }parameters\_type;}
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }EnablePolymorphicObject<NestedDissection<ValueType,\ IndexType>,}
\DoxyCodeLine{00057\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LinOpFactory>;}
\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }enable\_parameters\_type<parameters\_type,}
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ NestedDissection<ValueType,\ IndexType>>;}
\DoxyCodeLine{00060\ }
\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ IndexType;}
\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keyword}{using\ }matrix\_type\ =\ matrix::Csr<value\_type,\ index\_type>;}
\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keyword}{using\ }permutation\_type\ =\ matrix::Permutation<index\_type>;}
\DoxyCodeLine{00065\ }
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keyword}{struct\ }parameters\_type}
\DoxyCodeLine{00067\ \ \ \ \ \ \ \ \ :\ \textcolor{keyword}{public}\ enable\_parameters\_type<}
\DoxyCodeLine{00068\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ parameters\_type,\ NestedDissection<ValueType,\ IndexType>>\ \{}
\DoxyCodeLine{00073\ \ \ \ \ \ \ \ \ std::unordered\_map<int,\ int>\ options;}
\DoxyCodeLine{00074\ }
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ parameters\_type\&\ with\_options(std::unordered\_map<int,\ int>\ options)}
\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>options\ =\ std::move(options);}
\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};}
\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00084\ \ \ \ \ \};}
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keyword}{const}\ parameters\_type\&\ get\_parameters()\ \{\ \textcolor{keywordflow}{return}\ parameters\_;\ \}}
\DoxyCodeLine{00092\ }
\DoxyCodeLine{00100\ \ \ \ \ std::unique\_ptr<permutation\_type>\ generate(}
\DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ LinOp>\ system\_matrix)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00102\ }
\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keyword}{static}\ parameters\_type\ build()\ \{\ \textcolor{keywordflow}{return}\ \{\};\ \}}
\DoxyCodeLine{00105\ }
\DoxyCodeLine{00106\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00107\ \ \ \ \ \textcolor{keyword}{explicit}\ NestedDissection(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ parameters\_type\&\ params\ =\ \{\});}
\DoxyCodeLine{00109\ }
\DoxyCodeLine{00110\ \ \ \ \ std::unique\_ptr<LinOp>\ generate\_impl(}
\DoxyCodeLine{00111\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ LinOp>\ system\_matrix)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00112\ }
\DoxyCodeLine{00113\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00114\ \ \ \ \ parameters\_type\ parameters\_;}
\DoxyCodeLine{00115\ \};}
\DoxyCodeLine{00116\ }
\DoxyCodeLine{00117\ }
\DoxyCodeLine{00118\ \}\ \ \textcolor{comment}{//\ namespace\ reorder}}
\DoxyCodeLine{00119\ \}\ \ \textcolor{comment}{//\ namespace\ experimental}}
\DoxyCodeLine{00120\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00121\ }
\DoxyCodeLine{00122\ }
\DoxyCodeLine{00123\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_HAVE\_METIS}}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00125\ }
\DoxyCodeLine{00126\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_REORDER\_NESTED\_DISSECTION\_HPP\_}}

\end{DoxyCode}
