One deterministic xorshift64 chunk seeded by `state`.
(state: u64)
| 1967 | |
| 1968 | /// One deterministic xorshift64 chunk seeded by `state`. |
| 1969 | fn shared_chunk(state: u64) -> Vec<u8> { |
| 1970 | let mut x = state; |
| 1971 | let mut out = Vec::with_capacity(shared_chunk_len()); |
| 1972 | for _ in 0..shared_chunk_len() { |
| 1973 | x ^= x << 13; |
| 1974 | x ^= x >> 7; |
| 1975 | x ^= x << 17; |
| 1976 | out.push((x & 0xFF) as u8); |
| 1977 | } |
| 1978 | out |
| 1979 | } |
| 1980 | |
| 1981 | /// Bounded slice view of `chunk`. |
| 1982 | fn slice_len(chunk: &[u8], len: usize) -> &[u8] { |
no test coverage detected