RS <rsina_no.ssppaamm@comcast.netwrites:
Quote:
Hi all,
>
I am looking for a fast, efficient (tuned for speed, not size) and
mature C++ code to do some numerical work with. I have looked at the
Template Numerical Toolkit, which the oonumerics.org web page claims
is a successor to lapack++. But on the surface it doesn't seem to have
all the functionalities of lapack++, let alone being its successor. On
the other hand, it may be faster. I haven't checked that yet. Lapack++
is supposed to be a wrapper for ublas. TNT doesn't seem to have
anything to do with ublas. It hasn't been updated that often. There is
also a cpplapack that is being developed independently of lapack++.
>
My question is how fast is TNT. Is it faster than the other packages?
If you were to chose one package, which one would you chose?
I've done a bit of research in this area recently. The first thing
I'd tell you to do is look around a lot more. There are a load of
linear algebra libraries out there; or rather there are a few _good_
and _complete_ ones, and a load of others. Linear Algebra is one of
those areas that looks stright-forward enough for everyone and their
grandmother to start developing one, but is actually hard enough that
few get anywhere.
I've used TNT in the past, and have to say it's an easy library to
understand, and to hack if you need to. I don't know how fast it is,
but I wouldn't guess it's one of the fastest. (I could be wrong,
though. See below.)
If your problems have compile-time sizes (e.g. you know the vector and
matrix dimensions at compile time), run (don't walk) to 'tvmet'. It's
not a large library, but it's complete, and it's _extremely fast_.
Other libs you might look at are IT++, Boost:uBlas, Blitz++, and
GNUSSL. Although GNUSSL is stricly C, not C++, it's just about the
only such library out there that's thread safe, and its performance
isn't half bad last I looked.
** All that having been said, there's no substitute for profiling.
For example, a library that uses BLAS and LAPACK for the heavy lifting
will be far superior for large matrices, since that's what LAPACK was
really built for. For small matrices, BLAS and LAPACK are typically
slower, sometimes _much_ slower, than other solutions. All of these
libraries make trade-offs, and which one is fastest really depends
rather heavily on your application.
----------------------------------------------------------------------
Dave Steffen, Ph.D.
Software Engineer IV Disobey this command!
Numerica Corporation - Douglas Hofstadter
dgsteffen at numerica dot us