IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

normalize

def normalize(value: BFloat16) -> UInt16

Returns:

UInt16

def normalize(value: Int32) -> UInt32

Returns:

UInt32

def normalize(value: UInt16) -> UInt16

Returns:

UInt16

def normalize(value: Float32) -> UInt32

Returns:

UInt32

def normalize(value: Scalar) -> Scalar[_uint_type_of_width[bit_width_of[value.dtype]()]()]

Normalize the value to the appropriate unsigned integer type. This is needed for radix sort to work correctly.

Returns:

Scalar[_uint_type_of_width[bit_width_of[value.dtype]()]()]