/****************************************************************************** * Serial Matrix Multiply - C Version * FILE: ser_mm.c * DESCRIPTION: Sequential version of a matrix multiply * To make this a parallel processing progam this program would be divided into * two parts - the master and the worker section. The master task would * distributes a matrix multiply operation to numtasks-1 worker tasks. * NOTE1: C and Fortran versions of this code differ because of the way * arrays are stored/passed. C arrays are row-major order but Fortran * arrays are column-major order. * AUTHOR: George Gusciora * LAST REVISED: 11/25/95 Blaise Barney ******************************************************************************/ #include #define NRA 62 /* number of rows in matrix A */ #define NCA 15 /* number of columns in matrix A */ #define NCB 7 /* number of columns in matrix B */ main() { int i, j, k; /* misc */ double a[NRA][NCA], /* matrix A to be multiplied */ b[NCA][NCB], /* matrix B to be multiplied */ c[NRA][NCB]; /* result matrix C */ /* Initialize A, B, and C matrices */ for (i=0; i