HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime::MLFloat16 Struct Reference

#include <float16.h>

+ Inheritance diagram for onnxruntime::MLFloat16:

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...
 

Detailed Description

Definition at line 29 of file float16.h.

Member Typedef Documentation

Constructor & Destructor Documentation

onnxruntime::MLFloat16::MLFloat16 ( )
default
onnxruntime::MLFloat16::MLFloat16 ( float  v)
inlineexplicitnoexcept

Definition at line 42 of file float16.h.

Member Function Documentation

static constexpr MLFloat16 onnxruntime::MLFloat16::FromBits ( uint16_t  x)
inlinestaticnoexcept

Definition at line 38 of file float16.h.

onnxruntime::MLFloat16::operator float ( ) const
inlinenoexcept

Definition at line 81 of file float16.h.

float onnxruntime::MLFloat16::ToFloat ( ) const
inlinenoexcept

Definition at line 57 of file float16.h.

Member Data Documentation

const MLFloat16 onnxruntime::MLFloat16::Epsilon
static

Definition at line 48 of file float16.h.

const MLFloat16 onnxruntime::MLFloat16::Infinity
static

Definition at line 46 of file float16.h.

const MLFloat16 onnxruntime::MLFloat16::MaxValue
static

Definition at line 50 of file float16.h.

const MLFloat16 onnxruntime::MLFloat16::MinusOne
static

Definition at line 53 of file float16.h.

const MLFloat16 onnxruntime::MLFloat16::MinValue
static

Definition at line 49 of file float16.h.

const MLFloat16 onnxruntime::MLFloat16::NaN
static

Definition at line 44 of file float16.h.

const MLFloat16 onnxruntime::MLFloat16::NegativeInfinity
static

Definition at line 47 of file float16.h.

const MLFloat16 onnxruntime::MLFloat16::NegativeNaN
static

Definition at line 45 of file float16.h.

const MLFloat16 onnxruntime::MLFloat16::One
static

Definition at line 52 of file float16.h.

const MLFloat16 onnxruntime::MLFloat16::Zero
static

Definition at line 51 of file float16.h.


The documentation for this struct was generated from the following file: