Question: // Print the answer [1 points] PART 3: PARALLEL PROGRAMING [15 points] 12. Complete the following C++ parallel program (BOTH countNeg and main) that counts
![points] 12. Complete the following C++ parallel program (BOTH countNeg and main)](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2e3da076da_07366f2e3d98feeb.jpg)
// Print the answer [1 points] PART 3: PARALLEL PROGRAMING [15 points] 12. Complete the following C++ parallel program (BOTH countNeg 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 I) Global long negCount =0;1/ This is where you store the count mutex neglock; // Declare the mutex 1/ Count the number of negative numbers for the range start - finish 1/ and add the count to the global variable negCount void countNeg(int numbers [] , const long start, const long finish) / Complete the function [8 points]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
