gpu_array_is_scalar: also consider a single struct as a scalar
commit5af4964443458dc46f6a8141fce29782dd880c46
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 6 Nov 2014 11:12:19 +0000 (6 12:12 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 6 Nov 2014 11:12:19 +0000 (6 12:12 +0100)
tree97a1d44cd947b5f8f16d47da2fdc5b8debf8426f
parent30a05703cc3f2ab8391601178f8e26366f9af8dd
gpu_array_is_scalar: also consider a single struct as a scalar

gpu_array_is_scalar is essentially used in two context,
one is to determine whether an "&" should be printed and
the other is to determine whether we are capable of mapping
the array to registers.
It is only in the second case that we need to exclude structs
since we currently do not map any (arrays of) structs to shared
or private memory.
Move the test for compound elements out of gpu_array_is_scalar to
the instance where we actually need to test for it.

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