tags:

views:

81

answers:

3

Does anyone know a good one? I'm looking for multiplication of matrices, transpose, invert, converting from 4x4 to top left corner 3x3 etc.

+1  A: 

Try BLAS or LAPACK.

Tamás Szelei
most of the time it will be overkill to include those...
YeenFei
Yes. But why not implement the needed functionality then? Intel's Math Kernel, that Mark suggested is an overkill as well. The thing is that when someone makes a library that does basic things like this, they will make it huge.
Tamás Szelei
It's not overkill at all to link to such libraries or to the Intel MKL. Use dynamic linking.
High Performance Mark
Problem with BLAS is that it seems very undeveloped towards modern projects. Namely, CBLAS doesn't seem to compile easily on mingw and it has no msvc project files or other multiplatform means (such as cmake). The work-time needed to support something like that would probably be better suited to just write the 4 or 5 functions needed.
Lela Dax
@High Performance Mark, how does "dynamic" linking to such gigantic library not an overkill for small projects ? or actually you are referring to static-linking them ?
YeenFei
+1  A: 

Like you say, rolling your own is easy enough. The inverse is tricky to get efficient unless you read this:

http://www.geometrictools.com/Documentation/LaplaceExpansionTheorem.pdf

I could send you my code, but it's a 4x4-only c++ class and does not take that paper into account yet, among other things that probably don't fit your needs.

phkahler
I'll accept it not because it's perfect for my needs but because it's quite hard to find a C library that is easy to use in modern multiplatform environments. GLM may be good for the OpenGL application I had in mind but it's C++ with no C interface. The work needed to support all these might be better suited to write the 5-10 functions needed (though it'd be nice if a convenient library would prevent the need). [The Inverse is indeed tricky]
Lela Dax