Skip to content

Commit c8dc217

Browse files
committed
simd: rustfmt the exchange tests
format/stable failed on the previous commit. No logic change.
1 parent 0a076aa commit c8dc217

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/simd.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -922,9 +922,8 @@ mod tests {
922922
}
923923

924924
// Row r, lane c = r*16 + c. A transpose must yield row r, lane c = c*16 + r.
925-
let mut m: [U32x16; 16] = core::array::from_fn(|r| {
926-
U32x16::from_array(core::array::from_fn(|c| (r * 16 + c) as u32))
927-
});
925+
let mut m: [U32x16; 16] =
926+
core::array::from_fn(|r| U32x16::from_array(core::array::from_fn(|c| (r * 16 + c) as u32)));
928927

929928
stage::<1>(&mut m);
930929
stage::<2>(&mut m);
@@ -954,10 +953,8 @@ mod tests {
954953
4 => va.exchange::<4>(vb),
955954
_ => va.exchange::<8>(vb),
956955
};
957-
let want_lo: [u32; 16] =
958-
core::array::from_fn(|c| if c & g == 0 { a[c] } else { b[c ^ g] });
959-
let want_hi: [u32; 16] =
960-
core::array::from_fn(|c| if c & g != 0 { b[c] } else { a[c ^ g] });
956+
let want_lo: [u32; 16] = core::array::from_fn(|c| if c & g == 0 { a[c] } else { b[c ^ g] });
957+
let want_hi: [u32; 16] = core::array::from_fn(|c| if c & g != 0 { b[c] } else { a[c ^ g] });
961958
assert_eq!(lo.to_array(), want_lo, "exchange::<{g}> lo");
962959
assert_eq!(hi.to_array(), want_hi, "exchange::<{g}> hi");
963960
}

0 commit comments

Comments
 (0)