Question: 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

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 contiguously storing matrix elements within the same column.a. b. for I-1:8 for J-1:8000 A(I,J) B(1,0) +A(J, I); end end for J-1:8000 for I=1:8 A(I,J) B(1,0) +A(J, I);

a. b. for I-1:8 for J-1:8000 A(I,J) B(1,0) +A(J, I); end end for J-1:8000 for I=1:8 A(I,J) B(1,0) +A(J, I); end end

Step by Step Solution

3.40 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Spatial locality refers to the tendency of a program to access memory locations that are clos... View full answer

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 Computer Organization Design Questions!