Question: serial_pi.c : Create a file called pi.c based on serial_pi.c. The new file, pi.c can do the following: - Accept one command line argument. -



serial_pi.c :

Create a file called pi.c based on serial_pi.c. The new file, pi.c can do the following: - Accept one command line argument. - The first argument is a value between 10 and 10000000 . It provides the number of random points to be generated for the pi estimation process. - The output to screen must print the value of the estimated pi. Create a file called thread_pi.c based on pi.c. The new file, thread_pi.c can do the following: - Accept two command line argument. - The first argument is a value between 10 and 10000000 . It provides the number of random points to be generated for the pi estimation process. - The second argument is the number of threads to be used for parallel calculation. - The function run by each thread is to be called montecarlo. - The argument array for montecarlo should include two parameters, one representing the number of points to be calculated by each thread, and another representing the random seed to be used by montecarlo - The output to screen must print the value of the estimated pi. Create a file called intrinsic_pi.c based on pi.c. The new file, intrinsic_pi.c can do the following: - Accept one command line argument. - The first argument is a value between 10 and 10000000 . It provides the number of random points to be generated for the pi estimation process. - The calculation process should be rewritten so that all calculations are to be done via intrinsic. You can assume SSE intrinsic. - The output to screen must print the value of the estimated pi
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
