Skip to content

tenzr::bfloat16

16-bit brain floating-point element type stored as raw bits.

#include <dtype.h>

Public Functions

Name
bfloat16() =default
bfloat16(float value)
bfloat16(double value)
operator float() const
operator double() const

Public Attributes

Name
uint16_t bits

Friends

Name
bool operator==(const bfloat16 & , const bfloat16 & )

Public Functions Documentation

function bfloat16

bfloat16() =default

function bfloat16

explicit bfloat16(
    float value
)

function bfloat16

explicit bfloat16(
    double value
)

function operator float

operator float() const

function operator double

operator double() const

Public Attributes Documentation

variable bits

uint16_t bits = 0;

Friends

friend operator==

friend bool operator==(
    const bfloat16 & ,

    const bfloat16 & 
);