Module aoc::year2017::day15

source ยท
Expand description

ยงDueling Generators

Multithreaded approach using worker threads to generate batches of numbers for judging. Part one can be checked in parallel, but part two must be sent to a single thread as the indices must be checked in order.

The sequence of numbers are modular exponentiation so we can jump to any location in the sequence, without needing to know the previous numbers.

Structsยง

  • Block ๐Ÿ”’
    Generated numbers from start to start + BLOCK.
  • State shared between all threads.

Constantsยง

Functionsยง

Type Aliasesยง