gpu: only use shared memory if kernel will be mapped to more than one thread
commiteade72083db6e670b7d2bf04dd118542111dbdb7
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 9 Oct 2013 09:46:20 +0000 (9 11:46 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 9 Jul 2014 09:22:04 +0000 (9 11:22 +0200)
tree948aaa7ba622cb4a8453e34ed20a3c56467f544c
parented69987f8306bf959aabd87d92ad32e577dd2211
gpu: only use shared memory if kernel will be mapped to more than one thread

Originally, we could in theory end up mapping data to shared memory
if the kernel is going to be mapped to a single thread (in particular,
if the number of block dimensions is zero), because the check for coalescing
that we perform is meaningless in this case and may return 0,
making it look like it may be worthwhile to map the data
to shared memory to enable coalescing.

Simply do not even consider mapping anything to shared memory
for kernels that are going to be mapped to a single thread.

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