Previous | Next --- Slide 12 of 60
Back to Lecture Thumbnails
rohitban

Why do we use row size = N+2 and not N, is this to include all of the adjacent cells that the blur operation for a single cell is dependent on?

aoeuidhtns

You loop through the row from index 1 to n+1, and the computation uses index i-1 and i+1, so you need n+2 elements per row.

afa4

@rohitban: In the grid solver example, every row element depends on element to its left and every column element depends on element from previous column. N + 2 is to correctly update the boundary elements of the grid.

BigFish

@rohitban I think you can refer to this slide