Skip to main content

expand

Function expand 

Source
pub fn expand<F, N>(
    scope: &Scope,
    word: <u32 as CubeType>::ExpandType,
) -> <Vector<F, N> as CubeType>::ExpandType
where F: Numeric, N: Size,
Expand description

Decode the N e2m1 codes packed into the low 4 * N bits of word, lowest nibble first.

The storage order is the host e2m1x2’s: element 0 in the low nibble, element 1 in the high one. Written against N rather than fixed at two so a wider native pack decodes the same way.