|
From: Tim R. <timr@u.washington.edu> - 2002-11-02 10:38:04
|
Hi, I'm sending this to the list because I'm proposing a "big" change, but it's a change that you'll have to work very hard to persuade me not to do. Remember that I wrote BTKMatrix to create something more comprehensive for use in the BTK, and to avoid committing to any particular linear algebra library implementation. At the time, this was because the various C++ linear algebra packages seemed risky for one reason or another. While some (e.g. Blitz++, MTL) provided very high performance, they worried me because the didn't seem well-maintained, or, in the case of MTL, just seemed ugly as sin. In other words, I liked them technically, but I worried about committing to them, only to find them unsupported down the road. Well, that's all over. Perhaps you're familiar with the Boost libraries. If not, let me introduce you. Go to: http://www.boost.org and take a look at all of the really excellent things provided by the package. Since Boost is a proving/stabilization ground for commonly-used C++ concepts that haven't yet made it into the standard library, it is extremely well-maintained, and provides all sorts of C++ goodness that would otherwise take a long time to write yourself. Boost is great. It's popular, it's well-known, reasonably well-supported, and it's free. Some of the very best C++ programmers in the world are contributing to it, and as far as I can tell, it's the closest thing you're going to find to "official" extensions of the C++ standard library. Now, more to the point, I just discovered this evening that a package named uBLAS has been added to Boost, and as you might guess from the name, uBLAS provides a good portion of BLAS (levels 1-3, to be exact). However, uBLAS does it in C++, using operator overloading so that the code is readable, and template metaprogramming to make it efficient. In short, it's everything we need in a linear algebra package: it's readable, it's efficient, it's (relatively) standard, and it's well-maintained. Go look at the documentation for it: http://www.boost.org/libs/numeric/ublas/doc/index.htm Especially interesting is the benchmark stuff at the bottom of this page: http://www.boost.org/libs/numeric/ublas/doc/overview.htm which shows that uBLAS is pretty darned fast. Probably as fast as we'll ever need. That said, there's one drawback: if we use it, we create an external dependency -- the first for the BTK. We'll have to tell people to go download some other package in order to use the BTK, and that could be annoying. However, if I had to pick an external package to require, Boost would be it. It's got so many great things in it that it's extremely multipurpose, and as I said before, it's popular and well-maintained. You couldn't ask for more. So there you go. My argument for dumping our home-brewed matrix code, and using something better. Like I said, if one of you has an objection, I'd be happy to hear it, but in the meantime I'm going to start the migration. Since I don't have to write anything new, I don't think it should take long. -tim |