MCPcopy Create free account
hub / github.com/Vectorized/function-selector-miner / chi_

Function chi_

src/lib.rs:184–198  ·  view source on GitHub ↗
(a: &mut [T], b: &mut [T], n: usize)

Source from the content-addressed store, hash-verified

182
183#[inline(always)]
184fn chi_<T>(a: &mut [T], b: &mut [T], n: usize)
185where
186 T: Not<Output = T> + BitAnd<Output = T> + BitXor<Output = T> + Copy,
187{
188 b[0] = a[n];
189 b[1] = a[n + 1];
190 b[2] = a[n + 2];
191 b[3] = a[n + 3];
192 b[4] = a[n + 4];
193 a[n] = b[0] ^ ((!b[1]) & b[2]);
194 a[n + 1] = b[1] ^ ((!b[2]) & b[3]);
195 a[n + 2] = b[2] ^ ((!b[3]) & b[4]);
196 a[n + 3] = b[3] ^ ((!b[4]) & b[0]);
197 a[n + 4] = b[4] ^ ((!b[0]) & b[1]);
198}
199
200#[inline(always)]
201fn iota<T, U>(a: &mut [T], x: U)

Callers 1

chiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected