|
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw | raw_uint16_to_half (unsigned short x) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw | float_to_half_rtne (float ff) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC float | half_to_float (__half_raw h) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | operator+ (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | operator* (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | operator- (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | operator/ (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | operator- (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half & | operator+= (half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half & | operator*= (half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half & | operator-= (half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half & | operator/= (half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool | operator== (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool | operator!= (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool | operator< (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool | operator<= (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool | operator> (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool | operator>= (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | operator/ (const half &a, Index b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() | isinf (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() | isnan (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() | isfinite (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | abs (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | exp (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | log (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | log1p (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | log10 (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | sqrt (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | pow (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | sin (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | cos (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | tan (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | tanh (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | floor (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half | ceil (const half &a) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half() | min (const half &a, const half &b) |
| |
| EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half() | max (const half &a, const half &b) |
| |
| EIGEN_ALWAYS_INLINE std::ostream & | operator<< (std::ostream &os, const half &v) |
| |
400 {
401#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300
402 return __half2float(h);
403
404#elif defined(EIGEN_HAS_FP16_C)
405 return _cvtsh_ss(h.
x);
406
407#else
409 const unsigned int shifted_exp = 0x7c00 << 13;
410 float32_bits o;
411
412 o.
u = (h.
x & 0x7fff) << 13;
413 unsigned int exp = shifted_exp & o.u;
414 o.u += (127 - 15) << 23;
415
416
417 if (
exp == shifted_exp) {
418 o.u += (128 - 16) << 23;
419 }
else if (
exp == 0) {
420 o.u += 1 << 23;
422 }
423
424 o.u |= (h.
x & 0x8000) << 16;
425 return o.f;
426#endif
427}
EIGEN_DEVICE_FUNC const ExpReturnType exp() const
Definition ArrayCwiseUnaryOps.h:88
References exp(), Eigen::half_impl::float32_bits::f, Eigen::half_impl::float32_bits::u, and Eigen::half_impl::__half_raw::x.
Referenced by Eigen::half::EIGEN_EXPLICIT_CAST(), Eigen::half::EIGEN_EXPLICIT_CAST(), Eigen::half::EIGEN_EXPLICIT_CAST(), Eigen::half::EIGEN_EXPLICIT_CAST(), Eigen::half::EIGEN_EXPLICIT_CAST(), Eigen::half::EIGEN_EXPLICIT_CAST(), Eigen::half::EIGEN_EXPLICIT_CAST(), Eigen::half::EIGEN_EXPLICIT_CAST(), Eigen::half::EIGEN_EXPLICIT_CAST(), Eigen::half::EIGEN_EXPLICIT_CAST(), and Eigen::half::EIGEN_EXPLICIT_CAST().