Boost logo

Ublas :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2006-12-29 06:03:31


On 28 Dec 2006, at 09:48, Janek Kozicki wrote:

> Joseph Turian said: (by the date of Wed, 27 Dec 2006 16:58:23
> -0500)
>
>>> On the serialization of ublas entities, I saw a previous post (
>>> http://getir.net/tfm)* *but nothing more. I can not stress enough
>>> how
>> useful
>>> it would be to have serialization support. Is there anyone seriously
>> working
>>> on this?
>>
>> I second this request.
>>
>> In general, how do people save and load ublas matrices and vectors?
>
>
> See attachment.
>
>
> I hope that ublas authors will take my files and commit it to boost
> CVS.
> I'm sending them twice a year to the mailing list :p, just browse the
> archives.

I see serious problems with this approach:

* a sparse matrix/vector is serialized as dense
* a copy is made
* no use is made of the array optimizations in the CVS HEAD

The performance, especially on large matrices will be very bad, and
in many cases - especially when a dense copy is attempted for a arge
sparse matrix there will just not be enough memory.

Unfortunately ublas serialization is much more involved.

> Those files should be placed in boost/serialization directory.

No, they should be placed with ublas.

Matthias