Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-06-08 16:31:06


Am Mittwoch, 8. Juni 2005 22:49 schrieb Matthias Troyer:

> During the ublas review at boost, it was mentioned that
> competitiveness with BLAS/ATLAS, e.g. by using those libraries was an
> essential goal. With a factor of four in performance, ublas is
> unfortunately *completely useless* for any serious high performance
> work. With CPU time costs (total cost of ownership) for some
> calculations that we perform of the order off several ten thousand US
> $, we cannot afford spending even a factor 4 more.

for small matrices the difference is much smaller:

size of metrices - 8x8*8x8

      prod axpy opb block goto atlas
RRR 0.22 0.32 0.39 0.51 0.45 0.15
RRC 0.24 0.31 0.41 0.48 0.42 0.15
RCR 0.2 0.34 0.42 0.55 0.48 0.16
RCC 0.21 0.32 0.4 0.53 0.45 0.16
CRR 0.23 0.32 0.4 0.52 0.46 0.17
CRC 0.24 0.33 0.4 0.48 0.42 0.14
CCR 0.21 0.36 0.41 0.54 0.48 0.16
CCC 0.22 0.37 0.4 0.52 0.45 0.15

> It is thus a pity that ublas will not make use of atlas, although it
> would be so easy: just use blas for any expression (such as dense
> matrix multiplication) that can be mapped to a blas call.

Its it possible via the bindings library to use blas. Unfortunatly a
design goal of ublas is to be as general as possible. Otherwise blas
are very special. So AFAIR we decided not to invest to much time into
connecting ublas and blas, but to concentrate on correctness of the
algorithms. I think the consens was first to provide an easy to use
interface and (long long time later ;-) maximize performance.

mfg
Gunter