Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-09-18 16:45:29


Am Dienstag, 18. September 2007 15:01 schrieb Michele De Stefano:
> The problem is this: imagine you have written to file the whole
> matrix, using the boost::serialization facilities. Imagine that now,
> you want to load in memory only
> a sub-matrix of the matrix you have just saved. I think this is not
> possible if you have
> implemented the serialization as described into the
> boost::serialization documentation,
> because once you have written to file the whole matrix, the only
> thing you can do is to
> re-load it as a whole.

Yes, the current implementation is exactly that: Dump all data and state
info to a stream and restore all data and state info from stream. This
can be used to make a matrix persistent and this is IMHO the intention
of serialization.

If you plan to load only parts of a large matrix, than this is difficult
using the current implementation. However, when I think of linear
algebra (the main target of uBLAS) I do not see a situation where the
matrix is too large to be fully loaded - except when I plan large scale
computations done on a cluster of machines (which is no target of
uBLAS).

Currently the memory layout is guaranteed for dense matrices, described
by the (basic_)row_major and (basic_)colum_major classes, and for the
coordinate_matrix and compressed_matrix types. This will not change in
the future.

mfg
Gunter