Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Coding using C++. Implement a program that takes one user input (n). Implement a scquential program that multiples matrices from 1*1, 2*2, to nn (n

Coding using C++.

image text in transcribed

Implement a program that takes one user input (n). Implement a scquential program that multiples matrices from 1*1, 2*2, to nn (n was given by the user). Make sure you ill out the matriccs with random numbcrs from a random numbcr gcncrator. Ensurc that you utilize a for loop in order to multiply the different sized matrices together (from 1*1 to n'n) and a for loop order to fill the matriccs with random numbers. Test the program with several different inputs for n and make sure that n is large enough for you to notice a pattern and receive enough data for a graph. Finally, make sure you are recording the time it took to multiply cach matrix size together, so that you can utilize the values in a graph for analysis purposes later on. Utilizing OpenMP implement an explicitly threaded program (using the Pthread standard). The program should take one input (n). The program should multiply matrices from 1*1, 2*2, to n n (n was given by the user). Make sure you fill out the matrices with random numbers from a n random number generator. Ensure that you utilize a for loop in order to mltiply the different sized matrices together (from to n*n) and a for loop in order to fill the matrices with random numbers. Test the program with several different inputs for n, and make sure that n is large enough for you to notice a pattern and receive enough data for a graph. Finally, make sure you are recording the timeit took to multiply each matrix size together, so that you can utilize the values in a graph for analysis purposes later on. 2-OpenMP Utilizing an OpenMP shared memory program, attempt to find the most optimal approach to shared memory parallelization of matrix multiplication. Implement a program that takes one user input (n). Utilizing OpenMP implement a program that multiples matrices from size 1*1, 2*2, to n'n (n was given by the user). Make sure you fill out the matrices with random numbers from a random number gencrator. Ensure that you utilize a for loop in order to multiply the different sized matrices together (from 1*1 to n*n) and a for loop in order to fill the matrices with random numbers. Test the program with several different inputs for n, and make sure that n is largc enough for you to notice a pattern and receive enough data for a graph. Finally, make sure you are recording the time it took to multiply cach matrix size togcther, so that you can utilize the values in a graph for analysis purposes later on Implement a program that takes one user input (n). Implement a scquential program that multiples matrices from 1*1, 2*2, to nn (n was given by the user). Make sure you ill out the matriccs with random numbcrs from a random numbcr gcncrator. Ensurc that you utilize a for loop in order to multiply the different sized matrices together (from 1*1 to n'n) and a for loop order to fill the matriccs with random numbers. Test the program with several different inputs for n and make sure that n is large enough for you to notice a pattern and receive enough data for a graph. Finally, make sure you are recording the time it took to multiply cach matrix size together, so that you can utilize the values in a graph for analysis purposes later on. Utilizing OpenMP implement an explicitly threaded program (using the Pthread standard). The program should take one input (n). The program should multiply matrices from 1*1, 2*2, to n n (n was given by the user). Make sure you fill out the matrices with random numbers from a n random number generator. Ensure that you utilize a for loop in order to mltiply the different sized matrices together (from to n*n) and a for loop in order to fill the matrices with random numbers. Test the program with several different inputs for n, and make sure that n is large enough for you to notice a pattern and receive enough data for a graph. Finally, make sure you are recording the timeit took to multiply each matrix size together, so that you can utilize the values in a graph for analysis purposes later on. 2-OpenMP Utilizing an OpenMP shared memory program, attempt to find the most optimal approach to shared memory parallelization of matrix multiplication. Implement a program that takes one user input (n). Utilizing OpenMP implement a program that multiples matrices from size 1*1, 2*2, to n'n (n was given by the user). Make sure you fill out the matrices with random numbers from a random number gencrator. Ensure that you utilize a for loop in order to multiply the different sized matrices together (from 1*1 to n*n) and a for loop in order to fill the matrices with random numbers. Test the program with several different inputs for n, and make sure that n is largc enough for you to notice a pattern and receive enough data for a graph. Finally, make sure you are recording the time it took to multiply cach matrix size togcther, so that you can utilize the values in a graph for analysis purposes later on

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions