Skip to main content

trit_at_2bit

Function trit_at_2bit 

Source
pub fn trit_at_2bit(packed: &[u8], k: usize) -> i32
Expand description

Trit value {-1,0,+1} at linear index k from 2-bit packing — the branchless mirror of ternary_gemm_2bit.wgsl::pair_at ((code==1) - (code==2)).