\doxysection{containers.\+hpp}
\hypertarget{containers_8hpp_source}{}\label{containers_8hpp_source}\index{ginkgo/core/synthesizer/containers.hpp@{ginkgo/core/synthesizer/containers.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\_SYNTHESIZER\_CONTAINERS\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_SYNTHESIZER\_CONTAINERS\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <array>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <type\_traits>}}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00019\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1syn}{syn}}\ \{}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00028\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T,\ T...\ Values>}
\DoxyCodeLine{00029\ \textcolor{keyword}{struct\ }\doxymbox{\hyperlink{structgko_1_1syn_1_1value__list}{value\_list}}\ \{\};}
\DoxyCodeLine{00030\ }
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00037\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}...\ Types>}
\DoxyCodeLine{00038\ \textcolor{keyword}{struct\ }\doxymbox{\hyperlink{structgko_1_1syn_1_1type__list}{type\_list}}\ \{\};}
\DoxyCodeLine{00039\ }
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00048\ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ Start,\ \textcolor{keywordtype}{int}\ End,\ \textcolor{keywordtype}{int}\ Step\ =\ 1>}
\DoxyCodeLine{00049\ \textcolor{keyword}{struct\ }\doxymbox{\hyperlink{structgko_1_1syn_1_1range}{range}}\ \{\};}
\DoxyCodeLine{00050\ }
\DoxyCodeLine{00051\ }
\DoxyCodeLine{00052\ \textcolor{keyword}{namespace\ }detail\ \{}
\DoxyCodeLine{00053\ }
\DoxyCodeLine{00054\ }
\DoxyCodeLine{00061\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ List1,\ \textcolor{keyword}{typename}\ List2>}
\DoxyCodeLine{00062\ \textcolor{keyword}{struct\ }concatenate\_impl;}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00071\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T,\ T...\ Values1,\ T...\ Values2>}
\DoxyCodeLine{00072\ \textcolor{keyword}{struct\ }concatenate\_impl<\doxymbox{\hyperlink{structgko_1_1syn_1_1value__list}{value\_list}}<T,\ Values1...>,\ \doxymbox{\hyperlink{structgko_1_1syn_1_1value__list}{value\_list}}<T,\ Values2...>>\ \{}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keyword}{using\ }type\ =\ \doxymbox{\hyperlink{structgko_1_1syn_1_1value__list}{value\_list}}<T,\ Values1...,\ Values2...>;}
\DoxyCodeLine{00074\ \};}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ }
\DoxyCodeLine{00077\ \}\ \ \textcolor{comment}{//\ namespace\ detail}}
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00079\ }
\DoxyCodeLine{00086\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ List1,\ \textcolor{keyword}{typename}\ List2>}
\DoxyCodeLine{00087\ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{namespacegko_1_1syn_affc331b0566012de95f4c38a1d4cd425}{concatenate}}\ =\ \textcolor{keyword}{typename}\ detail::concatenate\_impl<List1,\ List2>::type;}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00089\ }
\DoxyCodeLine{00090\ \textcolor{keyword}{namespace\ }detail\ \{}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00092\ }
\DoxyCodeLine{00098\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T,\ \textcolor{keyword}{typename}\ =\ \textcolor{keywordtype}{void}>}
\DoxyCodeLine{00099\ \textcolor{keyword}{struct\ }as\_list\_impl;}
\DoxyCodeLine{00100\ }
\DoxyCodeLine{00107\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T,\ T...\ Values>}
\DoxyCodeLine{00108\ \textcolor{keyword}{struct\ }as\_list\_impl<\doxymbox{\hyperlink{structgko_1_1syn_1_1value__list}{value\_list}}<T,\ Values...>>\ \{}
\DoxyCodeLine{00109\ \ \ \ \ \textcolor{keyword}{using\ }type\ =\ \doxymbox{\hyperlink{structgko_1_1syn_1_1value__list}{value\_list}}<T,\ Values...>;}
\DoxyCodeLine{00110\ \};}
\DoxyCodeLine{00111\ }
\DoxyCodeLine{00117\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}...\ Types>}
\DoxyCodeLine{00118\ \textcolor{keyword}{struct\ }as\_list\_impl<\doxymbox{\hyperlink{structgko_1_1syn_1_1type__list}{type\_list}}<Types...>>\ \{}
\DoxyCodeLine{00119\ \ \ \ \ \textcolor{keyword}{using\ }type\ =\ \doxymbox{\hyperlink{structgko_1_1syn_1_1type__list}{type\_list}}<Types...>;}
\DoxyCodeLine{00120\ \};}
\DoxyCodeLine{00121\ }
\DoxyCodeLine{00130\ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ Start,\ \textcolor{keywordtype}{int}\ End,\ \textcolor{keywordtype}{int}\ Step>}
\DoxyCodeLine{00131\ \textcolor{keyword}{struct\ }as\_list\_impl<\doxymbox{\hyperlink{structgko_1_1syn_1_1range}{range}}<Start,\ End,\ Step>,\ \doxymbox{\hyperlink{namespacestd}{std}}::enable\_if\_t<(Start\ <\ End)>>\ \{}
\DoxyCodeLine{00132\ \ \ \ \ \textcolor{keyword}{using\ }type\ =\ \doxymbox{\hyperlink{namespacegko_1_1syn_affc331b0566012de95f4c38a1d4cd425}{concatenate}}<}
\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{structgko_1_1syn_1_1value__list}{value\_list<int,\ Start>}},}
\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ \textcolor{keyword}{typename}\ as\_list\_impl<range<Start\ +\ Step,\ End,\ Step>>::type>;}
\DoxyCodeLine{00135\ \};}
\DoxyCodeLine{00136\ }
\DoxyCodeLine{00144\ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{int}\ Start,\ \textcolor{keywordtype}{int}\ End,\ \textcolor{keywordtype}{int}\ Step>}
\DoxyCodeLine{00145\ \textcolor{keyword}{struct\ }as\_list\_impl<\doxymbox{\hyperlink{structgko_1_1syn_1_1range}{range}}<Start,\ End,\ Step>,\ \doxymbox{\hyperlink{namespacestd}{std}}::enable\_if\_t<(Start\ >=\ End)>>\ \{}
\DoxyCodeLine{00146\ \ \ \ \ \textcolor{keyword}{using\ }type\ =\ \doxymbox{\hyperlink{structgko_1_1syn_1_1value__list}{value\_list<int>}};}
\DoxyCodeLine{00147\ \};}
\DoxyCodeLine{00148\ }
\DoxyCodeLine{00149\ }
\DoxyCodeLine{00150\ \}\ \ \textcolor{comment}{//\ namespace\ detail}}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ }
\DoxyCodeLine{00159\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00160\ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{namespacegko_1_1syn_a0c9c4b158767f0ba21692be9ea34871f}{as\_list}}\ =\ \textcolor{keyword}{typename}\ detail::as\_list\_impl<T>::type;}
\DoxyCodeLine{00161\ }
\DoxyCodeLine{00162\ }
\DoxyCodeLine{00174\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T,\ T...\ Value>}
\DoxyCodeLine{00175\ \textcolor{keyword}{constexpr}\ std::array<T,\ \textcolor{keyword}{sizeof}...(Value)>\ \doxymbox{\hyperlink{namespacegko_1_1syn_ac86a34a4d18aac6063c606be76534cd8}{as\_array}}(\doxymbox{\hyperlink{structgko_1_1syn_1_1value__list}{value\_list<T,\ Value...>}}\ vl)}
\DoxyCodeLine{00176\ \{}
\DoxyCodeLine{00177\ \ \ \ \ \textcolor{keywordflow}{return}\ std::array<T,\ \textcolor{keyword}{sizeof}...(Value)>\{Value...\};}
\DoxyCodeLine{00178\ \}}
\DoxyCodeLine{00179\ }
\DoxyCodeLine{00180\ }
\DoxyCodeLine{00181\ \}\ \ \textcolor{comment}{//\ namespace\ syn}}
\DoxyCodeLine{00182\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00183\ }
\DoxyCodeLine{00184\ }
\DoxyCodeLine{00185\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_SYNTHESIZER\_CONTAINERS\_HPP\_}}

\end{DoxyCode}
