Multithreading Part 2

In the current multithreading design, the tiles to be calculated are recreated each time, and the results are fed back into the main array. This generates additional read and write operations, thereby slowing down the iteration.

In the next step, the tiles will therefore be made permanent. All computational values will be stored in the tiles, and the tiles will be calculated in parallel.

After calculating all tiles, the exchange of relevant computational values occurs at the edge areas between the tiles. This step is not performed in parallel but with only one thread. Therefore, creating a very large number of small tiles is not effective and leads to inefficient calculations due to updates between tiles on one hand and multithreading overhead on the other. The automated determination of tile size accounts for this fact.

Only when the manager requests an intermediate result are the results from all tiles combined into a complete grid and output.

Scroll to Top