$include_dir="/home/hyper-archives/ublas/include"; include("$include_dir/msg-header.inc") ?>
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-03-23 12:28:24
Am Freitag, 23. März 2007 17:01 schrieb dan elliott:
> 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?
This is a good question, but hard to answer. IMO uBLAS is still far away 
from this point. This was one of the reasons of starting the glas 
project which is able to switch between different implementation. In 
order to enable ublas to automatically map some BLAS2/3 expression to 
the corresponding routine one could overload the various assign() 
member functions of matrix and vector types. I think of something like
matrix<T>::plus_assign( matrix_matrix_prod<M1, M2, T>& e ) {
  #ifndef USE_ATLAS
    matrix_assign< ... >( ... ); 
  #else
    atlas::gemm( 1.0, e().op1(), e.op2(), 1.0, *this );
  #endif
}
However this would affect a lot of (internal) uBLAS classes and cause a 
lot of headache because the partial template ordering has to be 
convinced to choose the correct specialization ... Maybe this is now 
easier with enable_if<> ...
mfg
Gunter