
edouard@fausse.info 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@wp.pl> 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: https://yade-dem.org/wiki/Screenshots_and_videos#Ball_Mill_-_125_000_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 http://janek.kozicki.pl/ |