I came across this post wondering about the same. After reading the current documentation it is not clear to me whether parallelizing such a loop using shared memory is easily achieved in Julia 0.3, or if the same difficulty remains.
Den torsdag den 7. november 2013 05.08.38 UTC+1 skrev Lars Ruthotto: > > I am relatively new to Julia and doing some simple experiments. So far, I > am very impressed by it's nice and intuitive syntax and performance. Good > job! > > However, I have a simple question regarding parallel for loops the manual > could not answer for me. Say I am interested in parallelizing this code > > a = zeros(100000) > for i=1:100000 > a[i] = i > end > > In the manual it is said (and I verified) that > > a = zeros(100000) > @parallel for i=1:100000 > a[i] = i > end > > does not give the correct result. Unfortunately it does not say (or I > couldn't find it) how this can be done in Julia? Does anyone have an idea? > > Thanks! > Lars > >
