Runtime tests: the whole refills' pattern steps by as_chunks_mut, as clippy asks

Clippy under --cfg m2v_gpu and --cfg m2v_cpu_icd refused chunks_exact_mut with a constant
size in whole_copy_in.rs (check job m3-max-76207). The step is unchanged: each byte adds 37,
eight at a time, the remainder one at a time.
This commit is contained in:
Anees Iqbal committed 2026-11-26 23:59:13 -08:00
1 parent 064bb96450
commit bfbc89b585
1 file changed
+5 -5
@@ -143,13 +143,13 @@ fn pattern(x: u32, y: u32) -> u8 {
fn advance(bytes: &mut [u8]) {
const K: u64 = 0x2525_2525_2525_2525;
const H: u64 = 0x8080_8080_8080_8080;
let mut chunks = bytes.chunks_exact_mut(8);
for chunk in &mut chunks {
let a = u64::from_ne_bytes((&*chunk).try_into().expect("eight bytes"));
let (chunks, rest) = bytes.as_chunks_mut::<8>();
for chunk in chunks {
let a = u64::from_ne_bytes(*chunk);
let sum = ((a & !H) + (K & !H)) ^ ((a ^ K) & H);
chunk.copy_from_slice(&sum.to_ne_bytes());
*chunk = sum.to_ne_bytes();
}
for byte in chunks.into_remainder() {
for byte in rest {
*byte = byte.wrapping_add(37);
}
}