Skip to main content

decode_shift

Function decode_shift 

Source
pub fn decode_shift(index: usize) -> (ShiftVariant, usize)
Expand description

The (variant, amount) pair a shift index names.

This inverts Shift::index over the reduction’s index space rather than over well-formed shifts: the amount axis spans Word::BITS for every variant, so a half-word (*32) variant’s index may carry an amount no Shift of that variant could hold. Such an index is a hypercube vertex the sumcheck ranges over all the same.

§Panics

Panics unless the index is below [SHIFT_COUNT].