Eigen::bfloat16 Struct Reference
+ Inheritance diagram for Eigen::bfloat16:

Public Types

typedef bfloat16_impl::__bfloat16_raw __bfloat16_raw
 

Public Member Functions

EIGEN_CONSTEXPR bfloat16 ()
 
EIGEN_CONSTEXPR bfloat16 (bool b)
 
EIGEN_CONSTEXPR bfloat16 (const __bfloat16_raw &h)
 
template<typename RealScalar >
EIGEN_CONSTEXPR bfloat16 (const std::complex< RealScalar > &val)
 
 bfloat16 (float f)
 
template<class T >
EIGEN_CONSTEXPR bfloat16 (T val)
 
 operator float () const
 
- Public Member Functions inherited from Eigen::bfloat16_impl::bfloat16_base
EIGEN_CONSTEXPR bfloat16_base ()
 
EIGEN_CONSTEXPR bfloat16_base (const __bfloat16_raw &h)
 
- Public Member Functions inherited from Eigen::bfloat16_impl::__bfloat16_raw
EIGEN_CONSTEXPR __bfloat16_raw ()
 
EIGEN_CONSTEXPR __bfloat16_raw (unsigned short raw)
 

Additional Inherited Members

- Public Attributes inherited from Eigen::bfloat16_impl::__bfloat16_raw
unsigned short value
 

Detailed Description

Definition at line 100 of file BFloat16.h.

Member Typedef Documentation

◆ __bfloat16_raw

Constructor & Destructor Documentation

◆ bfloat16() [1/6]

EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( )
inline

Definition at line 104 of file BFloat16.h.

104 {}

◆ bfloat16() [2/6]

EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( const __bfloat16_raw h)
inline

Definition at line 106 of file BFloat16.h.

106 : bfloat16_impl::bfloat16_base(h) {}

◆ bfloat16() [3/6]

EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( bool  b)
inlineexplicit

Definition at line 108 of file BFloat16.h.

109  : bfloat16_impl::bfloat16_base(bfloat16_impl::raw_uint16_to_bfloat16(b ? 0x3f80 : 0)) {}
Array< int, 3, 1 > b
EIGEN_CONSTEXPR __bfloat16_raw raw_uint16_to_bfloat16(unsigned short value)

◆ bfloat16() [4/6]

template<class T >
EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( T  val)
inlineexplicit

Definition at line 112 of file BFloat16.h.

113  : bfloat16_impl::bfloat16_base(bfloat16_impl::float_to_bfloat16_rtne<internal::is_integral<T>::value>(static_cast<float>(val))) {}
__bfloat16_raw float_to_bfloat16_rtne(float ff)

◆ bfloat16() [5/6]

Eigen::bfloat16::bfloat16 ( float  f)
inlineexplicit

Definition at line 115 of file BFloat16.h.

116  : bfloat16_impl::bfloat16_base(bfloat16_impl::float_to_bfloat16_rtne<false>(f)) {}
__bfloat16_raw float_to_bfloat16_rtne< false >(float ff)
Definition: BFloat16.h:381

◆ bfloat16() [6/6]

template<typename RealScalar >
EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( const std::complex< RealScalar > &  val)
inlineexplicit

Definition at line 121 of file BFloat16.h.

122  : bfloat16_impl::bfloat16_base(bfloat16_impl::float_to_bfloat16_rtne<false>(static_cast<float>(val.real()))) {}

Member Function Documentation

◆ operator float()

Eigen::bfloat16::operator float ( ) const
inline

Definition at line 124 of file BFloat16.h.

124  { // NOLINT: Allow implicit conversion to float, because it is lossless.
125  return bfloat16_impl::bfloat16_to_float(*this);
126  }
float bfloat16_to_float(__bfloat16_raw h)
Definition: BFloat16.h:571

The documentation for this struct was generated from the following file: