Boost logo

Boost :

Subject: Re: [boost] boost atomic question
From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2010-04-30 12:03:51

edouard_at_[hidden] said: (by the date of Fri, 30 Apr 2010 17:12:50 +0200)

> On Fri, 30 Apr 2010 17:04:53 +0200, Janek Kozicki <janek_listy_at_[hidden]>
> wrote:
> > What would it take to get this code to work?
> >
> > std::vector<boost::atomic<Something> > v;
> > v.resize(100);
> Hi Janek,
> I'd like to know what's your goal when you declare a vector of "atomic"
> variables. What is the result you are looking for?

This is for YADE, our software for discrete modelling.

Imagine a std::vector of 125000 spheres:

it is currently parallelized with OPEN MP, but there are some global
locks in few places. Saying that each sphere is atomic (instead of
locking whole container) would solve the problem.

best regards

Janek Kozicki                       |

Boost list run by bdawes at, gregod at, cpdaniel at, john at