Appendix B: The Block Cyclic Matrix Multiplication Routine for Heterogeneous Platforms
2003
The text of the mpC program for parallel block cyclic matrix multiplication presented in Section 9.1.1.3 is broken down into four source files.The first file contains the declaration of the ParallelAxB network type.The name of the second source file must be ParallelAxB.mpc.The contents of this file are as follows: #define H(a, b, c, d, p) h[(a*p*p*p+b*p*p+c*p+d)] typedef struct {int I; int J;} Processor; nettype ParallelAxB(int p, int r, int n, int l, int w[p], int h[p*p*p*p]) { coord I=p, J=p; node {I>=0 && J>=0: bench*(w[J]*H(I, J, I, J, p)*(n/l)*(n/l)*n);}; link (K=p, L=p) { I>=0 && J>=0 && I!=K : length* (w[I]*H(I,J,I,J,p)*(n/l)*(n/l)*(r*r)*sizeof(double) [I,J]->[K,J]; I>=0 && J>=0 && J!=L && (H(I, J, K, L, p)>0) : length* (w[J]*H(I,J,K,L,p)*(n/l)*(n/l)*(r*r)*sizeof(double)) [I,J]->[K,L]; }; parent[0]; scheme { int k;