Question: Problem 2 ( 2 pts ) for ( r = 0 ; r R; r + + ) for ( q = 0 ; q

Problem 2(2 pts)
for (r =0; r R; r++)
for (q =0; q Q; q++)
for (p =0; p P; p++)
for (s =O; s S; st+)
sum[r][p][g]+= A[r][s][2g]* C4[s][r];
For the same code above, calculate the spatial reuse direction vector for array reference A. Consider
then two cases, when a cache line fits 4 elements of A's datatype and when the cache line fits 2
elements of A's type. In which scenario will spatial reuse be possible?
Show the steps taken, include the matrix access representation of reference A, the solution to the linear
system to determine the reuse-direction vector, and explain the meaning of the direction vector found.
Problem 2 ( 2 pts ) for ( r = 0 ; r < R; r + + )

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 Programming Questions!