Boost logo

Ublas :

Subject: Re: [ublas] Does uBLAS work with dd_real and qd_real ?
From: Nasos Iliopoulos (nasos_i_at_[hidden])
Date: 2010-03-25 09:27:09


Paul,
the problem seems to be in the implementation of the dd_real in the qd library. I noticed that the default constructor does not initialize the number class, hence constructing it in an ill-formed state. If you recompile the qd library changing
  dd_real() { }
to:
  dd_real() { x[0]=0.0; x[1]=0.0;}

(the same for qd_) you should be ok. Let me know if this fixes it for you.
Best
Nasos

> From: paul.leopardi_at_[hidden]
> To: ublas_at_[hidden]
> Date: Thu, 25 Mar 2010 15:18:33 +1100
> Subject: Re: [ublas] Does uBLAS work with dd_real and qd_real ?
>
> 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
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: nasos_i_at_[hidden]
                                               
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1