Skip to main content

trit_at

Function trit_at 

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

Extract the ternary value {-1,0,+1} at linear weight index k from packed trits — the exact operation ternary_gemm.wgsl::trit_at performs (5 trits/byte, base-3).