The C++ thread library provides a function that returns the number of threads that the hardware is

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 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();

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

Step by Step Answer:

Related Book For  book-img-for-question

C++ Plus Data Structures

ISBN: 9781284089189

6th Edition

Authors: Nell Dale, Chip Weems, Tim Richards

Question Posted: