GCC Vector Extensions
Andrew Haley
aph@gcc.gnu.org
Tue Apr 18 10:04:00 GMT 2006
Christian Schoenebeck writes:
> Es geschah am Friday, 7. April 2006 22:17 als Greg Buchholz schrieb:
> > Christian Schoenebeck wrote:
> > > b) We wondered [2] what the currently best way is to access single
> > > elements of one vector. Currently the only solution we saw is to use a
> > > union trick
> >
> > /* I don't know if this qualifies as good, but here's some things
> > I've used before */
>
> Oh, it officially qualified as good! We just made some benchmarks
> [1] to compare our old union trick vs. your straight forward type
> casts and your solutions were always faster, often even quite a
> lot. So as we thought, gcc doesn't like that union thing very much.
It's not legal C, though. The _mm_load, _mm_set, and _mm_store
operations are provided to do the conversions.
Andrew.
More information about the Gcc-help
mailing list