Jump to content
  • Advertisement
Sign in to follow this  
PGC

Linear Algebra library

This topic is 4610 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
There's a Wikipedia artical on BLAS, which has links to 7 implementations.

http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!