Changes

Jump to: navigation, search

GPUSquad

362 bytes added, 17:31, 8 April 2018
Assignment 2
The iters loop launches a kernel for each iteration and we use double buffering (where we choose to launch the kernel with either d_a, d_b or d_b, d_a) since we can't simply swap pointers like in the serial code.
 
Double buffering is needed so that there is a static version of the the matrix before the current set of calculations are done. Since an element of the matrix is calculated based on elements on all four sides, if one of those elements updated itself while calculations were being done on another element, you would end up with the wrong answer/race conditions.
<nowiki>****************</nowiki>
93
edits

Navigation menu