cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

rick_weber
Adept II

Problem with expression in kernel: Illegal to use array type as right operand

What does this mean? I get it when I try to do this:

float index = indexof(basis).x;

or any other attempt to use a single element of a vector. Another example would be:
float2 a = float2(0.0f, 1.0f);
a.x;
I didn't have this problem until I upgraded to Brook 1.31.


0 Likes
2 Replies
rick_weber
Adept II

So... my problem was that I had arrays x[], y[], and z[] as parameters to my kernel. This seems counterintuitive to C++, which var.x or var.y implies accessing an element of a struct rather than the x in this case referring to an actual variable.

0 Likes

I think compiler got confused because of name colision in gather array and swizzle component. I have filed a bug for it.

 

Thanks a lot for your feedback.

0 Likes