/** * * UPC Matrix multiplication Example * * Compute C (N,M) = C(N,M) + a(N, P) * b(P, M). * This algorithm uses a simple 1D layout: * A and C are distributed by rows, while B is distributed by columns. */ #include shared [P] elem_t a[N][P]; shared [M] elem_t c[N][M]; shared elem_t b[P][M]; int main(int argc, char** argv) { int i,j,l; double sec; elem_t sum; /* Initializing a and b */ for(i=0;i