Boost logo

Ublas :

Subject: Re: [ublas] a problem with compressed matrices
From: Tarek (physics.reality_at_[hidden])
Date: 2011-08-23 07:21:51


Dear Joern,
Thanks a lot for your reply. I tried to use sparse_prod, but I always get
the following error, though I include the file:
<boost/numeric/ublas/operation_sparse.hpp>
error: no matching function for call to
‚'sparse_prod(boost::numeric::ublas::matrix<double>&,
boost::numeric::ublas::matrix<double>&)’

As for axpy_prod, it works fine in release mode (twice as fast as prod) when
used for matrix-vector multiplication. For matrix-matrix multiplication
however, it yields the following error:

/usr/include/boost/numeric/ublas/operation.hpp: In function ‚'M&
boost::numeric::ublas::axpy_prod(const
boost::numeric::ublas::matrix_expression<E2>&, const
boost::numeric::ublas::matrix_expression<E2>&, M&, bool) [with M =
boost::numeric::ublas::compressed_matrix&lt;std::complex&lt;double&gt; >, E1
= boost::numeric::ublas::matrix_binary_scalar1<const double,
boost::numeric::ublas::compressed_matrix<std::complex<double> >,
boost::numeric::ublas::scalar_multiplies&lt;double,
std::complex&lt;double&gt; > >, E2 =
boost::numeric::ublas::compressed_matrix&lt;std::complex&lt;double&gt;
>]’:
main.cpp:203:45: instantiated from here
/usr/include/boost/numeric/ublas/operation.hpp:719:13: error: invalid use of
incomplete type ‚'struct
boost::numeric::ublas::zero_matrix&lt;std::complex&lt;double&gt;,
std::allocator&lt;std::complex&lt;double&gt; > >‚'
/usr/include/boost/numeric/ublas/fwd.hpp:132:11: error: declaration of
‘struct boost::numeric::ublas::zero_matrix&lt;std::complex&lt;double&gt;,
std::allocator&lt;std::complex&lt;double&gt; > >‚'

I noticed that Mathematica works much faster than uBlas programs, are you
aware of other libraries that can do the multiplication faster than
axpy_prod ?

--
View this message in context: http://boost.2283326.n4.nabble.com/a-problem-with-compressed-matrices-tp3757133p3762462.html
Sent from the Boost - uBLAS mailing list archive at Nabble.com.