Reputation: 103
I'm experiment with gcc vector extension and I don't know how assign data to a vector
typedef int simdScore __attribute__ ((vector_size (16)));
simdScore x ={0,0,0,0};
simdScore y= {5,5,5,5};
x += y;
//ERROR by compiler
x = {1,2,3,4};
x = {1,2,3,4} seems to be usable only for initialization, but it's not possbile use it after the initialization. Is there some way to load data in a vector without creating a local variabile or doing:
x[0] =1;
x[1] =2;
x[2] =3;
x[3] =4;
thank you all
Upvotes: 1
Views: 234