Expand description
Structsยง
- Exclusive ๐Regular data structures need to be protected by a mutex.
- 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. - Parallelize the hashing as each row is independent.
- worker ๐Each worker thread chooses the next available index then computes the hash and patches the final vec with the result.