Boost logo

Ublas :

From: Manuel González Castro (iinmgc00_at_[hidden])
Date: 2006-01-17 08:09:10


I am developing an engineering application using uBlas. In the future I would like to use the ATLAS bindings to perform BLAS operations in my code, and I would like to do it without changing my code.

Since uBLAS defines a BLAS interface (blas.hpp) within the namespaces boost::numeric::blas_[1/2/3], I thought that I could do something like:

   #include <boost/numeric/ublas/blas.hpp>
   #using namespace boost::numeric::ublas_1;
   #using namespace boost::numeric::ublas_2;
   #using namespace boost::numeric::ublas_3;
   #include <boost/numeric/bindings/atlas/cblas.hpp>
   #using namespace boost::numeric::bindings::atlas;

But this solution is not valid because the BLAS function declarations (name and order or arguments) are different in uBLAS and the ATLAS binding. Example:

[y <- a A x + b y] in uBLAS BLAS: gmv (y,b,a,A,x)
[y <- a A x + b y] in ATLAS binding: gemv(a,A,x,b,y)

The only solution I see is to rewrite blas.hpp in uBlas to use the same interface as the ATLAS binding.

Is there any reason to define a BLAS interface in uBLAS that differs from the interface provided by the ATLAS binding (which I consider closer to the original BLAS specification)?

Thanks a lot,