Rewrite the code for psum1 (Figure 5.1) so that it does not need to repeatedly retrieve the
Question:
Rewrite the code for psum1 (Figure 5.1) so that it does not need to repeatedly retrieve the value of p[i] from memory. You do not need to use loop unrolling. We measured the resulting code to have a CPE of 3.00, limited by the latency of floating-point addition.
Figure 5.1
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Computer Systems A Programmers Perspective
ISBN: 9781292101767
3rd Global Edition
Authors: Randal E. Bryant, David R. O'Hallaron
Question Posted: