OnnxRuntime
Ort::BFloat16_t Struct Reference

bfloat16 (Brain Floating Point) data type More...

#include <onnxruntime_cxx_api.h>

Public Member Functions

constexpr BFloat16_t () noexcept
 
constexpr BFloat16_t (uint16_t v) noexcept
 
constexpr operator uint16_t () const noexcept
 
constexpr bool operator== (const BFloat16_t &rhs) const noexcept
 
constexpr bool operator!= (const BFloat16_t &rhs) const noexcept
 

Public Attributes

uint16_t value
 

Detailed Description

bfloat16 (Brain Floating Point) data type

It is necessary for type dispatching to make use of C++ API The type is implicitly convertible to/from uint16_t. The size of the structure should align with uint16_t and one can freely cast uint16_t buffers to/from Ort::BFloat16_t to feed and retrieve data.

See also code examples for Float16_t above.

Constructor & Destructor Documentation

◆ BFloat16_t() [1/2]

constexpr Ort::BFloat16_t::BFloat16_t ( )
inlineconstexprnoexcept

◆ BFloat16_t() [2/2]

constexpr Ort::BFloat16_t::BFloat16_t ( uint16_t  v)
inlineconstexprnoexcept

Member Function Documentation

◆ operator uint16_t()

constexpr Ort::BFloat16_t::operator uint16_t ( ) const
inlineconstexprnoexcept

◆ operator!=()

constexpr bool Ort::BFloat16_t::operator!= ( const BFloat16_t rhs) const
inlineconstexprnoexcept

◆ operator==()

constexpr bool Ort::BFloat16_t::operator== ( const BFloat16_t rhs) const
inlineconstexprnoexcept

Member Data Documentation

◆ value

uint16_t Ort::BFloat16_t::value