Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Daniel Krügler <daniel.kruegler@googlemail.com> |
|---|---|
| Newsgroups | comp.std.c++ |
| Subject | Re: Request för std::vector and possibly others: minimal initalization |
| Date | 2012-03-24 19:25 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <jkk2dv$dn8$1@dont-email.me> (permalink) |
| References | <abf103e0-7005-47b4-9888-af946353a525@v22g2000vby.googlegroups.com> <vtidnTDJTMF2M_TSnZ2dnUVZ7sOdnZ2d@bt.com> <2bd4117e-d3cb-436f-b1a9-f08971dbdce2@h5g2000vbx.googlegroups.com> |
Am 24.03.2012 01:09, schrieb henrikv: > > On 21 mar, 19:35, Francis > Glassborow<francis.glassbo...@btinternet.com> wrote: >> >> Isn't that what reserve() is for? > > > What I want to do is to allocate a vector for results calculated in a > parallel loop. Reserve+push_back will not work, since it's not > guaranteed that results will be stored in a predictable order. You > might even get multiple push_back's executed at once, which I suspect > isn't a great idea. What you describe sounds like a data race to me, so every normal assumptions have lost their foundation. Please elaborate in more detail, but speculating upon games with undefined behaviour doesn't look like something that the Standard Library should pro-actively support. HTH & Greetings from Bremen, Daniel Krügler -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
Request för std::vector and possibly others: minimal initalization henrikv <henrik.vallgren@stream-space.com> - 2012-03-19 23:35 -0700
Re: Request för std::vector and possibly others: minimal initalization Francis Glassborow<francis.glassborow@btinternet.com> - 2012-03-21 11:35 -0700
Re: Request för std::vector and possibly others: minimal initalization henrikv<henrik.vallgren@stream-space.com> - 2012-03-23 17:09 -0700
Re: Request för std::vector and possibly others: minimal initalization Daniel Krügler <daniel.kruegler@googlemail.com> - 2012-03-24 19:25 -0700
Re: Request för std::vector and possibly others: minimal initalization Francis Glassborow <francis.glassborow@btinternet.com> - 2012-03-24 19:28 -0700
Re: Request för std::vector and possibly others: minimal initalization Jason McKesson<jmckesson@gmail.com> - 2012-03-21 11:35 -0700
Re: Request för std::vector and possibly others: minimal initalization henrikv<henrik.vallgren@stream-space.com> - 2012-03-23 17:10 -0700
Re: Request för std::vector and possibly others: minimal initalization Jason McKesson<jmckesson@gmail.com> - 2012-03-24 17:55 -0700
Re: Request for std::vector and possibly others: mi brangdon@cix.compulink.co.uk (Dave Harris) - 2012-03-24 19:24 -0700
Re: Re: Request för std::vector and possibly others: minimal initalization jgk@panix.com (Joe keane) - 2012-03-27 12:10 -0700
Re: Request för std::vector and possibly others: minimal initalization Kevin McCarty<kmccarty@gmail.com> - 2012-03-23 17:11 -0700
Re: Request för std::vector and possibly others: minimal initalization Miles Bader<miles@gnu.org> - 2012-03-24 17:55 -0700
Re: Request för std::vector and possibly others: minimal initalization henrikv <henrik.vallgren@stream-space.com> - 2012-03-25 23:14 -0700
Re: Request för std::vector and possibly others: minimal initalization Jason McKesson <jmckesson@gmail.com> - 2012-03-24 19:27 -0700
Re: Request för std::vector and possibly others: minimal initalization Pedro Lamarão<pedro.lamarao@gmail.com> - 2012-03-29 12:28 -0700
Re: Request för std::vector and possibly others: minimal initalization Daniel Krügler <daniel.kruegler@googlemail.com> - 2012-03-29 13:17 -0700
csiph-web