HDK
|
#include <float16.h>
Public Types | |
using | Base = onnxruntime_float16::Float16Impl< MLFloat16 > |
Public Member Functions | |
MLFloat16 ()=default | |
MLFloat16 (float v) noexcept | |
float | ToFloat () const noexcept |
operator float () const noexcept | |
Public Member Functions inherited from onnxruntime_float16::Float16Impl< MLFloat16 > | |
Float16Impl ()=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... | |
MLFloat16 | Abs () const noexcept |
Creates an instance that represents absolute value. More... | |
MLFloat16 | Negate () const noexcept |
Creates a new instance with the sign flipped. More... | |
bool | operator== (const Float16Impl &rhs) const noexcept |
bool | operator!= (const Float16Impl &rhs) const noexcept |
bool | operator< (const Float16Impl &rhs) const noexcept |
Static Public Member Functions | |
static constexpr MLFloat16 | FromBits (uint16_t x) noexcept |
Static Public Member Functions inherited from onnxruntime_float16::Float16Impl< MLFloat16 > | |
static bool | AreZero (const Float16Impl &lhs, const Float16Impl &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 MLFloat16 | NaN |
static const MLFloat16 | NegativeNaN |
static const MLFloat16 | Infinity |
static const MLFloat16 | NegativeInfinity |
static const MLFloat16 | Epsilon |
static const MLFloat16 | MinValue |
static const MLFloat16 | MaxValue |
static const MLFloat16 | Zero |
static const MLFloat16 | One |
static const MLFloat16 | MinusOne |
Static Public Attributes inherited from onnxruntime_float16::Float16Impl< MLFloat16 > | |
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 | kEpsilonBits |
static constexpr uint16_t | kMinValueBits |
static constexpr uint16_t | kMaxValueBits |
static constexpr uint16_t | kOneBits |
static constexpr uint16_t | kMinusOneBits |
Additional Inherited Members | |
Public Attributes inherited from onnxruntime_float16::Float16Impl< MLFloat16 > | |
uint16_t | val |
Protected Member Functions inherited from onnxruntime_float16::Float16Impl< MLFloat16 > | |
float | ToFloatImpl () const noexcept |
Converts float16 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::Float16Impl< MLFloat16 > | |
static constexpr uint16_t | ToUint16Impl (float v) noexcept |
Converts from float to uint16_t float16 representation More... | |
|
default |
|
inlineexplicitnoexcept |
|
inlinestaticnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
static |