AltiVec

Home * Hardware * PowerPC * AltiVec

AltiVec, (Velocity Engine by Apple and VMX by IBM) a SIMD instruction set designed by Apple, IBM, and Freescale Semiconductor (formerly Motorola's Semiconductor Products Sector) - the AIM alliance, introduced with Motorola's PowerPC G4, and Apple's PowerPC G5, now owned by NXP Semiconductors and standard part of the Power ISA v.2.03. AltiVec features 32 128-bit vector registers that represent vectors of either 16 bytes, eight 16-bit (half) words or four 32-bit words or floats. Most VMX/AltiVec instructions take three register operands. AltiVec has a flexible vector permute instruction (vperm), which can take arbitrary bytes from two source registers and places them in any position in a destination register controlled by an index register. GCC and other compilers provide intrinsics for AltiVec instructions from C or C++ source code, or include auto-vectorization.

=Bitboards= AltiVec instructions are very well suited for bitboard fill algorithms and branchless move generation techniques à la DirGolem. Since one 128-bit AltiVec register, keeping up to two bitboards, may treated as vector of 16 bytes, shifting techniques such as one step in all eight directions can be done more efficiently with respect to wraps from a- to the h-file or vice versa. North and south shifts by +-8 of each bitboard can be done with one vperm-instruction simultaniously, while west and east shifts can be done by bytewise shift left/right one.

=See also=
 * AVX by Intel
 * AVX2 by Intel
 * AVX-512 by Intel
 * MMX on x86 and x86-64
 * SIMD and SWAR Techniques
 * SSE2, SSE3, SSSE3 and SSE4 on x86 and x86-64
 * XOP by AMD

=Publications=
 * Jon Tyler, Jeff Lent, Anh Mather, Huy Nguyen (1999). AltiVec; Bringing Vector Technology to PowerPC Processor Family. IPCCC 1999, pdf
 * Tom Thompson (1999). AltiVec Revealed. MacTech, Vol. 15, No. 7
 * Nicolas Fritz (2009). SIMD Code Generation in Data-Parallel Programming. Ph.D. thesis, Saarland University, pdf

=Manuals=
 * AltiVec Technology - Programming Interface Manual (pdf)
 * AltiVec Technology - Programming Environments Manual (pdf)

=Forum Posts=
 * G4 & AltiVec by Will Singleton, CCC, October 04, 1999
 * An efficiency comparison data point for x86 vs PowerPC by Steven Edwards, CCC, August 22, 2003

=External Links=
 * AltiVec from Wikipedia
 * AltiVec Technologies | NXP by NXP Semiconductors
 * Inside the IBM PowerPC 970 | Part II: The Execution Core by Jon Stokes, Ars Technica
 * Mentor Embedded Performance Library

=References=

Up one Level