1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/// The zigzag a swizzled order walks, which is a walk's own arithmetic and lives with the
/// walk ([`cubek_tile::swizzle`]). Re-exported here because [`GlobalOrder`]'s swizzle arms
/// are its one caller in this crate.
pub use swizzle;
/// Describes the global traversal order as flattened cube position increases.
///
/// - `RowMajor`: standard row-first traversal
/// - `ColMajor`: standard column-first traversal
/// - `SwizzleCol(w)`: zigzag pattern down columns, with `w`-wide steps
/// - `SwizzleRow(w)`: zigzag pattern across rows, with `w`-wide steps
///
/// Special cases:
/// - `SwizzleCol(1)` is equivalent to `ColMajor`
/// - `SwizzleRow(1)` is equivalent to `RowMajor`
///
/// Swizzle modes may fail if their `w` does not divide the problem well.