Repeat Exercise 11.3.7 for the following changes of axes:
a) Replace i by i + j; i.e., the direction of the axis is the lines for which i+j is a constant. The new axis corresponds to the outermost loop.
b) Replace j by i — 2j. The new axis corresponds to the outermost loop.
Exercise 11.3.7
For each of the loop nests in Fig. 11.17, rewrite the code so the axis i is replaced by the major diagonal, i.e., the direction of the axis is characterized by i = j. The new axis should correspond to the outermost loop.
Fig. 11.17
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here