restrict grid to actually executed blocks
commita6c2e58e2a324c4faace7319d03d7aedb3d0fca4
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 4 Feb 2012 14:19:56 +0000 (4 15:19 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 7 Feb 2012 15:42:16 +0000 (7 16:42 +0100)
treea1a99664eeaef1a56f426d03b97967db2c4472d7
parent279d98c2935b733b7d998751bc02e3f102a234ac
restrict grid to actually executed blocks

The grid sizes used for wrapping iterations over the blocks
in the grid (either the default sizes or those specified by
the user) may be larger than the actual number of blocks
required to run the kernel, possibly depending on the parameter
values.  With this commit, we now construct a box containing
the origin and the ids of the blocks that actually need
to do something.  There may still be blocks in there that
have no work, but there should be fewer of them than before.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
cuda.c