Hi there!
I am trying to learn how to do some loop permutations.
I understand how to do this transformation (from the Banerjee book Example3.8.)
This looks like a pretty good example for me to get
started in the ISL methods to do the same thing - but the manual looks
daunting -
do I1 = 1,100
do I2 = I1+1, 199
do I3 = I2, I1+I2
H(I1, I2, I3)
enddo
enddo
enddo
Permute such that I3-loop becomes outermost loop and I2-loop becomes innermost loop. After the transformation, the new index variables (counted from outermost loop inward) would be K1, K2, K3
(K1, K2, K3) = (I3, I2, I1).
Basically in the example they go on to apply Fourier elimination method to obtain a range for K1 between two constants, a range for K2 between two functions based on K1, and finally for K3 based on two functions on K1 and K2.
I think we need to represent the input I1, I2, I3 constraints as a set. Then I need to map this set to (K1, K2, K3) after rewriting the input constraints based on (K1, K2, K3) = (I3, I2, I1). After that there needs to be a call to map_apply_range? Any help?!
Best,
Ram