What's the result of
float4 v = (float4)(-2.0f,1.0f,-3.0f,4.0);
XXXX res = (v<0.0f)
pls?
an int4 like (1,0,1,0) ???
int4 like (-1, 0, -1, 0)
It's defined in the spec section 6.3.d, for scalar type it's int, 1 for true and 0 for false like C.
Yes, it differs for vector and scalar types, I hate it too.
Originally posted by: eduardoschardong int4 like (-1, 0, -1, 0) It's defined in the spec section 6.3.d, for scalar type it's int, 1 for true and 0 for false like C.
Thanks, I didn't see that.
What I hate are statements in the official documentation without examples
Originally posted by: bubu Originally posted by: eduardoschardong int4 like (-1, 0, -1, 0) It's defined in the spec section 6.3.d, for scalar type it's int, 1 for true and 0 for false like C. Thanks, I didn't see that. What I hate are statements in the official documentation without examples
I donot think we should expect these examples from spec doc. If spec start adding examples, it becomes 3000 pages instead of 300 pages.