SIMD Cross-platform headers is a cross- platform, cross-compiler, cross CPU C/C++ header collection that aids the creation portable vectorized (SIMD) C/C++ code.
SIMD Cross-platform headerst supports (or partially supports) x86 (MMX/SSE/SSE2) GCC and MSVC, PPC Altivec GCC and CodeWarrior, ARM GCC, and software-emulated SIMD.
NOTE: Code must be 16-byte aligned. Align to 16 when allocating memory.
X86/XSCALE (Intel) vs. PowerPC/MIPS
While the PowerPC and MIPS SIMD instructions take 2 source vectors and a destination vector, the Intel platforms only take a source and destination. Example:
PPC/MIPS can do:
C = A + B
X86 can only do:
A = A + B (or A+=B)
Code written either way will work on the X86, and still be faster than 387 math, but preserving the registers takes significant overhead (Disassemble the test program for an example. The prints preserve, the 'disassembly test' does not.) For the fastest code between systems, write your SIMD math as the X86 expects, manually preserving SIMD variables.
At least GCC for PPC doesn't seem to have any issues figuring out how to deal with a source and destination memory address being the same.
What's New in This Release:
· Created file with some i386, GCC dialect
Product's homepage