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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
pub type Pixel = ;
pub type Image2x2 = ;
pub type Image4x4 = ;
pub const R: Pixel = ;
pub const G: Pixel = ;
pub const B: Pixel = ;
/// This is a 4 by 4 testing image that represents the hypothetical RGB flag, which looks something
/// like this:
///
/// ```text
/// .. .. .. ..
/// RR RR RR RR
/// RR GG GG RR
/// RR BB BB RR
/// RR RR RR RR
/// .. .. .. ..
/// ```
/// (It consists of a two-pixel green and blue band, wrapped in a red one-pixel border.)
///
/// Where `RR` represents a red pixel, `GG` a green one and `BB` a blue one.
pub const RGB_FLAG_RAW: Image4x4 = ;
/// This is the [`RGB_FLAG_RAW`] image with contiguous memory layout so that it can be easily put
/// into a host or device buffer.
pub const RGB_FLAG: = flatten!;
/// Convenience macro to flatten a nested array to a flat array.
///
/// # Usage
///
/// ```ignore
/// let array = [
/// [1, 2, 3],
/// [4, 5, 6],
/// [7, 8, 9],
/// ];
/// assert_eq!(
/// &flatten!(array),
/// &[1, 2, 3, 4, 5, 6, 7, 8, 9],
/// );
/// ```
pub use flatten;