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, 03.07.2019 14:10
Amass of 1.5 kg of air at 120 kpa and 24°c is contained in a gas-tight, frictionless piston-cylinder device. the air is now compressed to a final pressure of 720 kpa. during the process, heat is transferred from the air such that the temperature inside the cylinder remains constant. calculate the boundary work input during this process.
Answers: 2
question
Engineering, 04.07.2019 18:10
What difference(s) did you notice using a pneumatic circuit over hydraulic circuit.explain why the pneumatic piston stumbles when it hits an obstacle.
Answers: 2
question
Engineering, 04.07.2019 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 18:10
Aturning operation is performed with following conditions: rake angle of 12°, a feed of 0.35 mm/rev, and a depth of cut of 1.1 mm. the work piece is aluminum alloy 6061 with t6 heat treatment (a16061-t6). the resultant chip thickness was measured to be 1.0 mm. estimate the cutting force, fc. use shear stress of 207 mpa and coefficient of friction on the tool face of 0.6.
Answers: 1
You know the right answer?
In This exercise, we look at memory locality properties of matrix computation. The following code is...
Questions
question
Mathematics, 07.03.2021 08:00
question
Computers and Technology, 07.03.2021 08:00
question
Mathematics, 07.03.2021 08:00
question
Mathematics, 07.03.2021 08:00
question
Chemistry, 07.03.2021 08:00
Questions on the website: 13722360