![]() |
Project
|
Shared implementation between public and internal classes. CRTP pattern. More...
#include <GPUORTFloat16.h>
Public Member Functions | |
Float16Impl ()=default | |
bool | IsNegative () const noexcept |
Checks if the value is negative. | |
bool | IsNaN () const noexcept |
Tests if the value is NaN. | |
bool | IsFinite () const noexcept |
Tests if the value is finite. | |
bool | IsPositiveInfinity () const noexcept |
Tests if the value represents positive infinity. | |
bool | IsNegativeInfinity () const noexcept |
Tests if the value represents negative infinity. | |
bool | IsInfinity () const noexcept |
Tests if the value is either positive or negative infinity. | |
bool | IsNaNOrZero () const noexcept |
Tests if the value is NaN or zero. Useful for comparisons. | |
bool | IsNormal () const noexcept |
Tests if the value is normal (not zero, subnormal, infinite, or NaN). | |
bool | IsSubnormal () const noexcept |
Tests if the value is subnormal (denormal). | |
Derived | Abs () const noexcept |
Creates an instance that represents absolute value. | |
Derived | Negate () const noexcept |
Creates a new instance with the sign flipped. | |
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 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. | |
Public Attributes | |
uint16_t | val {0} |
Static Public Attributes | |
static constexpr uint16_t | kSignMask = 0x8000U |
static constexpr uint16_t | kBiasedExponentMask = 0x7C00U |
static constexpr uint16_t | kPositiveInfinityBits = 0x7C00U |
static constexpr uint16_t | kNegativeInfinityBits = 0xFC00U |
static constexpr uint16_t | kPositiveQNaNBits = 0x7E00U |
static constexpr uint16_t | kNegativeQNaNBits = 0xFE00U |
static constexpr uint16_t | kEpsilonBits = 0x4170U |
static constexpr uint16_t | kMinValueBits = 0xFBFFU |
static constexpr uint16_t | kMaxValueBits = 0x7BFFU |
static constexpr uint16_t | kOneBits = 0x3C00U |
static constexpr uint16_t | kMinusOneBits = 0xBC00U |
Protected Member Functions | |
float | ToFloatImpl () const noexcept |
Converts float16 to float. | |
uint16_t | AbsImpl () const noexcept |
Creates an instance that represents absolute value. | |
uint16_t | NegateImpl () const noexcept |
Creates a new instance with the sign flipped. | |
Static Protected Member Functions | |
static constexpr uint16_t | ToUint16Impl (float v) noexcept |
Converts from float to uint16_t float16 representation. | |
Shared implementation between public and internal classes. CRTP pattern.
Definition at line 46 of file GPUORTFloat16.h.
|
default |
|
inlinenoexcept |
Creates an instance that represents absolute value.
Definition at line 189 of file GPUORTFloat16.h.
|
inlineprotectednoexcept |
Creates an instance that represents absolute value.
Definition at line 65 of file GPUORTFloat16.h.
|
inlinestaticnoexcept |
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.
lhs | first value |
rhs | second value |
Definition at line 205 of file GPUORTFloat16.h.
|
inlinenoexcept |
|
inlinenoexcept |
Tests if the value is either positive or negative infinity.
Definition at line 146 of file GPUORTFloat16.h.
|
inlinenoexcept |
|
inlinenoexcept |
Tests if the value is NaN or zero. Useful for comparisons.
Definition at line 155 of file GPUORTFloat16.h.
|
inlinenoexcept |
Checks if the value is negative.
Definition at line 101 of file GPUORTFloat16.h.
|
inlinenoexcept |
Tests if the value represents negative infinity.
Definition at line 137 of file GPUORTFloat16.h.
|
inlinenoexcept |
Tests if the value is normal (not zero, subnormal, infinite, or NaN).
Definition at line 165 of file GPUORTFloat16.h.
|
inlinenoexcept |
Tests if the value represents positive infinity.
Definition at line 128 of file GPUORTFloat16.h.
|
inlinenoexcept |
Tests if the value is subnormal (denormal).
Definition at line 177 of file GPUORTFloat16.h.
|
inlinenoexcept |
Creates a new instance with the sign flipped.
Definition at line 195 of file GPUORTFloat16.h.
|
inlineprotectednoexcept |
Creates a new instance with the sign flipped.
Definition at line 74 of file GPUORTFloat16.h.
|
inlinenoexcept |
Definition at line 219 of file GPUORTFloat16.h.
|
inlinenoexcept |
Definition at line 221 of file GPUORTFloat16.h.
|
inlinenoexcept |
Definition at line 210 of file GPUORTFloat16.h.
|
inlineprotectednoexcept |
Converts float16 to float.
Definition at line 319 of file GPUORTFloat16.h.
|
inlinestaticconstexprprotectednoexcept |
Converts from float to uint16_t float16 representation.
v |
Definition at line 270 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 82 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 87 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 89 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 91 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 88 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 84 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 86 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 90 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 83 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 85 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 81 of file GPUORTFloat16.h.
uint16_t o2::OrtDataType::Float16Impl< Derived >::val {0} |
Definition at line 93 of file GPUORTFloat16.h.