2 Write a shared memory program to calculate Boolean AND A P

2) Write a shared memory program to calculate Boolean AND A) Pseudo Code with input is array A[o.N-11, output is Answer. Use the serial function AND(array) for load balancing, that takes in an array of size M, it returns the Boolean AND of that array and runs in time Q0M hrvauy o Answe printAnswe) ma, an elemen t5f -tne array to a diferent erngesser, hen they are Grs.ghed, rvn e ser. thus far Maf each elemen to yercube, they ah write lO /0

Solution

1. parallel time in terms of N and P.

answer: Tp= O(log N)

2. fastest parallel time in terms of p and N

answer: log N

6.efficiency= production time - stop time

7. optimal cost relation

O(N-0) P

where N=1

 2) Write a shared memory program to calculate Boolean AND A) Pseudo Code with input is array A[o.N-11, output is Answer. Use the serial function AND(array) for

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site