![]() |
Project
|
Shared implementation between public and internal classes. CRTP pattern. More...
#include <GPUORTFloat16.h>
Public Member Functions | |
| GPUdDefault () Float16Impl()=default | |
| GPUd () bool IsNegative() const noexcept | |
| Checks if the value is negative. | |
| GPUd () bool IsNaN() const noexcept | |
| Tests if the value is NaN. | |
| GPUd () bool IsFinite() const noexcept | |
| Tests if the value is finite. | |
| GPUd () bool IsPositiveInfinity() const noexcept | |
| Tests if the value represents positive infinity. | |
| GPUd () bool IsNegativeInfinity() const noexcept | |
| Tests if the value represents negative infinity. | |
| GPUd () bool IsInfinity() const noexcept | |
| Tests if the value is either positive or negative infinity. | |
| GPUd () bool IsNaNOrZero() const noexcept | |
| Tests if the value is NaN or zero. Useful for comparisons. | |
| GPUd () bool IsNormal() const noexcept | |
| Tests if the value is normal (not zero, subnormal, infinite, or NaN). | |
| GPUd () bool IsSubnormal() const noexcept | |
| Tests if the value is subnormal (denormal). | |
| GPUd () Derived Abs() const noexcept | |
| Creates an instance that represents absolute value. | |
| GPUd () Derived Negate() const noexcept | |
| Creates a new instance with the sign flipped. | |
| GPUd () static bool AreZero(const Float16Impl &lhs | |
| 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} |
| const Float16Impl &rhs | noexcept |
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 | |
| GPUd () const expr static uint16_t ToUint16Impl(float v) noexcept | |
| Converts from float to uint16_t float16 representation. | |
| GPUd () float ToFloatImpl() const noexcept | |
| Converts float16 to float. | |
| GPUd () uint16_t AbsImpl() const noexcept | |
| Creates an instance that represents absolute value. | |
| GPUd () uint16_t NegateImpl() const noexcept | |
| Creates a new instance with the sign flipped. | |
Shared implementation between public and internal classes. CRTP pattern.
Definition at line 54 of file GPUORTFloat16.h.
|
inlinenoexcept |
|
inlinenoexcept |
Tests if the value is either positive or negative infinity.
Definition at line 154 of file GPUORTFloat16.h.
|
inlinenoexcept |
|
inlinenoexcept |
Tests if the value is NaN or zero. Useful for comparisons.
Definition at line 163 of file GPUORTFloat16.h.
|
inlinenoexcept |
Checks if the value is negative.
Definition at line 109 of file GPUORTFloat16.h.
|
inlinenoexcept |
Tests if the value represents negative infinity.
Definition at line 145 of file GPUORTFloat16.h.
|
inlinenoexcept |
Tests if the value is normal (not zero, subnormal, infinite, or NaN).
Definition at line 173 of file GPUORTFloat16.h.
|
inlinenoexcept |
Tests if the value represents positive infinity.
Definition at line 136 of file GPUORTFloat16.h.
|
inlinenoexcept |
Tests if the value is subnormal (denormal).
Definition at line 185 of file GPUORTFloat16.h.
|
protectednoexcept |
Converts from float to uint16_t float16 representation.
| v |
|
inlinenoexcept |
Creates an instance that represents absolute value.
Definition at line 197 of file GPUORTFloat16.h.
|
inlinenoexcept |
Creates a new instance with the sign flipped.
Definition at line 203 of file GPUORTFloat16.h.
|
protectednoexcept |
Converts float16 to float.
| o2::OrtDataType::Float16Impl< Derived >::GPUd | ( | ) | const & |
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 |
|
inlineprotectednoexcept |
Creates an instance that represents absolute value.
Definition at line 73 of file GPUORTFloat16.h.
|
inlineprotectednoexcept |
Creates a new instance with the sign flipped.
Definition at line 82 of file GPUORTFloat16.h.
|
default |
|
staticconstexpr |
Definition at line 90 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 95 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 97 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 99 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 96 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 92 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 94 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 98 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 91 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 93 of file GPUORTFloat16.h.
|
staticconstexpr |
Definition at line 89 of file GPUORTFloat16.h.
| const Float16Impl& rhs o2::OrtDataType::Float16Impl< Derived >::noexcept |
Definition at line 213 of file GPUORTFloat16.h.
| uint16_t o2::OrtDataType::Float16Impl< Derived >::val {0} |
Definition at line 101 of file GPUORTFloat16.h.