Question: Write an OpenMP program that performs a matrix-vector multiply on an 512x512 matrix of integers, multiplied by a 512x1 vector. Initialize the matrix in your
Write an OpenMP program that performs a matrix-vector multiply on an 512x512 matrix of integers, multiplied by a 512x1 vector. Initialize the matrix in your program. Then have your program:
a.) Print out the number of processors available to run the program on a multicore system of your choice and print out a unique threadID for each thread using the OpenMP built-in function.
b.) Print out the resulting vector.
c.) Use the OpenMP built-in reduction to compute each element of the output vector.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
