This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Accessing the vector elements
- From: Ian Lance Taylor <iant at google dot com>
- To: Aren Villanueva <aren at indigo-designs dot info>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 23 Oct 2006 19:05:36 -0700
- Subject: Re: Accessing the vector elements
- References: <EC0E616E-1370-47E0-9619-3E398B613F3B@indigo-designs.info>
Aren Villanueva <aren@indigo-designs.info> 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