Boost logo

Ublas :

Subject: Re: [ublas] vector / matrix mutex writing
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2011-09-12 02:04:10


Hi,

ublas is not thread safe, mostly because it would be terribly slow for
number crunching. You will need a mutex.

Anyway, since vector<double> is nothing much more elaborate than a double*
it might work without a mutex. But you should avoid sparse vectors...

Greetings,
Oswin

> Hello,
>
> I would like to set elements values in a ublas vector / matrix on
> different threads. If I set the values with vectir(i) and i has different
> values on the threads, is there a synchronize problem on writing? Should I
> set a mutex structure around the writing call or has the ublas this
> build-in?
>
> Thanks
>
> Phil
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: Oswin.Krause_at_[hidden]
>