5. (Waiting on Tasks to Complete) In this exercise the client thread fires up four asynchronous functions.

Question:

5. (Waiting on Tasks to Complete)

In this exercise the client thread fires up four asynchronous functions. The signature of the function is:

double Computation(int n);

The client waits (a kind of barrier) on the four associated futures. Then compute the sum and average of the four results. Compare the speedup of this program by comparing the processing time with that of the equivalent sequential program.

(This example is a simple case of SPMD, Single Program, Multiple Data.)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: