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); end end
Step by Step Solution
3.40 Rating (163 Votes )
There are 3 Steps involved in it
Spatial locality refers to the tendency of a program to access memory locations that are clos... View full answer
Get step-by-step solutions from verified subject matter experts
