
23 Jun
2011
23 Jun
'11
7:53 p.m.
On Thu, Jun 23, 2011 at 10:32 AM, Gareth
wrote: ...
I've also checked the bugs list for any known bugs, fixed or otherwise, to do with threading and I haven't found anything. I'm not sure what I'm doing wrong.
The problem is here: https://gist.github.com/1041351#L60 You declare _barrier first and numCPU second, so in your constructor, _barrier will be initialized first, using the value of numCPU, which hasn't been initialized yet. Just change the order of the declarations. Declare _barrier below numNPU. By the way, compiling with -Wall catches all these errors. Regards, Ignacio Burgueño