Question: The C++ thread library provides a function that returns the number of threads that the hardware is capable of running. Modify the parallel merge sort

The C++ thread library provides a function that returns the number of threads that the hardware is capable of running. Modify the parallel merge sort so that the user specifies a minimum chunk size. The program should then use the number of threads available and MAX_ITEMS to determine the largest chunk size that will produce that many threads. If the computed chunk size is larger than what the user specifies, use that instead. Here is how to get the number of threads available: unsigned int maxthreads = thread::hardware_concurrency();

Step by Step Solution

3.52 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Your question seems to be about parallel programming using C threads and how to modify a parallel me... View full answer

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 Programming Language Pragmatics Questions!