On Tuesday, 8 September 2015 at 05:50:30 UTC, Russel Winder wrote:
    void main() {
      immutable imax = 10;
      immutable jmax = 10;
      float[imax][jmax] x;
      foreach(int j; 1..jmax){
        foreach(int i, ref item; parallel(x[j-1])){
          x[j][i] = complicatedFunction(i, item);
        }
      }
    }

(though sadly, this doesn't compile for a reason I can't fathom instantly)
Hmm. Shouldn't you instead parallel the outer loop?

Reply via email to