Question: Locality is affected by both reference order and data layout. The same computation as Problem 1 can also be written below in Matlab, which differs

Locality is affected by both reference order and data layout. The same computation as Problem 1 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,0)+ A(j,i);
end
end
A. How many cache blocks are required to hold all 32-bit matrix elements being referenced?
B. References to which variables exhibit temporal locality?
C. References to which variables exhibit spatial locality?\

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!