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
Aloaded platform of total mass 500 kg is supported by a dashpot and by a set of springs of effective stiffness 72 kn/m. it is observed that when the platform is depressed through a distance x = 12.5 cm below its equilibrium position and then released without any initial velocity; it reaches its equilibrium position in the shortest possible time without overshoot. find the position and velocity of the loaded platform 0.10 sec. after its release. if a further load of 400 kg is added to the platform, find, i) the frequency of damped vibrations, and i) the amplitude of vibration after 2 complete oscillations, given that the initial amplitude is 15 cm.
Answers: 1
question
Engineering, 04.07.2019 18:10
Asingle-geared blanking press has a stroke of 200 mm and a rated capacity of 320 kn. a cam driven ram is assumed to be capable of delivering the full press load at constant force during the last 15 percent of a constant-velocity stroke. the camshaft has an average speed of 90 rev/min and is geared to the flywheel shaft at a 6: 1 ratio. the total work done is to include an allowance of 16 percent for friction a) estimate the maximum energy fluctuation b) find the rim weight for an effective diameter of 1.2 m and a coefficient of speed fluctuation of 0.10
Answers: 1
question
Engineering, 04.07.2019 18:10
The flow rate of air through a through a pipe is 0.02 m5/s. a pitot static tube is placed in the flow. the radius of the pitot static tube is 1 mm. assuming the flow to be steady and the air to be at 300k, calculate the difference in total and static pressure if the diameter of the pipe is: (a) d 0.1 m d 0.05 m (c) d 0.01 m
Answers: 2
question
Engineering, 04.07.2019 18:20
Apiston-cylinder device contains 0.1 m3 of liquid water and 0.9 m3 of water vapor in equilibrium at 800 kpa. heat is transferred at constant pressure until the temperature of water reaches 350 °c. determine (a) the quality of water at the initial state (b) the work associated with this process, (c) the heat associated with this process.
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, 25.01.2021 16:50
question
Mathematics, 25.01.2021 16:50
question
Biology, 25.01.2021 16:50
question
Mathematics, 25.01.2021 16:50