• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Byte Twiddling and Altivec
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Byte Twiddling and Altivec
      • From: John Hörnkvist <email@hidden>
  • Prev by Date: Re: Memory Management
  • Next by Date: Re: Byte Twiddling and Altivec
  • Previous by thread: Re: Memory Management
  • Next by thread: Re: Byte Twiddling and Altivec
  • Index(es):
    • Date
    • Thread