Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a good double-precision small matrix SIMD library for x86?

I'm looking for a SIMD library focused small (4x4) matrix operations for graphics. There's lots of single precision ones out there, but I need to support both single and double precision.

I've looked at Intel's IPP MX library, but I'd prefer something with source. I'm very interested in SSE3+ implementations of these particular operations:

  1. Mat4 * Mat4
  2. Mat4 * Vec4
  3. Mat4 * Array of Mat4
  4. Mat4 * Array of Vec4
  5. Mat4 inversion (nice to have)

EDIT: No "premature optimization" answers please. Anyone who has worked with small matrices knows GCC does not vectorize these as well as hand optimized intrinsics or ASM. And in this case it's important, or I wouldn't be asking.

like image 380
Justicle Avatar asked Apr 21 '11 19:04

Justicle


1 Answers

Maybe the Eigen library?

It supports SSE 2/3/4, ARM NEON and AltiVec instruction set.

like image 171
Karl von Moor Avatar answered Nov 15 '22 22:11

Karl von Moor