I’m not sure if this is a bug, or just how the developers intend things to work, but inside of a kernel, I would think the following would work (and I would certainly like it to):
float4 a, b; //initialize a,b a += b;
However the compiler gives the following error
"error: no operator “+=” matches these operands
operand types are: float4 += float4"
Do you really intend that we should have to write
a.x += b.x; a.y += b.y; ...
It would also be nice if swizzling worked.
float4 a; a.xy = make_float2(1, 2);
gives an error upon compilation that a has no member xy.
Or something like
a = b.xyxy
also doesn’t work with the same failure (that b doesn’t have member xyxy).