Consider Another Example ...
Matrix multiplication is a common operation in scientific computing
The C code for multiplying an mxn matrix A times an nxp matrix B and to produce an mxp matrix C is ...
for (i=0; i<m; i++){
for (j=0; j<p; j++){
C[i][j] = 0;
for (k=0; k<n; k++){
C[i][j] += A[i][k]* B[k][j];
}
}
}
Previous slide
Next slide
Back to first slide
View graphic version