Boost logo

Boost :

From: Dave Steffen (steffend_at_[hidden])
Date: 2001-03-13 20:41:46


Toon Knapen writes:
> lums_at_[hidden] wrote:
[...]
> > Now, vendor-tuned libraries can give you good performance (which is
> > where BLAS get their reputation). The problem with this is that a)
> > the performance is not portable, b) you have to pay for them, c) they
> > are highly optimized for only the subset of BLAS necessary to market
> > their machines well, and d) the BLAS do not really cover everything
> > that you would want to do in an efficient way.
>
> I'm also definitly in favor of an C++ only approach. Nevertheless I
> think using in some cases BLAS internally would be necessary as a
> migration path.

 Maybe we should (try to) design our hypothetical library ("Boost
 BLASt"? ;-) so that it's reasonably easy to "plug in" calls to an
 available BLAS library if it's available. I.E. have

template <class Matrix, class Vector>
Matrix operator* (const Matrix& M, const Vector& v)
{
  // ... implement M * v
}

 ... and then, if BLAS happens to be available (or desirable), somehow
 we also get a specialization for something that BLAS can handle:

template <>
Matrix<double> operator* <Matrix<double>, Vector<double> >
                (const Matrix<double>& M, const Vector<double>& v)
{
        // ... calls DGEMV with appropriate stuff
}

 Now, I'm not claiming that I know how to build the machinery to do
 this; but it'd be a _really_ nice thing to have. ;-)

 I'm also thinking that this would make it _really_ easy to benchmark
 straight C++ solutions against local (tuned) BLAS routines.

--------------------------------------------------------------------------
Dave Steffen Wave after wave will flow with the tide
Dept. of Physics And bury the world as it does
Colorado State University Tide after tide will flow and recede
steffend_at_[hidden] Leaving life to go on as it was...
                                                        - Peart / RUSH
"The reason that our people suffer in this way....
is that our ancestors failed to rule wisely". -General Choi, Hong Hi


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk