\doxysection{par\+\_\+ic.\+hpp}
\hypertarget{par__ic_8hpp_source}{}\label{par__ic_8hpp_source}\index{ginkgo/core/factorization/par\_ic.hpp@{ginkgo/core/factorization/par\_ic.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\_FACTORIZATION\_PAR\_IC\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_FACTORIZATION\_PAR\_IC\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <memory>}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/composition.hpp>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/lin\_op.hpp>}}
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/types.hpp>}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <ginkgo/core/config/config.hpp>}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <ginkgo/core/config/registry.hpp>}}
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <ginkgo/core/matrix/csr.hpp>}}
\DoxyCodeLine{00017\ }
\DoxyCodeLine{00018\ }
\DoxyCodeLine{00019\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00025\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1factorization}{factorization}}\ \{}
\DoxyCodeLine{00026\ }
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00068\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType\ =\ default\_precision,\ \textcolor{keyword}{typename}\ IndexType\ =\ \textcolor{keywordtype}{int}32>}
\DoxyCodeLine{00069\ \textcolor{keyword}{class\ }ParIc\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1Composition_aad32bb5f4c1e90100eafa20be5c6f297}{Composition}}<ValueType>\ \{}
\DoxyCodeLine{00070\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_AND\_INDEX\_TYPE;}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ IndexType;}
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keyword}{using\ }matrix\_type\ =\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{matrix::Csr<ValueType,\ IndexType>}};}
\DoxyCodeLine{00076\ }
\DoxyCodeLine{00077\ \ \ \ \ std::shared\_ptr<const\ matrix\_type>\ get\_l\_factor()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00078\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00079\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Can\ be\ \`{}static\_cast`\ since\ the\ type\ is\ guaranteed\ in\ this\ class}}
\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::static\_pointer\_cast<const\ matrix\_type>(}
\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1Composition_aec22562876d3f5346ae78c96a436d525}{get\_operators}}()[0]);}
\DoxyCodeLine{00082\ \ \ \ \ \}}
\DoxyCodeLine{00083\ }
\DoxyCodeLine{00084\ \ \ \ \ std::shared\_ptr<const\ matrix\_type>\ get\_lt\_factor()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00085\ \textcolor{keyword}{\ \ \ \ }\{}
\DoxyCodeLine{00086\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (this-\/>\doxymbox{\hyperlink{classgko_1_1Composition_aec22562876d3f5346ae78c96a436d525}{get\_operators}}().size()\ ==\ 2)\ \{}
\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Can\ be\ \`{}static\_cast`\ since\ the\ type\ is\ guaranteed\ in\ this\ class}}
\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::static\_pointer\_cast<const\ matrix\_type>(}
\DoxyCodeLine{00089\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1Composition_aec22562876d3f5346ae78c96a436d525}{get\_operators}}()[1]);}
\DoxyCodeLine{00090\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{00091\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::static\_pointer\_cast<const\ matrix\_type>(}
\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_ae99fdd8bfa5ac694adcb7297d432967e}{share}}(get\_l\_factor()-\/>\doxymbox{\hyperlink{classgko_1_1Composition_ae9d4e8a318c21b265cdcd7ed33175e52}{conj\_transpose}}()));}
\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00094\ \ \ \ \ \}}
\DoxyCodeLine{00095\ }
\DoxyCodeLine{00096\ \ \ \ \ \textcolor{comment}{//\ Remove\ the\ possibility\ of\ calling\ \`{}create`,\ which\ was\ enabled\ by}}
\DoxyCodeLine{00097\ \ \ \ \ \textcolor{comment}{//\ \`{}Composition`}}
\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}...\ Args>}
\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Composition<ValueType>>\ create(Args\&\&...\ args)\ =}
\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete};}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga1fc8e9d8be0c9ad2d72bc1ddfc6d8358}{GKO\_CREATE\_FACTORY\_PARAMETERS}}(parameters,\ \doxymbox{\hyperlink{classgko_1_1factorization_1_1ParIc_1_1Factory}{Factory}})}
\DoxyCodeLine{00103\ \ \ \ \ \{}
\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIc_1_1parameters__type_a358fe00ecabfa3fb2b06bf90175020a4}{iterations}},\ 0);}
\DoxyCodeLine{00111\ }
\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIc_1_1parameters__type_a435591bb86e3a8afa4a32c667ebb4c07}{skip\_sorting}},\ \textcolor{keyword}{false});}
\DoxyCodeLine{00123\ }
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ std::shared\_ptr<typename\ matrix\_type::strategy\_type>}
\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIc_1_1parameters__type_ae6ab63d45702d7085f63d78a27c58e9e}{l\_strategy}},\ \textcolor{keyword}{nullptr});}
\DoxyCodeLine{00130\ }
\DoxyCodeLine{00136\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIc_1_1parameters__type_abfa3c5afbc05b7c25b09ae225e6c966a}{both\_factors}},\ \textcolor{keyword}{true});}
\DoxyCodeLine{00137\ \ \ \ \ \};}
\DoxyCodeLine{00138\ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga8e0af90ec2414b768266f77cedffc309}{GKO\_ENABLE\_LIN\_OP\_FACTORY}}(ParIc,\ parameters,\ Factory);}
\DoxyCodeLine{00139\ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga521f65604cc4cf427dcb2ecfa49b757c}{GKO\_ENABLE\_BUILD\_METHOD}}(Factory);}
\DoxyCodeLine{00140\ }
\DoxyCodeLine{00154\ \ \ \ \ \textcolor{keyword}{static}\ \doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIc_1_1parameters__type}{parameters\_type}}\ \doxymbox{\hyperlink{classgko_1_1factorization_1_1ParIc_a8054372cc7ac8bc83e2fe227b54f9f26}{parse}}(}
\DoxyCodeLine{00155\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1config_1_1pnode}{config::pnode}}\&\ config,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1config_1_1registry}{config::registry}}\&\ context,}
\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1config_1_1type__descriptor}{config::type\_descriptor}}\&\ td\_for\_child\ =}
\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ \ \ \ \ config::make\_type\_descriptor<ValueType,\ IndexType>());}
\DoxyCodeLine{00158\ }
\DoxyCodeLine{00159\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00160\ \ \ \ \ \textcolor{keyword}{explicit}\ ParIc(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1factorization_1_1ParIc_1_1Factory}{Factory}}*\ factory,}
\DoxyCodeLine{00161\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ LinOp>\ system\_matrix)}
\DoxyCodeLine{00162\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{classgko_1_1Composition_aad32bb5f4c1e90100eafa20be5c6f297}{Composition}}<ValueType>(factory-\/>get\_executor()),}
\DoxyCodeLine{00163\ \ \ \ \ \ \ \ \ \ \ parameters\_\{factory-\/>get\_parameters()\}}
\DoxyCodeLine{00164\ \ \ \ \ \{}
\DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (parameters\_.l\_strategy\ ==\ \textcolor{keyword}{nullptr})\ \{}
\DoxyCodeLine{00166\ \ \ \ \ \ \ \ \ \ \ \ \ parameters\_.l\_strategy\ =}
\DoxyCodeLine{00167\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<typename\ matrix\_type::classical>();}
\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ generate(system\_matrix,\ parameters\_.skip\_sorting,}
\DoxyCodeLine{00170\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ parameters\_.both\_factors)}
\DoxyCodeLine{00171\ \ \ \ \ \ \ \ \ \ \ \ \ -\/>move\_to(\textcolor{keyword}{this});}
\DoxyCodeLine{00172\ \ \ \ \ \}}
\DoxyCodeLine{00173\ }
\DoxyCodeLine{00174\ \ \ \ \ std::unique\_ptr<Composition<ValueType>>\ generate(}
\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::shared\_ptr<const\ LinOp>\&\ system\_matrix,\ \textcolor{keywordtype}{bool}\ skip\_sorting,}
\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ both\_factors)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00177\ \};}
\DoxyCodeLine{00178\ }
\DoxyCodeLine{00179\ }
\DoxyCodeLine{00180\ \}\ \ \textcolor{comment}{//\ namespace\ factorization}}
\DoxyCodeLine{00181\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00182\ }
\DoxyCodeLine{00183\ }
\DoxyCodeLine{00184\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_FACTORIZATION\_PAR\_IC\_HPP\_}}

\end{DoxyCode}
