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
Your question seems to be about parallel programming using C threads and how to modify a parallel me... View full answer
Get step-by-step solutions from verified subject matter experts
