\doxysection{batch\+\_\+identity.\+hpp}
\hypertarget{batch__identity_8hpp_source}{}\label{batch__identity_8hpp_source}\index{ginkgo/core/matrix/batch\_identity.hpp@{ginkgo/core/matrix/batch\_identity.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\_BATCH\_IDENTITY\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_MATRIX\_BATCH\_IDENTITY\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/batch\_lin\_op.hpp>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/batch\_multi\_vector.hpp>}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/executor.hpp>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/types.hpp>}}
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/utils.hpp>}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <ginkgo/core/matrix/identity.hpp>}}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00018\ \textcolor{keyword}{namespace\ }batch\ \{}
\DoxyCodeLine{00019\ \textcolor{keyword}{namespace\ }matrix\ \{}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00031\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType\ =\ default\_precision>}
\DoxyCodeLine{00032\ \textcolor{keyword}{class\ }Identity\ final\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1EnableBatchLinOp}{EnableBatchLinOp}}<Identity<ValueType>>\ \{}
\DoxyCodeLine{00033\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<Identity,\ \doxymbox{\hyperlink{classgko_1_1batch_1_1BatchLinOp}{BatchLinOp}}>;}
\DoxyCodeLine{00034\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_TYPE;}
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00036\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00037\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00038\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}};}
\DoxyCodeLine{00039\ \ \ \ \ \textcolor{keyword}{using\ }unbatch\_type\ =\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Identity}{gko::matrix::Identity<ValueType>}};}
\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{using\ }absolute\_type\ =\ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<Identity>}};}
\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{using\ }complex\_type\ =\ \doxymbox{\hyperlink{namespacegko_a4ad20e5381a84928753efde0b2bc7f85}{to\_complex<Identity>}};}
\DoxyCodeLine{00042\ }
\DoxyCodeLine{00050\ \ \ \ \ Identity*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Identity_a7be871a55f9ab76a8057c83150353eb9}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x);}
\DoxyCodeLine{00052\ }
\DoxyCodeLine{00063\ \ \ \ \ Identity*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Identity_a1f65461a7a74c87ab64579bb25e82383}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ alpha,}
\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ beta,}
\DoxyCodeLine{00066\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x);}
\DoxyCodeLine{00067\ }
\DoxyCodeLine{00071\ \ \ \ \ \textcolor{keyword}{const}\ Identity*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Identity_ae88159b0cb8f01f061133d2f22660493}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00072\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keyword}{const}\ Identity*\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Identity_a46c2fdb31bf880ef4afa74a333e3f116}{apply}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ alpha,}
\DoxyCodeLine{00080\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ b,}
\DoxyCodeLine{00081\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ beta,}
\DoxyCodeLine{00082\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param}}<\doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}>\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Identity>\ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Identity_a97d983b2715d4ba66e428e30b1f54202}{create}}(}
\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\{\});}
\DoxyCodeLine{00094\ }
\DoxyCodeLine{00095\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00096\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1matrix_1_1Identity}{Identity}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00097\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1batch__dim}{batch\_dim<2>}}\{\});}
\DoxyCodeLine{00098\ }
\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ b,}
\DoxyCodeLine{00100\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ alpha,}
\DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ b,}
\DoxyCodeLine{00104\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ beta,}
\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1batch_1_1MultiVector}{MultiVector<value\_type>}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00106\ \};}
\DoxyCodeLine{00107\ }
\DoxyCodeLine{00108\ }
\DoxyCodeLine{00109\ \}\ \ \textcolor{comment}{//\ namespace\ matrix}}
\DoxyCodeLine{00110\ \}\ \ \textcolor{comment}{//\ namespace\ batch}}
\DoxyCodeLine{00111\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00112\ }
\DoxyCodeLine{00113\ }
\DoxyCodeLine{00114\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_MATRIX\_BATCH\_IDENTITY\_HPP\_}}

\end{DoxyCode}
