HDK
|
#include <float16.h>
Classes | |
struct | FromBitsT |
Public Types | |
using | Base = onnxruntime_float16::BFloat16Impl< BFloat16 > |
Public Member Functions | |
BFloat16 ()=default | |
constexpr ORT_HOST_DEVICE | BFloat16 (unsigned short bits, FromBitsT) noexcept |
ORT_HOST_DEVICE | BFloat16 (float v) noexcept |
ORT_HOST_DEVICE float | ToFloat () const noexcept |
ORT_HOST_DEVICE | operator float () const noexcept |
ORT_HOST_DEVICE bool | operator== (const BFloat16 &rhs) const noexcept |
ORT_HOST_DEVICE bool | operator!= (const BFloat16 &rhs) const noexcept |
ORT_HOST_DEVICE bool | operator< (const BFloat16 &rhs) const noexcept |
ORT_HOST_DEVICE bool | IsNegativeHostDevice () const noexcept |
ORT_HOST_DEVICE bool | IsNaNHostDevice () const noexcept |
Public Member Functions inherited from onnxruntime_float16::BFloat16Impl< BFloat16 > | |
BFloat16Impl ()=default | |
bool | IsNegative () const noexcept |
Checks if the value is negative More... | |
bool | IsNaN () const noexcept |
Tests if the value is NaN More... | |
bool | IsFinite () const noexcept |
Tests if the value is finite More... | |
bool | IsPositiveInfinity () const noexcept |
Tests if the value represents positive infinity. More... | |
bool | IsNegativeInfinity () const noexcept |
Tests if the value represents negative infinity More... | |
bool | IsInfinity () const noexcept |
Tests if the value is either positive or negative infinity. More... | |
bool | IsNaNOrZero () const noexcept |
Tests if the value is NaN or zero. Useful for comparisons. More... | |
bool | IsNormal () const noexcept |
Tests if the value is normal (not zero, subnormal, infinite, or NaN). More... | |
bool | IsSubnormal () const noexcept |
Tests if the value is subnormal (denormal). More... | |
BFloat16 | Abs () const noexcept |
Creates an instance that represents absolute value. More... | |
BFloat16 | Negate () const noexcept |
Creates a new instance with the sign flipped. More... | |
Static Public Member Functions | |
static constexpr ORT_HOST_DEVICE FromBitsT | FromBits () noexcept |
static constexpr ORT_HOST_DEVICE BFloat16 | FromBits (uint16_t bits) noexcept |
static ORT_HOST_DEVICE bool | AreZeroHostDevice (const BFloat16Impl &lhs, const BFloat16Impl &rhs) noexcept |
Static Public Member Functions inherited from onnxruntime_float16::BFloat16Impl< BFloat16 > | |
static bool | AreZero (const BFloat16Impl &lhs, const BFloat16Impl &rhs) noexcept |
IEEE defines that positive and negative zero are equal, this gives us a quick equality check for two values by or'ing the private bits together and stripping the sign. They are both zero, and therefore equivalent, if the resulting value is still zero. More... | |
Static Public Attributes | |
static const BFloat16 | NaN |
static const BFloat16 | NegativeNaN |
static const BFloat16 | Infinity |
static const BFloat16 | NegativeInfinity |
static const BFloat16 | Epsilon |
static const BFloat16 | MinValue |
static const BFloat16 | MaxValue |
static const BFloat16 | Zero |
static const BFloat16 | One |
static const BFloat16 | MinusOne |
Static Public Attributes inherited from onnxruntime_float16::BFloat16Impl< BFloat16 > | |
static constexpr uint16_t | kSignMask |
static constexpr uint16_t | kBiasedExponentMask |
static constexpr uint16_t | kPositiveInfinityBits |
static constexpr uint16_t | kNegativeInfinityBits |
static constexpr uint16_t | kPositiveQNaNBits |
static constexpr uint16_t | kNegativeQNaNBits |
static constexpr uint16_t | kSignaling_NaNBits |
static constexpr uint16_t | kEpsilonBits |
static constexpr uint16_t | kMinValueBits |
static constexpr uint16_t | kMaxValueBits |
static constexpr uint16_t | kRoundToNearest |
static constexpr uint16_t | kOneBits |
static constexpr uint16_t | kMinusOneBits |
Additional Inherited Members | |
Public Attributes inherited from onnxruntime_float16::BFloat16Impl< BFloat16 > | |
uint16_t | val |
Protected Member Functions inherited from onnxruntime_float16::BFloat16Impl< BFloat16 > | |
float | ToFloatImpl () const noexcept |
Converts bfloat16 to float More... | |
uint16_t | AbsImpl () const noexcept |
Creates an instance that represents absolute value. More... | |
uint16_t | NegateImpl () const noexcept |
Creates a new instance with the sign flipped. More... | |
Static Protected Member Functions inherited from onnxruntime_float16::BFloat16Impl< BFloat16 > | |
static uint16_t | ToUint16Impl (float v) noexcept |
Converts from float to uint16_t float16 representation More... | |
|
default |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
static |