Eigen::bfloat16 Struct Reference

#include <BFloat16.h>

+ Inheritance diagram for Eigen::bfloat16:

Public Types

typedef bfloat16_impl::__bfloat16_raw __bfloat16_raw
 

Public Member Functions

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

Additional Inherited Members

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

Member Typedef Documentation

◆ __bfloat16_raw

Constructor & Destructor Documentation

◆ bfloat16() [1/6]

EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( )
inline
104 {}

◆ bfloat16() [2/6]

EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( const __bfloat16_raw h)
inline
106 : bfloat16_impl::bfloat16_base(h) {}

◆ bfloat16() [3/6]

EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( bool  b)
inlineexplicit
109  : bfloat16_impl::bfloat16_base(bfloat16_impl::raw_uint16_to_bfloat16(b ? 0x3f80 : 0)) {}
Scalar * b
Definition: benchVecAdd.cpp:17
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR __bfloat16_raw raw_uint16_to_bfloat16(unsigned short value)

◆ bfloat16() [4/6]

template<class T >
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( T  val)
inlineexplicit
113  : bfloat16_impl::bfloat16_base(
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __bfloat16_raw float_to_bfloat16_rtne(float ff)
squared absolute value
Definition: GlobalFunctions.h:87
val
Definition: calibrate.py:119

◆ bfloat16() [5/6]

EIGEN_DEVICE_FUNC Eigen::bfloat16::bfloat16 ( float  f)
inlineexplicit
117  : bfloat16_impl::bfloat16_base(bfloat16_impl::float_to_bfloat16_rtne<false>(f)) {}
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __bfloat16_raw float_to_bfloat16_rtne< false >(float ff)
Definition: BFloat16.h:391

◆ bfloat16() [6/6]

template<typename RealScalar >
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Eigen::bfloat16::bfloat16 ( const std::complex< RealScalar > &  val)
inlineexplicit
123  : bfloat16_impl::bfloat16_base(bfloat16_impl::float_to_bfloat16_rtne<false>(static_cast<float>(val.real()))) {}

Member Function Documentation

◆ operator float()

EIGEN_DEVICE_FUNC Eigen::bfloat16::operator float ( ) const
inline
125  { // NOLINT: Allow implicit conversion to float, because it is lossless.
126  return bfloat16_impl::bfloat16_to_float(*this);
127  }
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC float bfloat16_to_float(__bfloat16_raw h)
Definition: BFloat16.h:581

References Eigen::bfloat16_impl::bfloat16_to_float().


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