The ispc guide mentions that there are varying and uniform qualifiers that you can attach to types (varying is assumed by default if neither are specified). https://ispc.github.io/ispc.html#uniform-and-varying-qualifiers
That's right, value and numer are varying floats because they are different across program instances, whereas denom and sign are uniform ints because they are shared across program instances in the same gang.
And in particular, while x
is a uniform float pointer and the same for the whole gang (because they're all reading from the same array), value
and numer
are different because they call operator[]
with the index of i
, and i
is non-uniform/different per program instance (because the program instances operate on different parts of the input array).
Please log in to leave a comment.
why are value and number of type float, while denom and sign of type uniform int? Is it because values and numbers are per instance variables while denom and sing are per gang variables?