Boost logo

Ublas :

From: dan elliott (danelliottster_at_[hidden])
Date: 2007-03-23 12:01:18


Nico Galoppo <nico <at> crossbar.net> writes:

> #include <boost/numeric/ublas/matrix.hpp>
> namespace ublas = boost::numeric::ublas;
>
> #include <boost/numeric/bindings/atlas/cblas3.hpp>
> #include <boost/numeric/bindings/traits/ublas_matrix.hpp>
> namespace atlas = boost::numeric::bindings::atlas;
>
> int main()
> {
> size_t n = 100;
> ublas::matrix<double, ublas::column_major> A(n,n),B(n,n),C(n,n);
>
> // fill A and B
>
> atlas::gemm(A,B,C);
> }
>
> Stephen Gross wrote:
> >> BTW, it really pays off to use the ATLAS bindings for this
> >> kind of dense
> >> product. It is orders of magnitude faster than the default
> >> ublas implementation.

This question is directed at those more comfortable with the expression
templates used by uBLAS...

It is possible and, if so, how far away is ublas from being able to seemlessly
switch between ublas/ATLAS/ESSL/etc implementations like we can do with BLAS?

- dan elliott