From: Vardan Akopian (vakopian_at_[hidden])
Date: 2005-06-23 17:13:12
Thanks for the quick reply
On 6/23/05, Gunter Winkler <guwi17_at_[hidden]> wrote:
> On Thursday 23 June 2005 10:46, Vardan Akopian wrote:
> > diagonal_matrix<double> z(sz), x(sz);
> > matrix<double> y(sz, sz);
> > matrix<double> B = prod(z, x - y);
> the assignment is dispatched to the packed_proxy case, but IMHO it should be
> dispatched to the dense proxy case. (AFAIK banded * dense gives dense?)
yes, banded*dense gives dense.
Am I correct that the workaround of assigning to a dense matrix first
(as in my sample code) has an additional cost of copying the whole
data (in other words A is not lazily evaluated)? Is there a better
workaround to avoid that cost?
> > A is computed correctly, while B is not (they should be equal). Am I
> > doing something wrong/illegal? I've tested this with boost version
> > 1.32.0 and the CVS head; gcc 3.4.3 and gcc 4 under Linux.
> confirmed. The computation/assignment is broken.
> > Interestingly, when NDEBUG is off, ublas's internal runtime check
> > catches the problem with an assertion failure:
> > Assertion failed in file
> > ../../../../boost_1_32_0/boost/numeric/ublas/matrix_assign.hpp at line
> > 797:
> > equals (m, cm)
> > terminate called after throwing an instance of
> > 'boost::numeric::ublas::external_logic'
> > what(): external logic
> > Aborted
> That means, that ublas internal checks work perfectly and inform the user
> about a broken algorithm.
> > I'd be very interested if someone would confirm and/or propose a fix.
> > Thanks.
> I'll have a look at this...
Thank you. I'm new to the list, what is the normal way (if any) to
find out if a fix has been committed to cvs (besides checking the cvs
> PS: please subscribe to the list.