pub fn trit_at_2bit(packed: &[u8], k: usize) -> i32
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)).
{-1,0,+1}
k
ternary_gemm_2bit.wgsl::pair_at
(code==1) - (code==2)