Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( a ) Write a program, using C , C + + , or Java, that multiplies two rectangular matrices - - please no square
a Write a program, using or Java, that multiplies two rectangular matrices please no square matrices whose elements are randomly generated. You may not use a matrix multiplication library in your code. You will have two versions of the program, one in which matrix elements are integers and another one where they are real numbers double points
You will compile and run the programs on two different systems most likely one of them will be your own desktoplaptop and the other one a computer in the lab, or otherwise on one of the UNIX computers IIT makes available to its students.
Measure the time it takes each program to complete and then compare the performance of the two systems Since the matrices are randomly generated, you will have to run the program several times, measure the running time and then take the average. Also the running time has to be significantly large at least several seconds to reduce the impact of measuring errors; this means you will have to work with matrices that have at least hundreds of lines and columns.
Is the performance ratio the same as the clock rate ratio of the two systems Explain. Based on the retail price of the two systems, which one is more cost effective
b Change your multiplication algorithm and repeat the steps above; for instance, if you used the the naive multiplication algorith with the column in the inner loop, then just use the same algorithm with the row in the inner loop same scoring as part a
Make sure your work includes a description of the two systems manufacturer CPU type, amount of memory, operating system, etc. and of the compiler used Attach the source code, the tables with your time measurements for your work, and a link to your repository such that we can checkout the code, build, and execute
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