3

Where Can i find fast library for vector and Matrix Calculations? I need high performance.

Update:I need it for games calculations.

Saleh
  • 2,982
  • 5
  • 34
  • 59
  • What kind of vectors/matrices? Related to graphics (3x3 matrices for example)? Or for larger systems? Dense or sparse? – Bart May 09 '11 at 09:47
  • I need a library for games caculations. 4x4 Matrix and Vectors – Saleh May 09 '11 at 09:50
  • possible duplicate of [What is a good open source C/C++ math library that supports vector math and complex numbers?](http://stackoverflow.com/questions/5933955/what-is-a-good-open-source-c-c-math-library-that-supports-vector-math-and-compl) – Paul R May 09 '11 at 09:56

5 Answers5

8

Go for Blaze. Also check out the bench marking in parallel cores setup. Its certainly the fastest.enter image description here

pksneo
  • 125
  • 2
  • 7
7

Edit: Sorry, I'm not high enough to add comments anywhere but just noticed you mentioned it is for games, unless you are writing your engine in software without any hardware acceleration, then the benefits you will get from the matrix manipulations (assuming that they are for TCL) are about nil in comparison to the rest of your code.


I can't link you to any particular library, but as you are specifying high performance a couple of suggestions that may help if nobody is forthcoming with a few libraries for you:

  1. Make use of SSE instructions.
  2. If you've got the money, the Intel maths library is meant to be excellent, as is their compiler.
  3. Vector and matrix calculations are the sort of things that GPUs excel at. It may be worth your while looking at something like CUDA from nVidia.
R4D4
  • 1,382
  • 2
  • 13
  • 34
6

Eigen is supposed to be very good:

Eigen

ltjax
  • 15,837
  • 3
  • 39
  • 62
2

If you have an x86 system, you can use the Intel Math Kernel Library.

http://software.intel.com/en-us/articles/intel-mkl/

I was able to pull out 50 GFlops during linpack on my old quad box.

Another option may be cuda

Gunther Piez
  • 29,760
  • 6
  • 71
  • 103
2

You might want to have a look at the math library of Geometric Tools. And if you're not creating your own engine, you might want to look at something like OGRE for the complete package.

Bart
  • 19,692
  • 7
  • 68
  • 77