Question: Consider the following C code snippet, assuming that the array is written in row- major approach: int i; int a[64*64]; int x=0; for(i=0;i <64;i++){ x+=a[i]*a[64*i];
Consider the following C code snippet, assuming that the array is written in row- major approach: int i; int a[64*64]; int x=0; for(i=0;i<64;i++){ x+=a[i]*a[64*i]; } Suppose that it is executed on a system with a direct-mapped 4 kB data cache with 32-byte blocks and 64-bit int words. Also assume that the address of a is 0x0, that i and x are in registers, and that the cache is initially empty. What is the hit rate for this execution?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
