Linear Algebra library

Started by
21 comments, last by Stani R 18 years, 4 months ago
I was wondering, is there a standard C++ library for vectors classes and such ? One that is fairly standard ? And no, I don't mean the stl vector container class kind but the linear algebra type.
Advertisement
Yes, it is called BLAS...

http://www.netlib.org (Starting Point)

Search also for Boost::uBLAS and Atlas BLAS (for performance)...

Search for 'lapack' (also at netlib.org) for more advanced functions like LU, Cholesky, QR, SVD, Schur, generalized Schur...
Maybe something like this? Just a quick google search, I'm not really familiar with what c++ libraries are popular.
There's a Wikipedia artical on BLAS, which has links to 7 implementations.

http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms
PGC, what exactly do you plan to do with this library?

I, for one, use Intel's MKL. It's very versatile, extremely fast and it even has a support for sparse BLAS and solvers.
I had read about Boost (uBLAS) before, but wondered how standard that is.

ury > I want to use it for a 3d visualization. Several linear algebraic methods are performed . I can implement those myself, however, instead of creating my own vector class and such I wondered if there were any standard and (most important) commonly used libraries.
I see, so I guess that all you need are 4x4 or 3x3 matrices. In this case you don't really need heavy guns like BLAS or LAPACK.

People usually implement such libraries by themselves or use the one supplied by DirectX (or OpenGL).

I am sure that there are great open source libraries out there; maybe someone else can point them out?
There's also MTL.
ury > as I said, I want to avoid implementing it myself. I believe there to be a 1001 implementations by now, all by people who decided to 'implement it themselves'. I do not want to reinvent the wheel for the 1002nd time. Yes, I only need 3 and 4 dimensional operations. From what I've seen thusfar, Boost::uBlas seems like a decent library. The MKL however is Intel specific. My code might have to run on non-intel systems so now and then...

And a heavy gun might actually be required since I'm working on a visualizer for particle simulations, thus involving lots of particles...
PGC, what I really mean by big guns is a general purpose matrix library that can handle a matrix of any given size.

A library with specific implementations of 4 and 3 dimensional matrices is generally faster and more lightweight.
Good examples are: DirectX and Doom3 SDK.

As far as I can see all of the previously proposed libraries were implementations of BLAS.

Googling for this, could prove to be useful.

One more thing. Usually, data like particles can benefit from parallel processing. A good idea would be to use a library that can work with arrays of data instead of separately processing each piece of data.
In other words, use SSE :)

This topic is closed to new replies.

Advertisement