Skip to main content

pack_transposed

Function pack_transposed 

Source
pub fn pack_transposed<T: Packable>(
    input: &[T],
    width: usize,
    output: &mut [T],
) -> Result<()>
Expand description

Packs a transposed vector at a fixed bit width.

The input is 1024 values already in the layout transpose produces, and the output is packed_len words. Every lane is packed independently and the loop over lanes is the one a SIMD implementation replaces with a single register.

ยงErrors

If the input is not VALUES long, if the output is not packed_len long, if width exceeds the width of the type, or if a value does not fit in width bits.