On Sunday, 10 January 2016 at 11:21:53 UTC, Marc Schütz wrote:

I'd say, if `shared` is required, but it compiles without, then it's still a bug.

Yeah, probably so. Interestingly, without 'shared' and using a simple assignment from a constant (means[i]= 1.0;), instead of assignment from the sum() evaluation, results in all the values being initialized, so not marking it shared doesn't protect it from being written from the other thread. Anyway, the shared declaration doesn't seem to slow the execution, and it does make sense to me that it should be marked shared.


Reply via email to