subject
Engineering, 21.01.2021 18:30 austinlogan3218

In This exercise, we look at memory locality properties of matrix computation. The following code is written in C, where elements within the same row are stored contiguously. Assume each word is a 32-bit integer.
for( i = 0; i < 8; i++ )
for( j = 0; j<8000; j++ )
a[i][j] = b[i][0] + a[j][i]
a) How many 32-bit integers can be stored in a 16-byte cache line?
b) References to which variables exhibit temporal locality?
c) References to which variables exhibit spatial locality?
Locality is affected by both the reference order and data layout. The same computation can also be written below
in Matlab, which differs from C by storing matrix elements within the same column contiguously in memory.
for i = 1 : 8
for j = 1 : 8000
A( i , j ) = B( i , 1 ) + A( j , i );
end
end
d) References to which variables exhibit temporal locality?
e) References to which variables exhibit spatial locality?

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Adouble-strand no. 60 roller chain is used to transmit power between a 13-tooth driving sprocket rotating at 300 rev/min and a 52-tooth driven sprocket. a) what is the allowable horsepower of this drive? b) estimate the center-to-center distance if the chain length is 82 pitches. c) estimate the torque and bending force on the driving shaft by the chain if the actual horsepower transmitted is 30 percent less than the corrected (allowable) power.
Answers: 3
question
Engineering, 04.07.2019 18:10
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
question
Engineering, 04.07.2019 18:20
How much power could a wind turbine produce if it had the following specifications? cp = 0.45 -d=1.2kg/m3 d=50m v 5m/s
Answers: 2
question
Engineering, 04.07.2019 19:10
An electric kettle is made out of stainless steel, weighs two pounds (when empty) and is equipped with a heating element that consumes 2 kw of electricity. assuming that the water and the kettle are at the same uniform temperature at any moment of time, calculate the shortest possible time to bring 2 quarts of water from room temperature to the onset of boiling
Answers: 2
You know the right answer?
In This exercise, we look at memory locality properties of matrix computation. The following code is...
Questions
question
Mathematics, 27.04.2021 03:30
question
Mathematics, 27.04.2021 03:40
question
Mathematics, 27.04.2021 03:40
question
Mathematics, 27.04.2021 03:40
Questions on the website: 13722362