\doxysection{par\+\_\+ict.\+hpp}
\hypertarget{par__ict_8hpp_source}{}\label{par__ict_8hpp_source}\index{ginkgo/core/factorization/par\_ict.hpp@{ginkgo/core/factorization/par\_ict.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\_ICT\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_FACTORIZATION\_PAR\_ICT\_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\ }ParIct\ :\ \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{comment}{//\ Can\ be\ \`{}static\_cast`\ since\ the\ type\ is\ guaranteed\ in\ this\ class}}
\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::static\_pointer\_cast<const\ matrix\_type>(}
\DoxyCodeLine{00088\ \ \ \ \ \ \ \ \ \ \ \ \ this-\/>\doxymbox{\hyperlink{classgko_1_1Composition_aec22562876d3f5346ae78c96a436d525}{get\_operators}}()[1]);}
\DoxyCodeLine{00089\ \ \ \ \ \}}
\DoxyCodeLine{00090\ }
\DoxyCodeLine{00091\ \ \ \ \ \textcolor{comment}{//\ Remove\ the\ possibility\ of\ calling\ \`{}create`,\ which\ was\ enabled\ by}}
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{comment}{//\ \`{}Composition`}}
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}...\ Args>}
\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Composition<ValueType>>\ create(Args\&\&...\ args)\ =}
\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ \textcolor{keyword}{delete};}
\DoxyCodeLine{00096\ }
\DoxyCodeLine{00097\ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga1fc8e9d8be0c9ad2d72bc1ddfc6d8358}{GKO\_CREATE\_FACTORY\_PARAMETERS}}(parameters,\ \doxymbox{\hyperlink{classgko_1_1factorization_1_1ParIct_1_1Factory}{Factory}})}
\DoxyCodeLine{00098\ \ \ \ \ \{}
\DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIct_1_1parameters__type_a4d677e4243e1c6749a0bb6ada7bdaf5d}{iterations}},\ 5);}
\DoxyCodeLine{00104\ }
\DoxyCodeLine{00122\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIct_1_1parameters__type_a31ec633347a364e086a66aae6e9522f4}{skip\_sorting}},\ \textcolor{keyword}{false});}
\DoxyCodeLine{00123\ }
\DoxyCodeLine{00138\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIct_1_1parameters__type_a0fbcf399e8eb618f308804c0c98f3751}{approximate\_select}},\ \textcolor{keyword}{true});}
\DoxyCodeLine{00139\ }
\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIct_1_1parameters__type_a703c9694aeb35d519bfea0e28710d699}{deterministic\_sample}},\ \textcolor{keyword}{false});}
\DoxyCodeLine{00158\ }
\DoxyCodeLine{00171\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIct_1_1parameters__type_a9c1f1299d890eb206bcaf0df6e58ada8}{fill\_in\_limit}},\ 2.0);}
\DoxyCodeLine{00172\ }
\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ std::shared\_ptr<typename\ matrix\_type::strategy\_type>}
\DoxyCodeLine{00178\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIct_1_1parameters__type_a3d2c10eb0c925ec719c42a22dc2afebb}{l\_strategy}},\ \textcolor{keyword}{nullptr});}
\DoxyCodeLine{00179\ }
\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ std::shared\_ptr<typename\ matrix\_type::strategy\_type>}
\DoxyCodeLine{00185\ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga49d4c09c39f06b22bebbbfd1d8bfe450}{GKO\_FACTORY\_PARAMETER\_SCALAR}}(\doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIct_1_1parameters__type_aa5fd86ebf597af65410bc18ea346bc8a}{lt\_strategy}},\ \textcolor{keyword}{nullptr});}
\DoxyCodeLine{00186\ \ \ \ \ \};}
\DoxyCodeLine{00187\ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga8e0af90ec2414b768266f77cedffc309}{GKO\_ENABLE\_LIN\_OP\_FACTORY}}(ParIct,\ parameters,\ Factory);}
\DoxyCodeLine{00188\ \ \ \ \ \doxymbox{\hyperlink{group__LinOp_ga521f65604cc4cf427dcb2ecfa49b757c}{GKO\_ENABLE\_BUILD\_METHOD}}(Factory);}
\DoxyCodeLine{00189\ }
\DoxyCodeLine{00203\ \ \ \ \ \textcolor{keyword}{static}\ \doxymbox{\hyperlink{structgko_1_1factorization_1_1ParIct_1_1parameters__type}{parameters\_type}}\ \doxymbox{\hyperlink{classgko_1_1factorization_1_1ParIct_ad53fcd00345d5d4cf5558acc8e99970b}{parse}}(}
\DoxyCodeLine{00204\ \ \ \ \ \ \ \ \ \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{00205\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1config_1_1type__descriptor}{config::type\_descriptor}}\&\ td\_for\_child\ =}
\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \ \ \ \ config::make\_type\_descriptor<ValueType,\ IndexType>());}
\DoxyCodeLine{00207\ }
\DoxyCodeLine{00208\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00209\ \ \ \ \ \textcolor{keyword}{explicit}\ ParIct(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1factorization_1_1ParIct_1_1Factory}{Factory}}*\ factory,}
\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ LinOp>\ system\_matrix)}
\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ :\ \doxymbox{\hyperlink{classgko_1_1Composition_aad32bb5f4c1e90100eafa20be5c6f297}{Composition}}<ValueType>(factory-\/>get\_executor()),}
\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \ \ parameters\_\{factory-\/>get\_parameters()\}}
\DoxyCodeLine{00213\ \ \ \ \ \{}
\DoxyCodeLine{00214\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (parameters\_.l\_strategy\ ==\ \textcolor{keyword}{nullptr})\ \{}
\DoxyCodeLine{00215\ \ \ \ \ \ \ \ \ \ \ \ \ parameters\_.l\_strategy\ =}
\DoxyCodeLine{00216\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<typename\ matrix\_type::classical>();}
\DoxyCodeLine{00217\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ if\ (parameters\_.lt\_strategy\ ==\ \textcolor{keyword}{nullptr})\ \{}
\DoxyCodeLine{00219\ \ \ \ \ \ \ \ \ \ \ \ \ parameters\_.lt\_strategy\ =}
\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ std::make\_shared<typename\ matrix\_type::classical>();}
\DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00222\ \ \ \ \ \ \ \ \ generate\_l\_lt(std::move(system\_matrix))-\/>move\_to(\textcolor{keyword}{this});}
\DoxyCodeLine{00223\ \ \ \ \ \}}
\DoxyCodeLine{00224\ }
\DoxyCodeLine{00237\ \ \ \ \ std::unique\_ptr<Composition<ValueType>>\ generate\_l\_lt(}
\DoxyCodeLine{00238\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::shared\_ptr<const\ LinOp>\&\ system\_matrix)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00239\ \};}
\DoxyCodeLine{00240\ }
\DoxyCodeLine{00241\ }
\DoxyCodeLine{00242\ \}\ \ \textcolor{comment}{//\ namespace\ factorization}}
\DoxyCodeLine{00243\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00244\ }
\DoxyCodeLine{00245\ }
\DoxyCodeLine{00246\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_FACTORIZATION\_PAR\_ICT\_HPP\_}}

\end{DoxyCode}
