1. Write a program, using your favorite computer (under some operating system that must support VMM)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write a program, using your favorite computer (under some operating system that must support VMM) and your favorite programming language, which demonstrates that the timings of matrix addition differ substantially for large enough matrices, depending whether you use Version I or Version 2: for 1-1 to n do for j-1 to n do C[1,3]: A[1,3]+B[i, j] Version 1 for 1:1 to n do for 1-1 to n do C[1,1]:-A[1,3]+B (1,1] Version 2 Specifically, use this sequence of values for n, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536, and study the timings of both versions. (Be aware that some runs may take longer than you are willing, or able, to wait!) Keep in mind that the two versions should have the same timings and the doubling the value of n should result in a quadrupling of time spent to do the addition, assuming everything were done in core (which is of course not the case, since the last value corresponds to a memory requirement of almost 50 Gigabytes, assuming four bytes per word). Note that you must initialize your matrices A and B but the time required for this should not be part of the measurements. 1. Write a program, using your favorite computer (under some operating system that must support VMM) and your favorite programming language, which demonstrates that the timings of matrix addition differ substantially for large enough matrices, depending whether you use Version I or Version 2: for 1-1 to n do for j-1 to n do C[1,3]: A[1,3]+B[i, j] Version 1 for 1:1 to n do for 1-1 to n do C[1,1]:-A[1,3]+B (1,1] Version 2 Specifically, use this sequence of values for n, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536, and study the timings of both versions. (Be aware that some runs may take longer than you are willing, or able, to wait!) Keep in mind that the two versions should have the same timings and the doubling the value of n should result in a quadrupling of time spent to do the addition, assuming everything were done in core (which is of course not the case, since the last value corresponds to a memory requirement of almost 50 Gigabytes, assuming four bytes per word). Note that you must initialize your matrices A and B but the time required for this should not be part of the measurements.
Expert Answer:
Related Book For
Auditing and Assurance services an integrated approach
ISBN: 978-0132575959
14th Edition
Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley
Posted Date:
Students also viewed these programming questions
-
Locate the centroid (xc, yc) of the shaded area. Given: a = 1 in b = 3 in c = 1 in d = 1 in e = 1 in b
-
The slender rod AB of length L forms an angle with the vertical axis as it strikes the frictionless surface shown with a vertical velocity v1 and no angular velocity. Assuming that the impact is...
-
Refer again to Exercise 12.6 and assume that the assumptions about the model prevail. The estimated standard errors of are 00161, and .1862, respectively. (a) Determine a 95% confidence interval for...
-
Using quarterly data for 10 years, the regression results are given in the following table where CAR = number of new car sales per thousand population, PRICE = new car price index, INC= per-capita...
-
Refer to Global Chopsticks in E7-21A. Wong did franchise her restaurant concept. Because of Global Chopsticks' success, Noodles-n-More has come on the scene as a competitor. To maintain its market...
-
Ray Johnson and his 8-year-old son, David, were waiting for a walk sign before crossing a street in downtown Salt Lake City. A truck owned by Newspaper Agency Corporation (NAC) and operated by its...
-
True or False. Internal and external friction can cause instability in a rotating shaft at speeds above the first critical speed.
-
Retail Inventory Method Presented below is information related to Waveland Inc. Assuming that Waveland Inc. uses the conventional retail inventory method; compute the cost of its ending inventory at...
-
SHOW WORKINGS: Suppose a Gatorade costs 25 euros in Finland and20 Singaporean dollars in Singapore. If the exchange rate is 1.25euros per Singaporean dollar, what is the real exchange rate?
-
Mary is planning her wedding and develops the following preliminary information. For this problem, the normal times have been changed from OM3 a. Draw the network for this project. b. What is the...
-
# Question 2 Simple linear model. # CG Q2a # Build a linear regression model that has ####### count as the response and ####### the weather situation variable as predictor. ####### Name your fitted...
-
Address your memo to your client John Kimble. Mr. Kimble is a retired kindergarten teacher. Assume that you are writing on March 1, 2013, shortly after the filing of the 2012 Form 10-K. In the...
-
Manufacturing Overhead Variable overhead costs are based on labor hours, listed below: Indirect materials 50 per labor hour Indirect labor 75 per labor hour Utilities Maintenance Foxed overhead...
-
Use the two studies found at the following links: https://www.ekospolitics.com/wp-content/uploads/full_report_december_4_2017.pdf https://globalnews.ca/news/6982152/canadians-gun-ban-ipsos-poll/ For...
-
You are an analyst at the music publishing firm, KNM Inc. KNM Inc. controls copyrights and collects royalties by distributing music. Royalties are earned when songs are played on radio broadcasts or...
-
A single tone FM signal is given by: 9 FN (1) = 10 cos(167 x 10t +20 sin(20zx10)) (a) Find the modulation index and estimate the bandwidth of the FM signal. (b) If k, = 10/ kHz / volt, what is the...
-
B made an issue of 150,000 $1 ordinary shares at a premium of 20% the proceeds of which is received by cheque. What is the correct journal to record this? A. Bank Share capital Share premium B. Bank...
-
Determine the reactions in supports A and D and connections B and C. Sketch its shear and moment diagram and determine the magnitude ankoration of the maximum shear and moment for every member. 18 3...
-
The auditor of Ferguson's Inc. identified two internal controls in the sales and collection cycle for testing. In the first control, the computer verifies that a planned sale on account will not...
-
State the reporting requirements for statements prepared on a basis other than GAAP.
-
Explain the relationship between tests of the acquisition and payment cycle and tests of inventory. Give specific examples of how these two types of tests affect each other.
-
Consider an experiment that selects a cell phone camera and records the recycle time of a flash (the time taken to ready the camera for another flash). The possible values for this time depend on the...
-
Suppose that the recycle times of two cameras are recorded. The extension of the positive real line \(R\) is to take the sample space to be the positive quadrant of the plane \[ S=R^{+} \times R^{+}...
-
Each message in a digital communication system is classified as to whether it is received within the time specified by the system design. If three messages are classified, use a tree diagram to...
Study smarter with the SolutionInn App