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

Function theta

src/lib.rs:97–117  ·  view source on GitHub ↗
(a: &mut [T; 25], b: &mut [T; 5])

Source from the content-addressed store, hash-verified

95
96#[inline(always)]
97pub fn theta<T>(a: &mut [T; 25], b: &mut [T; 5])
98where
99 T: BitXorAssign
100 + BitXor<Output = T>
101 + Shl<u32, Output = T>
102 + Shr<u32, Output = T>
103 + BitOr<Output = T>
104 + Copy,
105{
106 b[0] = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20];
107 b[1] = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21];
108 b[2] = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22];
109 b[3] = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23];
110 b[4] = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24];
111
112 theta_(a, b, 4, 1, 0);
113 theta_(a, b, 0, 2, 1);
114 theta_(a, b, 1, 3, 2);
115 theta_(a, b, 2, 4, 3);
116 theta_(a, b, 3, 0, 4);
117}
118
119#[inline(always)]
120fn rho_pi<T>(a: &mut [T; 25], b: &mut [T; 5])

Callers 2

bench_thetaFunction · 0.85
iterFunction · 0.85

Calls 1

theta_Function · 0.85

Tested by

no test coverage detected