Byte Twiddling and Altivec
Byte Twiddling and Altivec
- Subject: Byte Twiddling and Altivec
- From: "John C. Randolph" <email@hidden>
- Date: Sun, 5 Aug 2001 15:42:08 -0700
At the risk of prematurely optimizing something...
Given an array of 256 bytes and wanting to reverse them, what would be
the optimal way to do so with all of the tricks that Mac OS X on a G4
has to offer?
I've just found a description of vec_perm(), and it looks like it can
twiddle sixteen bytes any way I'd care to in one clock, but it looks
like GCC is choking on my attempt to declare a 'vector unsigned char'.
Can I cheat with asm{} within GCC?
Has anyone on this list done any Altivec permutations that they'd like
to share?
-jcr
"This is not a book to be tossed aside lightly. Rather, it should be
hurled with great force." -Dorothy Parker