Boost logo

Ublas :

Subject: Re: [ublas] storage -- unbounded_array
From: oswin krause (oswin.krause_at_[hidden])
Date: 2014-07-22 13:00:44


Hi Alex,

I assume you want to create a vector/matrix from some provided external
piece of memory and not a vector/matrix using c-arrays (because the
latter is implemented in uBLAS and works pretty well). So take some
advise from someone who went down the first road:

The storage concept is not compatible with what you want to do. It -and
everything that uses it - assumes that storage can be *copied* and is
owned by a *single* vector/matrix. Essentially the whole concept of
implementing a vector using external storage as a vector_container is
seriously flawed and it can only be safely implemented as a new
vector_proxy in the style of vector_range (only that it does not access
another vector but the c-array).

I don't know what the current status is but i heard that people wanted
to do add this kind of proxy to uBLAS. Also there are already a few
projects which want to "replace some custom code preserving existing
API" (for example my own). Maybe all you want to do is already done in
one of these projects.

Best,
Oswin

On 22.07.2014 16:44, Alexey Luchko wrote:
> Hi folks,
>
> I'm trying to start with boost uBLAS.
>
> My intention is to replace some custom code preserving existing API.
>
> The first goal is to create vector and matrix from a C array.
>
> I've found that Storage concept offers range constructor, however both
> bounded and unbounded array storages do not provide it.
> http://www.boost.org/doc/libs/1_55_0/libs/numeric/ublas/doc/storage_concept.htm
> http://www.boost.org/doc/libs/1_55_0/libs/numeric/ublas/doc/bounded_array.htm
> http://www.boost.org/doc/libs/1_55_0/libs/numeric/ublas/doc/unbounded_array.htm
>
> First of all, it is disappointing. Is there a special purpose for the mismatch?
>
> --
> Regards,
> Alex
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: Oswin.Krause_at_[hidden]