periscop / clay

Clay, the Chunky Loop Alteration wizardrY
2 stars 5 forks source link

Stripmine adds extra dimensions where it should not. #11

Closed ftynse closed 8 years ago

ftynse commented 10 years ago
#pragma scop
/* Clay
   stripmine([0,0],1,4,1);
   stripmine([0,0,1],2,4,1);
 */
for (int i = 0; i < N; i++) {
  S1(i);
  S2(i);
}
#pragma endscop

Even with first transformation only, Clay adds an extra scattering dimension for S2 leading to the wrong execution order between instances of S1 and S2 in the generated code. (beta-vector of S2 becomes [0,0,1] instead of [0,1]).

Two transformations together generate randomly permuted loops, some of which are empty.

ftynse commented 9 years ago

It is caused by the pretty flag. I don't quite get a reason behind adding the extra dimensions to other relations selected by the current beta.

Actually, this flag may not do anything useful unless passed from tile