Expand description
Structsยง
- Exclusive ๐
- Regular data structures need to be protected by a mutex.
- Shared
- Atomics can be safely shared between threads.
Functionsยง
- dfs ๐
- Flood fill that explores the connected squares in the grid.
- fill_
row ๐ - Compute the knot hash for a row and expand into an array of bytes.
- knot_
hash ๐ - Slightly tweaked version of the code from Day 10 that always performs 64 rounds.
- parse
- Parallelize the hashing as each row is independent.
- part1
- part2
- worker ๐
- Each worker thread chooses the next available index then computes the hash and patches the final vec with the result.