Question: 2. Write a ClC++ program to find the sum of an integer randomly generated array of size 100000 using pthreads. Run your code using (1,2,4,5,10
2. Write a ClC++ program to find the sum of an integer randomly generated array of size 100000 using pthreads. Run your code using (1,2,4,5,10 and 20) threads and find how much time it took to complete the execution. Each thread should have the same number of elements from the array (e.g. in case of 4 threads, each thread should have 2500 elements from the array). You should submit the following: 1- The Code 2- A report that includes the following a. A results table like below. b. A discussion for the results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
