Ginkgo Generated from branch based on main. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
Loading...
Searching...
No Matches
gko::half Class Reference

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

#include <ginkgo/core/base/half.hpp>

Public Member Functions

template<typename T , typename = std::enable_if_t<std::is_scalar<T>::value>>
 half (const T &val)
 
template<typename V >
halfoperator= (const V &val)
 
 operator float () const noexcept
 
halfoperator+= (const half &hf)
 
halfoperator-= (const half &hf)
 
halfoperator*= (const half &hf)
 
halfoperator/= (const half &hf)
 
half operator- () const
 

Static Public Member Functions

static constexpr half create_from_bits (const std::uint16_t &bits) noexcept
 

Friends

half operator+ (const half &lhf, const half &rhf)
 
half operator- (const half &lhf, const half &rhf)
 
half operator* (const half &lhf, const half &rhf)
 
half operator/ (const half &lhf, const half &rhf)
 
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 > > operator+ (const half &hf, const T &val)
 
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 > > operator+ (const T &val, const half &hf)
 
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 > > operator- (const half &hf, const T &val)
 
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 > > operator- (const T &val, const half &hf)
 
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 > > operator* (const half &hf, const T &val)
 
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 > > operator* (const T &val, const half &hf)
 
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 > > operator/ (const half &hf, const T &val)
 
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 > > operator/ (const T &val, const half &hf)
 

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: