Ginkgo: gko::bfloat16 Class Reference

| Ginkgo Generated from branch based on main. Ginkgo version 1.11.0 A numerical linear algebra library targeting many-core architectures

Loading...
Searching...
No Matches
gko::bfloat16 Class Reference

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

`#include <ginkgo/core/base/bfloat16.hpp>`

## Public Member Functions
template<typename T, typename = std::enable_if_t<std::is_scalar<T>::value || std::is_same_v<T, half>>>
| bfloat16 (const T &val)
template<typename V>
bfloat16 & | operator= (const V &val)
| operator float () const noexcept
bfloat16 & | operator+= (const bfloat16 &hf)
bfloat16 & | operator-= (const bfloat16 &hf)
bfloat16 & | operator*= (const bfloat16 &hf)
bfloat16 & | operator/= (const bfloat16 &hf)
bfloat16 | operator- () const

## Static Public Member Functions
static constexpr bfloat16 | create_from_bits (const std::uint16_t &bits) noexcept

## Friends
bfloat16 | operator+ (const bfloat16 &lhf, const bfloat16 &rhf)
bfloat16 | operator- (const bfloat16 &lhf, const bfloat16 &rhf)
bfloat16 | operator* (const bfloat16 &lhf, const bfloat16 &rhf)
bfloat16 | operator/ (const bfloat16 &lhf, const bfloat16 &rhf)
template<typename T>
std::enable_if_t< !std::is_same< T, bfloat16 >::value &&(std::is_scalar< T >::value||std::is_same_v< T, half >), std::conditional_t< std::is_floating_point< T >::value, T, std::conditional_t< std::is_same_v< T, half >, float, bfloat16 > > > | operator+ (const bfloat16 &hf, const T &val)
template<typename T>
std::enable_if_t< !std::is_same< T, bfloat16 >::value &&(std::is_scalar< T >::value||std::is_same_v< T, half >), std::conditional_t< std::is_floating_point< T >::value, T, std::conditional_t< std::is_same_v< T, half >, float, bfloat16 > > > | operator+ (const T &val, const bfloat16 &hf)
template<typename T>
std::enable_if_t< !std::is_same< T, bfloat16 >::value &&(std::is_scalar< T >::value||std::is_same_v< T, half >), std::conditional_t< std::is_floating_point< T >::value, T, std::conditional_t< std::is_same_v< T, half >, float, bfloat16 > > > | operator- (const bfloat16 &hf, const T &val)
template<typename T>
std::enable_if_t< !std::is_same< T, bfloat16 >::value &&(std::is_scalar< T >::value||std::is_same_v< T, half >), std::conditional_t< std::is_floating_point< T >::value, T, std::conditional_t< std::is_same_v< T, half >, float, bfloat16 > > > | operator- (const T &val, const bfloat16 &hf)
template<typename T>
std::enable_if_t< !std::is_same< T, bfloat16 >::value &&(std::is_scalar< T >::value||std::is_same_v< T, half >), std::conditional_t< std::is_floating_point< T >::value, T, std::conditional_t< std::is_same_v< T, half >, float, bfloat16 > > > | operator* (const bfloat16 &hf, const T &val)
template<typename T>
std::enable_if_t< !std::is_same< T, bfloat16 >::value &&(std::is_scalar< T >::value||std::is_same_v< T, half >), std::conditional_t< std::is_floating_point< T >::value, T, std::conditional_t< std::is_same_v< T, half >, float, bfloat16 > > > | operator* (const T &val, const bfloat16 &hf)
template<typename T>
std::enable_if_t< !std::is_same< T, bfloat16 >::value &&(std::is_scalar< T >::value||std::is_same_v< T, half >), std::conditional_t< std::is_floating_point< T >::value, T, std::conditional_t< std::is_same_v< T, half >, float, bfloat16 > > > | operator/ (const bfloat16 &hf, const T &val)
template<typename T>
std::enable_if_t< !std::is_same< T, bfloat16 >::value &&(std::is_scalar< T >::value||std::is_same_v< T, half >), std::conditional_t< std::is_floating_point< T >::value, T, std::conditional_t< std::is_same_v< T, half >, float, bfloat16 > > > | operator/ (const T &val, const bfloat16 &hf)

## Detailed Description

A class providing basic support for bfloat16 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:

- ginkgo/core/base/bfloat16.hpp