\doxysection{gko::\+half Class Reference}
\hypertarget{classgko_1_1half}{}\label{classgko_1_1half}\index{gko::half@{gko::half}}


A class providing basic support for half precision floating point types.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+base/\+half.\+hpp$>$}

\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1half_af740239e1d4c0b7c91834c769f5258aa}\label{classgko_1_1half_af740239e1d4c0b7c91834c769f5258aa} 
{\footnotesize template$<$typename T, typename = std::\+enable\+\_\+if\+\_\+t$<$std::\+is\+\_\+scalar$<$\+T$>$::\+value \texorpdfstring{$\vert$}{|}\texorpdfstring{$\vert$}{|}                                          std::\+is\+\_\+same\+\_\+v$<$\+T, bfloat16$>$$>$$>$ }\\{\bfseries half} (const T \&val)
\item 
\Hypertarget{classgko_1_1half_ad8cf376344774a283808eecd7bdecb19}\label{classgko_1_1half_ad8cf376344774a283808eecd7bdecb19} 
{\footnotesize template$<$typename V$>$ }\\half \& {\bfseries operator=} (const V \&val)
\item 
\Hypertarget{classgko_1_1half_a4a5ba1f734cc0e59fcbf2fdf44937005}\label{classgko_1_1half_a4a5ba1f734cc0e59fcbf2fdf44937005} 
{\bfseries operator float} () const noexcept
\item 
\Hypertarget{classgko_1_1half_a117541ddfe918e190da2532f4a1e2cda}\label{classgko_1_1half_a117541ddfe918e190da2532f4a1e2cda} 
half \& {\bfseries operator+=} (const half \&hf)
\item 
\Hypertarget{classgko_1_1half_af280605aadb44ee19434ff8b881b6dc3}\label{classgko_1_1half_af280605aadb44ee19434ff8b881b6dc3} 
half \& {\bfseries operator-\/=} (const half \&hf)
\item 
\Hypertarget{classgko_1_1half_a51874e21c7e712e32868ec09ca9f9105}\label{classgko_1_1half_a51874e21c7e712e32868ec09ca9f9105} 
half \& {\bfseries operator\texorpdfstring{$\ast$}{*}=} (const half \&hf)
\item 
\Hypertarget{classgko_1_1half_abf8ebd7cee0008ef4c8f92d388daae1b}\label{classgko_1_1half_abf8ebd7cee0008ef4c8f92d388daae1b} 
half \& {\bfseries operator/\+=} (const half \&hf)
\item 
\Hypertarget{classgko_1_1half_a45773d84351874b89392d9cc90fa54ef}\label{classgko_1_1half_a45773d84351874b89392d9cc90fa54ef} 
half {\bfseries operator-\/} () const
\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1half_ab33dce61fab5492ba33190846486f2cd}\label{classgko_1_1half_ab33dce61fab5492ba33190846486f2cd} 
static constexpr half {\bfseries create\+\_\+from\+\_\+bits} (const std::\+uint16\+\_\+t \&bits) noexcept
\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1half_a390a2e8ad3e53d71c405cd915b01cd73}\label{classgko_1_1half_a390a2e8ad3e53d71c405cd915b01cd73} 
half {\bfseries operator+} (const half \&lhf, const half \&rhf)
\item 
\Hypertarget{classgko_1_1half_a0f8736acd2210af15c92f1d635055e5e}\label{classgko_1_1half_a0f8736acd2210af15c92f1d635055e5e} 
half {\bfseries operator-\/} (const half \&lhf, const half \&rhf)
\item 
\Hypertarget{classgko_1_1half_ab33c45d4b9f960fecd14f230a457ea41}\label{classgko_1_1half_ab33c45d4b9f960fecd14f230a457ea41} 
half {\bfseries operator\texorpdfstring{$\ast$}{*}} (const half \&lhf, const half \&rhf)
\item 
\Hypertarget{classgko_1_1half_ac56b600fd95189c04be4d56205835027}\label{classgko_1_1half_ac56b600fd95189c04be4d56205835027} 
half {\bfseries operator/\+} (const half \&lhf, const half \&rhf)
\item 
\Hypertarget{classgko_1_1half_ac5d01b6848f32f6db42834b6e05b52c9}\label{classgko_1_1half_ac5d01b6848f32f6db42834b6e05b52c9} 
{\footnotesize template$<$typename T$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ !std::\+is\+\_\+same$<$ T, half $>$::\+value \&\&std::\+is\+\_\+scalar$<$ T $>$::\+value, std::\+conditional\+\_\+t$<$ std::\+is\+\_\+floating\+\_\+point$<$ T $>$::\+value, T, half $>$ $>$ {\bfseries operator+} (const half \&hf, const T \&val)
\item 
\Hypertarget{classgko_1_1half_a15771485a2ad90f61ce0f8841ed6a8a9}\label{classgko_1_1half_a15771485a2ad90f61ce0f8841ed6a8a9} 
{\footnotesize template$<$typename T$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ !std::\+is\+\_\+same$<$ T, half $>$::\+value \&\&std::\+is\+\_\+scalar$<$ T $>$::\+value, std::\+conditional\+\_\+t$<$ std::\+is\+\_\+floating\+\_\+point$<$ T $>$::\+value, T, half $>$ $>$ {\bfseries operator+} (const T \&val, const half \&hf)
\item 
\Hypertarget{classgko_1_1half_aff346d901315a2f8bca57d0c72e91226}\label{classgko_1_1half_aff346d901315a2f8bca57d0c72e91226} 
{\footnotesize template$<$typename T$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ !std::\+is\+\_\+same$<$ T, half $>$::\+value \&\&std::\+is\+\_\+scalar$<$ T $>$::\+value, std::\+conditional\+\_\+t$<$ std::\+is\+\_\+floating\+\_\+point$<$ T $>$::\+value, T, half $>$ $>$ {\bfseries operator-\/} (const half \&hf, const T \&val)
\item 
\Hypertarget{classgko_1_1half_ad75af76480340fdabe454c8376119433}\label{classgko_1_1half_ad75af76480340fdabe454c8376119433} 
{\footnotesize template$<$typename T$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ !std::\+is\+\_\+same$<$ T, half $>$::\+value \&\&std::\+is\+\_\+scalar$<$ T $>$::\+value, std::\+conditional\+\_\+t$<$ std::\+is\+\_\+floating\+\_\+point$<$ T $>$::\+value, T, half $>$ $>$ {\bfseries operator-\/} (const T \&val, const half \&hf)
\item 
\Hypertarget{classgko_1_1half_aa5938711693624d0d6d038a2d4854dac}\label{classgko_1_1half_aa5938711693624d0d6d038a2d4854dac} 
{\footnotesize template$<$typename T$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ !std::\+is\+\_\+same$<$ T, half $>$::\+value \&\&std::\+is\+\_\+scalar$<$ T $>$::\+value, std::\+conditional\+\_\+t$<$ std::\+is\+\_\+floating\+\_\+point$<$ T $>$::\+value, T, half $>$ $>$ {\bfseries operator\texorpdfstring{$\ast$}{*}} (const half \&hf, const T \&val)
\item 
\Hypertarget{classgko_1_1half_a2caa90684a94e3a84988f5d358e713db}\label{classgko_1_1half_a2caa90684a94e3a84988f5d358e713db} 
{\footnotesize template$<$typename T$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ !std::\+is\+\_\+same$<$ T, half $>$::\+value \&\&std::\+is\+\_\+scalar$<$ T $>$::\+value, std::\+conditional\+\_\+t$<$ std::\+is\+\_\+floating\+\_\+point$<$ T $>$::\+value, T, half $>$ $>$ {\bfseries operator\texorpdfstring{$\ast$}{*}} (const T \&val, const half \&hf)
\item 
\Hypertarget{classgko_1_1half_aa2c0046bc152d1f7e65718d2e433b71c}\label{classgko_1_1half_aa2c0046bc152d1f7e65718d2e433b71c} 
{\footnotesize template$<$typename T$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ !std::\+is\+\_\+same$<$ T, half $>$::\+value \&\&std::\+is\+\_\+scalar$<$ T $>$::\+value, std::\+conditional\+\_\+t$<$ std::\+is\+\_\+floating\+\_\+point$<$ T $>$::\+value, T, half $>$ $>$ {\bfseries operator/\+} (const half \&hf, const T \&val)
\item 
\Hypertarget{classgko_1_1half_a7503d186fe55db6e909a37dadf1d6878}\label{classgko_1_1half_a7503d186fe55db6e909a37dadf1d6878} 
{\footnotesize template$<$typename T$>$ }\\std::\+enable\+\_\+if\+\_\+t$<$ !std::\+is\+\_\+same$<$ T, half $>$::\+value \&\&std::\+is\+\_\+scalar$<$ T $>$::\+value, std::\+conditional\+\_\+t$<$ std::\+is\+\_\+floating\+\_\+point$<$ T $>$::\+value, T, half $>$ $>$ {\bfseries operator/\+} (const T \&val, const half \&hf)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A class providing basic support for half precision floating point types. 

For now the only features are reduced storage compared to single precision and conversions from and to single precision floating point type. 

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