A portable, intuitive toolkit for low-level SIMD programming: works with PowerPC G4 and G5 Altivec, and Pentium 3, Pentium 4 and Itanium MMX/SSE/SSE2/SSE3.
The vec classes make SIMD registers look like small valarrays with all their syntactic sugar. Yet you can still mix and match native intrinsics, fast transcendentals and STL-style functors with equal aplomb.
vec <int> ::set <1, 2, 3, 4> ()
. Transparently generates over 400 optimal constants in Altivec.
v1 + v2
.
altivec::add (v1, v2)
or altivec::add_function <vec <int> > () (v1, v2)
.
Amazingly, code compiles on each platform without any object-oriented overhead and is often directly equivalent to intrinsic opcodes!