LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Virgilio, Vincent (Vincent.Virgilio_at_[hidden])
Date: 2003-04-23 02:31:55


Noted. I'll have to look at the standard again.

However, there are suggestive scraps of googlable evidence which weigh in
for contiguous vectors - like the following from Scott Meyers' errata to
'Effective STL'. (Emphasis mine.)

   5/ 9/01 sdm Many In most places where I mention arrays, I should
                      mention valarrays, too. [Like vectors, valarrays
                      are constrained to have contiguous storage], and
                      this means that pointers can be used as iterators
                      into valarrays.

Regards,

Vince Virgilio

> -----Original Message-----
> From: André Kempe [mailto:andre_at_[hidden]]
> Sent: Wednesday, April 23, 2003 2:05 AM
> To: General LAM/MPI mailing list
> Subject: Re: LAM: MPI datatypes
>
>
> Hi,
>
> I would be very causious with that assumption. I had a short
> glimpse at
> the C++ standard (ISO 14482), and it says nothing about the
> requirered
> memory-managment of the vector.
>
> If it would do so, you could ask
> a. what the allocator-template-argument is good for, and
> b. why is there no function const T* data() similar to const char *
> c_str() of std::string for dircect-memory-access
>
> This would leave only three possibilities to get the stl::vector work
> with MPI. Either create a temporary copy, or have a real
> close look at
> your stl-implemetation, or write your own container that meets your
> requirements.
>
> Good Luck
>
> André
>
> Virgilio, Vincent wrote:
>
> >I am under the impression that one of the (perhaps implicit)
> >requirements of the C++ STL is that std::vectors are stored in
> >contiguous memory. So the below code should work with all
> conformant
> >C++ compilers.
> >
> >Vince Virgilio

************************************
If this email is not intended for you, or you are not responsible for the
delivery of this message to the addressee, please note that this message may
contain ITT Privileged/Proprietary Information. In such a case, you may not
copy or deliver this message to anyone. You should destroy this message and
kindly notify the sender by reply email. Information contained in this
message that does not relate to the business of ITT is neither endorsed by
nor attributable to ITT.
************************************