// UPC Matrix multiplication Example // a(N, P) is multiplied by b(P, M). Result is stored in c(N, M) // In this example, a is distributed by rows while b is distributed by columns. // We do use the upc_forall construct in this example #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