Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CLASSWORK 04

Team 2

Pipeline

recv(&res, &x, Pi-1);

res *= x;

send(&res, &x, Pi+1);

Divide and conquer

pow(a,b){

if(b==1)

return a;

mid = b/2;

y=pow(a,mid);

x=y*y;

return x;

You might also like