On Oct 23, 2006, at 7:05 PM, Ian Lance Taylor wrote:
Aren Villanueva <aren@xxxxxxxxxxxxxxxxxxx> writes:How would I access the vector elements in that vector float?? I can't seem to find any comprehensive information on this topic.gcc doesn't implement [] for vectors. The only way to access the elements is something like: union { vectortype v; float af[4]; } u; u.v = v; return u.af[0]; Ian
Or, alternatively: vectortype v; elementtype e = ((elementtype*)&v)[1] -Chris