Next: Examine the inner loop Up: Chapter1 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 Feb 6 22:02:49 GMT 1997