Question: i only need code for 4th question please only code question: consider the transpose of A to find nth power using BMM Develop a parallel
Develop a parallel code for the following problem using OpenMP. Report the speedup of your implementations by varying the number of threads from 1 to 16 (i.e., 1, 2, 4, 6, 8, 10,12, 14, and 16). Use gettimeofday () for calculating runtime and consider the average of 5 runs. Finally, draw appropriate plots using the GNU plot. For example - Runtime vs. Matrix Sizes by fixing number of threads - Runtime vs. Threads by fixing the Matrix Size. nth Power of a Square Matrix: Consider a square matrix A and fill the matrix A (vary the order of matrix from 512512 to 20482048, in powers of 2) with random entries ranging from 0 to 1 . Assume that the matrix is given in row-major order. If you perform any transformation, that also has to be accounted for in the runtime as well. Consider the following implementations to find the nth Power, vary the value of n from 2 to 16 . - Ordinary Matrix Multiplication (OMM). - Block Matrix Multiplication (BMM) using block sizes: 4,8,16,32,64. - Consider the tranpose of A to find nth Power using OMM. Consider the tranpose of A to find nth Power using BMM
Step by Step Solution
There are 3 Steps involved in it
Heres the code to perform the matrix transpose and compute the nth power of a square matrix using Block Matrix Multiplication BMM with OpenMP The key components of the task are parallelization using O... View full answer
Get step-by-step solutions from verified subject matter experts
