Skip to content

Commit b3b68a2

Browse files
committed
Quad size 16
1 parent f069df3 commit b3b68a2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/day20.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ struct Line {
147147
line_offset: u8,
148148
}
149149

150-
const QUAD_SIZE: usize = 8;
150+
const QUAD_SIZE: usize = 16;
151151
const QUADS_SIZE: usize = SIZE.div_ceil(QUAD_SIZE);
152152
const QUADS_NEEDED: usize = 20usize.div_ceil(QUAD_SIZE);
153153

@@ -156,8 +156,9 @@ fn inner_part2(s: &[u8]) -> u32 {
156156
let start = memchr::memchr(b'S', s).unwrap();
157157

158158
let mut lines = [const { heapless::Vec::<Line, 2048>::new() }; 4];
159-
let mut quads =
160-
[const { [const { heapless::Vec::<usize, 8>::new() }; QUADS_SIZE * QUADS_SIZE] }; 4];
159+
let mut quads = [const {
160+
[const { heapless::Vec::<usize, { QUAD_SIZE * 2 }>::new() }; QUADS_SIZE * QUADS_SIZE]
161+
}; 4];
161162

162163
let mut i = start;
163164
let mut d = if s[i - 1] == b'.' {

0 commit comments

Comments
 (0)