argamak/format

Types

Numerical formats for tensors.

Each Format uses a specific number of bits to represent a data point.

pub opaque type Format(a)

A type for Native format representations.

pub opaque type Native

Functions

pub fn bfloat16() -> Format(Float)

Creates a 16-bit brain floating-point format.

pub fn float16() -> Format(Float)

Creates a 16-bit floating-point Format.

pub fn float32() -> Format(Float)

Creates a 32-bit floating-point Format.

pub fn float64() -> Format(Float)

Creates a 64-bit floating-point Format.

pub fn int16() -> Format(Int)

Creates a 16-bit signed integer Format.

pub fn int32() -> Format(Int)

Creates a 32-bit signed integer Format.

pub fn int64() -> Format(Int)

Creates a 64-bit signed integer Format.

pub fn int8() -> Format(Int)

Creates an 8-bit signed integer Format.

pub fn to_native(format: Format(a)) -> Native

Converts a given Format into its native representation.

pub fn to_string(format: Format(a)) -> String

Converts a Format into a String.

pub fn uint16() -> Format(Int)

Creates a 16-bit unsigned integer Format.

pub fn uint32() -> Format(Int)

Creates a 32-bit unsigned integer Format.

pub fn uint64() -> Format(Int)

Creates a 64-bit unsigned integer Format.

pub fn uint8() -> Format(Int)

Creates an 8-bit unsigned integer Format.