Boost logo

Ublas :

From: nate (nate_at_[hidden])
Date: 2007-06-25 17:59:41


I have a question about the following code sample:

#include <boost/numeric/bindings/blas2.hpp>
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
#include <boost/numeric/bindings/traits/ublas_vector.hpp>

ublas::vector<double> p,m;
ublas::matrix<double, ublas::column_major> B;

void main(){

// this compiles
blas::gemv('T',1.0, project(B,ublas::range(0,M),ublas::range(0,N)),
m,1.0,p);

// this doesn't
blas::gemv('T',1.0, project(B,ublas::slice(0,1,M),ublas::slice(0,1,N)),
m,1.0,p);

}

Can someone explain this behavior? The compiler (gcc4.0.1) gives:

traits/ublas_matrix.hpp:215: error: no matching function for call to

 '...::matrix_detail_traits<matrix... >::storage(const
matrix_reference<...>&)'

candidates are:

static typename generate_const<M, T>::type* matrix_detail_traits<... matrix<T,
L, A>, M>::storage
(M&)

[with
   T = double,
   F = boost::numeric::ublas::basic_column_major<long unsigned int, int>,
   ArrT = boost::numeric::ublas::unbounded_array<double,
std::allocator<double> >,
   M = boost::numeric::ublas::matrix<...>
]

I'm not really sure where this error originates.

Thanks
James