Skip to content
Szymon Brych edited this page Aug 27, 2018 · 2 revisions

Welcome to the ParallelGameOfLife wiki!

Here is how thing should look like after running:

Sync and Async Game of Life

Pattern you see is known as "Gosper's glider gun" and is mentioned on wikipedia under Game of Life article.

On the left hand side is a classic, single-threaded Game of Life with on/off state represented by black/white pixels respectively.

On the right hand side there is an async implementation of Game of Life based on papers mentioned in readme.

Each stripe signals area governed by a single thread, so there is 8 threads in this example. Each thread sleeps for singleThreadedSleep/numOfThreads time before updating its' area, so multithreaded implementation is expected to simulate generations faster than single threaded (speedup details may vary though).

There is no explicit synchronization at cost of state's and rules' added complexity. As opposed to classic version with just 2 states, this async transformation has 12 states total. Groups of 3 are signalled by different coloured pixels: black (currently active, previously inactive group), background colour (currently inactive, previously inactive group), blue (currently active, previously active group), yellow (currently inactive, previously active group). Each group contains 3 sub-states that aren't visualised.

Clone this wiki locally