Skip to main content

ClikaRT::dtype::tfloat32_t

struct

Header: ClikaRT/compute/scalar_types.h

TensorFloat-32: 1 sign + 8 exponent + 10 effective mantissa, bias 127, stored in a 32-bit container with the low 13 mantissa bits zeroed. Range = fp32, precision ≈ fp16. Conversion from fp32 round-to-nearest-even-narrows the low 13 bits; conversion to fp32 is identity. from_truncated drops the bits without rounding.

Static member functions

from_bits()

static constexpr tfloat32_t from_bits(std::uint32_t b) noexcept

Reinterpret a raw 32-bit encoding without converting.

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

from_truncated()

static tfloat32_t from_truncated(float f) noexcept

Convert from fp32 by truncation (drop the low 13 bits, no rounding).

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

Member functions

tfloat32_t()

constexpr constexpr tfloat32_t() noexcept=default

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

tfloat32_t(float)

explicit tfloat32_t(float f) noexcept

Convert from fp32 (round-to-nearest-even-narrow the low 13 bits).

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

operator float()

operator float() const noexcept

Convert to fp32 (identity).

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

Data members

bits

std::uint32_t bits = 0

Raw 32-bit encoding (the storage/ABI form).

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

Friends

operator==

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

Compares a and b by dequantized value (IEEE rules; a NaN operand compares false).

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

operator!=

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

Compares a and b by dequantized value (IEEE rules; a NaN operand compares false).

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

operator<

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

Compares a and b by dequantized value (IEEE rules; a NaN operand compares false).

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

operator<=

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

Compares a and b by dequantized value (IEEE rules; a NaN operand compares false).

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

operator>

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

Compares a and b by dequantized value (IEEE rules; a NaN operand compares false).

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

operator>=

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

Compares a and b by dequantized value (IEEE rules; a NaN operand compares false).

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