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

Public Types

typedef half_impl::__half_raw __half_raw
 

Public Member Functions

EIGEN_CONSTEXPR half ()
 
EIGEN_CONSTEXPR half (bool b)
 
EIGEN_CONSTEXPR half (const __half_raw &h)
 
 half (float f)
 
template<typename RealScalar >
 half (std::complex< RealScalar > c)
 
template<class T >
 half (T val)
 
 operator float () const
 
- Public Member Functions inherited from Eigen::half_impl::half_base
EIGEN_CONSTEXPR half_base ()
 
EIGEN_CONSTEXPR half_base (const __half_raw &h)
 
- Public Member Functions inherited from Eigen::half_impl::__half_raw
EIGEN_CONSTEXPR __half_raw ()
 
EIGEN_CONSTEXPR __half_raw (numext::uint16_t raw)
 

Additional Inherited Members

- Public Attributes inherited from Eigen::half_impl::__half_raw
numext::uint16_t x
 

Detailed Description

Definition at line 142 of file Half.h.

Member Typedef Documentation

◆ __half_raw

Definition at line 150 of file Half.h.

Constructor & Destructor Documentation

◆ half() [1/6]

EIGEN_CONSTEXPR Eigen::half::half ( )
inline

Definition at line 163 of file Half.h.

163 {}

◆ half() [2/6]

EIGEN_CONSTEXPR Eigen::half::half ( const __half_raw h)
inline

Definition at line 165 of file Half.h.

165 : half_impl::half_base(h) {}

◆ half() [3/6]

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

Definition at line 178 of file Half.h.

179  : half_impl::half_base(half_impl::raw_uint16_to_half(b ? 0x3c00 : 0)) {}
Array< int, 3, 1 > b
EIGEN_CONSTEXPR __half_raw raw_uint16_to_half(numext::uint16_t x)
Definition: Half.h:551

◆ half() [4/6]

template<class T >
Eigen::half::half ( T  val)
inlineexplicit

Definition at line 181 of file Half.h.

182  : half_impl::half_base(half_impl::float_to_half_rtne(static_cast<float>(val))) {}
__half_raw float_to_half_rtne(float ff)
Definition: Half.h:585

◆ half() [5/6]

Eigen::half::half ( float  f)
inlineexplicit

Definition at line 183 of file Half.h.

184  : half_impl::half_base(half_impl::float_to_half_rtne(f)) {}

◆ half() [6/6]

template<typename RealScalar >
Eigen::half::half ( std::complex< RealScalar >  c)
inlineexplicit

Definition at line 189 of file Half.h.

190  : half_impl::half_base(half_impl::float_to_half_rtne(static_cast<float>(c.real()))) {}
Array33i c

Member Function Documentation

◆ operator float()

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

Definition at line 192 of file Half.h.

192  { // NOLINT: Allow implicit conversion to float, because it is lossless.
193  return half_impl::half_to_float(*this);
194  }
float half_to_float(__half_raw h)
Definition: Half.h:654

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