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

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, ahmedeldyame
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
image
Engineering, 04.07.2019 18:10, Larkinlover703
Items are similar to the free issue items, but their access is limited. (clo5) a)-bin stock items free issue b)-bin stock controlled issue c)-critical or insurance spares d)-rebuildable spares e)-consumables
Answers: 1
image
Engineering, 04.07.2019 18:20, rjone8429
Asimple rankine cycle uses water as the working fluid. the water enters the turbine at 10 mpa and 480c while the condenser operates at 6 kpa. if the turbine has an isentropic efficiency of 80 percent while the pump has an isentropic efficiency of 70 percent determine the thermal efficiency
Answers: 1
image
Engineering, 04.07.2019 19:10, babas97
What is a monomer? how do they form a ploymer from the view point of chemical bonding?
Answers: 1
You know the right answer?
In This exercise, we look at memory locality properties of matrix computation. The following code is...

Questions in other subjects:

Konu
History, 17.03.2020 00:44