Skip to main content

ClikaRT::dtype::float6_e2m3_t

struct

Header: ClikaRT/compute/scalar_types.h

FP6 E2M3: 1 sign + 2 exponent + 3 mantissa, bias 1. Range ±7.5, smallest normal 1.0, eps 0.125. Low 6 bits of a byte.

Static member functions

from_bits()

static constexpr float6_e2m3_t from_bits(std::uint8_t b) noexcept

Reinterpret the low 6 bits of b as an encoding without converting.

Declared in ClikaRT/compute/scalar_types.h, line 283

Member functions

float6_e2m3_t()

constexpr constexpr float6_e2m3_t() noexcept=default

Declared in ClikaRT/compute/scalar_types.h, line 274

float6_e2m3_t(float)

explicit float6_e2m3_t(float f) noexcept

Convert from fp32 (round-to-nearest-even; saturates on overflow).

Declared in ClikaRT/compute/scalar_types.h, line 277

operator float()

operator float() const noexcept

Convert to fp32 (lossless).

Declared in ClikaRT/compute/scalar_types.h, line 280

Data members

bits

std::uint8_t bits = 0

Raw encoding in the low 6 bits (the storage/ABI form).

Declared in ClikaRT/compute/scalar_types.h, line 272

Friends

operator==

friend bool operator==(float6_e2m3_t a, float6_e2m3_t b) noexcept

Compares a and b by dequantized value.

Declared in ClikaRT/compute/scalar_types.h, line 285

operator!=

friend bool operator!=(float6_e2m3_t a, float6_e2m3_t b) noexcept

Compares a and b by dequantized value.

Declared in ClikaRT/compute/scalar_types.h, line 286

operator<

friend bool operator<(float6_e2m3_t a, float6_e2m3_t b) noexcept

Compares a and b by dequantized value.

Declared in ClikaRT/compute/scalar_types.h, line 287

operator<=

friend bool operator<=(float6_e2m3_t a, float6_e2m3_t b) noexcept

Compares a and b by dequantized value.

Declared in ClikaRT/compute/scalar_types.h, line 288

operator>

friend bool operator>(float6_e2m3_t a, float6_e2m3_t b) noexcept

Compares a and b by dequantized value.

Declared in ClikaRT/compute/scalar_types.h, line 289

operator>=

friend bool operator>=(float6_e2m3_t a, float6_e2m3_t b) noexcept

Compares a and b by dequantized value.

Declared in ClikaRT/compute/scalar_types.h, line 290