Question: PART 3: PARALLEL PROGRAMING [15 points] 12. Complete the following C++ parallel program (BOTH countNog and main) that counts the number of negative numbers in
![PART 3: PARALLEL PROGRAMING [15 points] 12. Complete the following C++](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4677e097b3_30966f4677d9dd54.jpg)
PART 3: PARALLEL PROGRAMING [15 points] 12. Complete the following C++ parallel program (BOTH countNog and main) that counts the number of negative numbers in an integer array. (15 points NOTE: If you want to write the same program in Java that is acceptable // Global long negCount = 0; // This is where you store the count mutex neglock: // Dedare the mutex // Count the number of negative numbers for the range start - finish // and add the count to the global variable negCount void countNeg(int numbers(), const long start, const long finish) { // Complete the function [8 points) > // The Driver IMG_1888.HEIC 2 documents, 2 tota int main01 const int MAX=200000 long start = 0; long end = MAX; int numbers(MAX) = (-4,-1,-10, 01.231: // Create 4 threads (4 points) o // Join the 4 threads (2 points) // Print the answer [1 points return 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
