Boost logo

Ublas :

Subject: Re: [ublas] Does uBLAS work with dd_real and qd_real ?
From: Paul Leopardi (paul.leopardi_at_[hidden])
Date: 2010-03-25 00:18:33


Thanks Nasos,
On Wednesday 24 March 2010 22:27:15 Nasos Iliopoulos wrote:
> Hi Paul,
> I have used ublas in the past with GNU multi precision library through the
> C++ class based interface and did not have any troubles, although I did
> not test it extensively. The only downside is the dramatic speed decrease
> that after all you cannot avoid with multi-prec. arithmetic.
>
> On the other hand I don't find why uBlas should have trouble, since it just
> requires appropriate numeric semantics. If a type library is not
> implementing those properly you may be getting problems like you mention
> (although I believe it is difficult to be the case).
>
> Here is a long shot: there is the possibility that qq_real classes
> require some aligned memory access that afaik is not supported by ublas
> containers, but I think this may be something worth considering in the
> future having in mind the hype with GPUs and vectorization of
> algorithms.
>
> I am not aware of any ready-implemented tests that would allow you to
> infiltrate through the problem you describe. I guess some exhaustive
> debuging on small matrices (like 2x2 or 3x3) could be the only way. If you
> could post an example I might be able to test it.

I'm using plus_assign(lhs, rhs) with lhs dense and rhs compressed, both row
oriented. I tried replacing plus_assign with my own routine and the program no
longer has the errors that I saw. So something is going wrong with plus_assign
and dd_real (or qd_real) AFAICT. Likely that the same thing is happening with
minus_assign. I must go to Uni now.
Best, Paul