Question
In this task you are asked to use OpenMp but you aren't allowed to use tasks or the OMP parallel for work-share construct. Instead you
In this task you are asked to use OpenMp but you aren't allowed to use tasks or the OMP parallel for work-share construct. Instead you are supposed to manually divide the task across the different threads. We did this in the review and in Funz.c You can use omp_get_thread_num() //
to get the the read id number omp_get_num_threads() //to get the total number of threads You can also use things like Atomic or single for when the thread need to reduce or compare ------
Set all values to zero Write a function that takes an int array reference and the size of said reference as input parameters and then sets all the elements in the array to be zero Input Body Output int array, int sizeOfArray Use a for loop to set each element in the array to have the value zero void
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started