Next: ... Up: Motivation: an example Previous: Accumulate into a scalar

Interchange loops

  for (i = 0; i < 500; i++)
    for (k = 0; k < 500; k++){
      r = A[i][k];
      for (j = 0; j < 500; j++)
        C[i][j] += r * B[k][j];
    }


Paul H J Kelly Thu Dec 4 18:15:31 GMT 1997