Boost logo

Ublas :

From: Abdel-Aziz NDIAYE (Abdel-Aziz.Ndiaye_at_[hidden])
Date: 2006-09-07 11:57:45


Selon ublas-request_at_[hidden]:

> Send ublas mailing list submissions to
> ublas_at_[hidden]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> or, via email, send a message with subject or body 'help' to
> ublas-request_at_[hidden]
>
> You can reach the person managing the list at
> ublas-owner_at_[hidden]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ublas digest..."
>
>
> Today's Topics:
>
> 1. Re: Question about ublas vector (Gunter Winkler)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 5 Sep 2006 10:00:55 +0200
> From: Gunter Winkler <guwi17_at_[hidden]>
> Subject: Re: [ublas] Question about ublas vector
> To: ublas mailing list <ublas_at_[hidden]>
> Message-ID: <200609051000.55998.guwi17_at_[hidden]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Monday 04 September 2006 10:41, Abdel-Aziz NDIAYE wrote:
> > Hi,
> > I'm a developper at inria and I work on Siconos project. I'd like to know
> > how can I build ublas vectors which are contiguous in the memory. For
> > instance, let suppose that I want to have a std::vector of pointers on
> > ublas vector and I want the ublas vectors pointed to be contiguous in the
> > memory, how can I do that ? Thanks.
>
> This is quite difficult, because preallocated storage does not work in
> connection with aliasing and hidden temporaries.
>
> Although there are some things to try.
>
> * Use local (stack, inline) storage: bounded_vector, bounded_array
> * use a (constant) view of external data, see example 3 at
> http://www.bauv.unibw-muenchen.de/~winkler/ublas/examples/index.html
> * use a big vector and a list of vector_range(s)
> * have a look at the other storage adaptors (and improve the
> implementation)
>
> The main difficulties are:
> * whenever the right hand side of an expression may alias data of the left
> hand side, the result is computed in a temporary vector. Then
> assign_temporary() swaps only the pointers to the storage (if possible).
> * the semantics of the copy constructor is to create an exact copy with
> distinct storage. This does not work with external storage because you have
>
> no way to (externally) allocate storage.
>
> mfg
> Gunter
>
>
> ------------------------------
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>
>
> End of ublas Digest, Vol 22, Issue 2
> ************************************
>
>

hi Gunter,
thank you for your response. But, your mail is a bit technical for me and I want
some explanations.
At first, what do you mean by "you have no way to (externally) allocate
storage." ? because I don't understand the difference between what you called
"internal storage" and the external one.
Regards.