\doxysection{gko::\+config::\+type\+\_\+descriptor Class Reference}
\hypertarget{classgko_1_1config_1_1type__descriptor}{}\label{classgko_1_1config_1_1type__descriptor}\index{gko::config::type\_descriptor@{gko::config::type\_descriptor}}


This class describes the value and index types to be used when building a Ginkgo type from a configuration file.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+config/\+type\+\_\+descriptor.\+hpp$>$}

\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\doxymbox{\hyperlink{classgko_1_1config_1_1type__descriptor_a174c5d07919038e0f5858ca25d55002d}{type\+\_\+descriptor}} (std::\+string value\+\_\+typestr="{}float64"{}, std::\+string index\+\_\+typestr="{}int32"{}, std::\+string global\+\_\+index\+\_\+typestr="{}int64"{})
\begin{DoxyCompactList}\small\item\em \doxylink{classgko_1_1config_1_1type__descriptor}{type\+\_\+descriptor} constructor. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1config_1_1type__descriptor_a2f35f692c4fca82f12fb3850e7a8eb44}\label{classgko_1_1config_1_1type__descriptor_a2f35f692c4fca82f12fb3850e7a8eb44} 
const std::\+string \& {\bfseries get\+\_\+value\+\_\+typestr} () const
\begin{DoxyCompactList}\small\item\em Get the value type string. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1config_1_1type__descriptor_a98b9186f925eb78b735b644b1862124f}\label{classgko_1_1config_1_1type__descriptor_a98b9186f925eb78b735b644b1862124f} 
const std::\+string \& {\bfseries get\+\_\+index\+\_\+typestr} () const
\begin{DoxyCompactList}\small\item\em Get the index type string. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1config_1_1type__descriptor_a6cd47833048a7a9e5bb4879f74ef9f8c}\label{classgko_1_1config_1_1type__descriptor_a6cd47833048a7a9e5bb4879f74ef9f8c} 
const std::\+string \& {\bfseries get\+\_\+local\+\_\+index\+\_\+typestr} () const
\begin{DoxyCompactList}\small\item\em Get the local index type string, which gives the same result as \doxylink{classgko_1_1config_1_1type__descriptor_a98b9186f925eb78b735b644b1862124f}{get\+\_\+index\+\_\+typestr()}. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1config_1_1type__descriptor_a95f1e2fe9451df916b9a22bb177c658f}\label{classgko_1_1config_1_1type__descriptor_a95f1e2fe9451df916b9a22bb177c658f} 
const std::\+string \& {\bfseries get\+\_\+global\+\_\+index\+\_\+typestr} () const
\begin{DoxyCompactList}\small\item\em Get the global index type string. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class describes the value and index types to be used when building a Ginkgo type from a configuration file. 

A \doxylink{classgko_1_1config_1_1type__descriptor}{type\+\_\+descriptor} is passed in order to define the parse function defines which template parameters, in terms of value\+\_\+type and/\+or index\+\_\+type, the created object will have. For example, a CG solver created like this:\+ 
\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{auto}\ cg\ =\ parse(config,\ context,\ \doxymbox{\hyperlink{classgko_1_1config_1_1type__descriptor_a174c5d07919038e0f5858ca25d55002d}{type\_descriptor}}(\textcolor{stringliteral}{"{}float64"{}},\ \textcolor{stringliteral}{"{}int32"{}}));}

\end{DoxyCode}
 will have the value type {\ttfamily \doxylink{namespacegko_a86e94f8a1bcd1b4d7fd970383c138a30}{float64}} and the index type {\ttfamily \doxylink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}}. Any Ginkgo object that does not require one of these types will just ignore it. In value\+\_\+type, one additional value {\ttfamily void} can be used to specify that no default type is provided. In this case, the configuration has to provide the necessary template types.

If the configuration specifies one field (only allow value\+\_\+type now):\+ 
\begin{DoxyCode}{0}
\DoxyCodeLine{value\_type:\ \textcolor{stringliteral}{"{}some\_value\_type"{}}}

\end{DoxyCode}
 this type will take precedence over the \doxylink{classgko_1_1config_1_1type__descriptor}{type\+\_\+descriptor}. 

\label{doc-constructors}
\Hypertarget{classgko_1_1config_1_1type__descriptor_doc-constructors}
\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classgko_1_1config_1_1type__descriptor_a174c5d07919038e0f5858ca25d55002d}\index{gko::config::type\_descriptor@{gko::config::type\_descriptor}!type\_descriptor@{type\_descriptor}}
\index{type\_descriptor@{type\_descriptor}!gko::config::type\_descriptor@{gko::config::type\_descriptor}}
\doxysubsubsection{\texorpdfstring{type\_descriptor()}{type\_descriptor()}}
{\footnotesize\ttfamily \label{classgko_1_1config_1_1type__descriptor_a174c5d07919038e0f5858ca25d55002d} 
gko::\+config::\+type\+\_\+descriptor::\+type\+\_\+descriptor (\begin{DoxyParamCaption}\item[{std::\+string}]{value\+\_\+typestr}{ = {\ttfamily "{}float64"{}}, }\item[{std::\+string}]{index\+\_\+typestr}{ = {\ttfamily "{}int32"{}}, }\item[{std::\+string}]{global\+\_\+index\+\_\+typestr}{ = {\ttfamily "{}int64"{}}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}}



\doxylink{classgko_1_1config_1_1type__descriptor}{type\+\_\+descriptor} constructor. 

There is free function {\ttfamily make\+\_\+type\+\_\+descriptor} to create the object by template.


\begin{DoxyParams}{Parameters}
{\em value\+\_\+typestr} & the value type string. "{}void"{} means no default. \\
\hline
{\em index\+\_\+typestr} & the (local) index type string. \\
\hline
{\em global\+\_\+index\+\_\+typestr} & the global index type string.\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
there is no way to call the constructor with explicit template, so we create another free function to handle it. 
\end{DoxyNote}


The documentation for this class was generated from the following file:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+config/\+type\+\_\+descriptor.\+hpp\end{DoxyCompactItemize}
