PPT Slide
Process row(i= 0 to n)
{ for [j = 0 to n-1]
{c[i,j] = 0.0;
for [k= 0 to n-1]
c[i,j] = c[i,j] + a[i,k] * b[k,j];
}
}
Process Worker[w = 1 to p]
{ int first = (w-1)*n/p;
int last = first +n/p -1;
for [i = first to last]
{ for [j = 0 to n-1]
c[i,j] = 0.0;
for [k = 0 to n-1]
{ c[i,j] = c[i,j] +a[i,k]*b[k,j];
}
}
}
Previous slide
Back to first slide
View graphic version