Question: Consider the below omp _ trap 1 . c implantation, modify the code so that: i . The time used by the parallel block is

Consider the below omp_trap1.c implantation, modify the code so that: i. The time used by the parallel block is timed using the OpenMP function omp_get_wtime(). The syntax is double omp_get_wtime ( void ) It returns the number of seconds that have elapsed since some time in the past. ii. Now on a system with at least two cores, time the program with a. one thread and a large value of n, and b. two threads and the same value of n. Explain what happens? Then Do the same measurements for the omp_trap2.c code. 1. How does its performance compare with the performance of the omp_trap1.c ?2. Explain your answers. 3. provide with your answers the code and detailed screenshots showing how did you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!