diff --git a/crates/gordian-types/src/tid.rs b/crates/gordian-types/src/tid.rs index ba5c3b2..9926b2d 100644 --- a/crates/gordian-types/src/tid.rs +++ b/crates/gordian-types/src/tid.rs @@ -333,23 +333,23 @@ pub fn parse(tid: &str) -> Result { ); #[rustfmt::skip] - // src - // ╭─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────╮ - // │ ╲ │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │ 11 │ 12 │ - // d ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - // s │ 0 │ < 4 │ > 1 │ │ │ │ │ │ │ │ │ │ │ │ - // t │ 1 │ │ < 7 │ < 2 │ > 3 │ │ │ │ │ │ │ │ │ │ - // │ 2 │ │ │ │ < 5 │ < 0 │ │ │ │ │ │ │ │ │ - // │ 3 │ │ │ │ │ │ < 3 │ > 2 │ │ │ │ │ │ │ - // │ 4 │ │ │ │ │ │ │ < 6 │ < 1 │ > 4 │ │ │ │ │ - // │ 5 │ │ │ │ │ │ │ │ │ < 4 │ > 1 │ │ │ │ - // │ 6 │ │ │ │ │ │ │ │ │ │ < 7 │ < 2 │ > 3 │ │ - // │ 7 │ │ │ │ │ │ │ │ │ │ │ │ < 5 │ > 0 │ - // ╰─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────╯ - - // Lanes 0..=7 are the first left shift from each row above. Lanes 8..=11 are - // additional left shifts from rows 1, 2, 4, and 6. Lane 15 is used for `0`. - let mut l1 = simd_swizzle!(data, [0, 1, 3, 5, 6, 8, 9, 11, 2, 4, 7, 10, 15]); + // src + // ╭─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────╮ + // │ ╲ │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │ 11 │ 12 │ + // d ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + // s │ 0 │ < 4 │ > 1 │ │ │ │ │ │ │ │ │ │ │ │ + // t │ 1 │ │ < 7 │ < 2 │ > 3 │ │ │ │ │ │ │ │ │ │ + // │ 2 │ │ │ │ < 5 │ < 0 │ │ │ │ │ │ │ │ │ + // │ 3 │ │ │ │ │ │ < 3 │ > 2 │ │ │ │ │ │ │ + // │ 4 │ │ │ │ │ │ │ < 6 │ < 1 │ > 4 │ │ │ │ │ + // │ 5 │ │ │ │ │ │ │ │ │ < 4 │ > 1 │ │ │ │ + // │ 6 │ │ │ │ │ │ │ │ │ │ < 7 │ < 2 │ > 3 │ │ + // │ 7 │ │ │ │ │ │ │ │ │ │ │ │ < 5 │ > 0 │ + // ╰─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────╯ + + // Lanes 0..=7 are the first left shift from each row above. Lanes 8..=11 are + // additional left shifts from rows 1, 2, 4, and 6. Lane 15 is used for `0`. + let mut l1 = simd_swizzle!(data, [0, 1, 3, 5, 6, 8, 9, 11, 2, 4, 7, 10, 15]); l1 <<= Simd::from_array([4, 7, 5, 3, 6, 4, 7, 5, 2, 0, 1, 2, 0]); // Shuffle lanes 8, 9, 10, and 11 from l1 into final lanes. Lane 12 is `0`.