File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -3786,6 +3786,23 @@ bool DependenceInfo::tryDelinearizeParametricSize(
3786
3786
return false ;
3787
3787
}
3788
3788
3789
+ // TODO: Probably we need to prove that the "offset calculation" doesn't
3790
+ // wrap. Here the offset calculation is:
3791
+ //
3792
+ // Offset =
3793
+ // Subscripts[0] +
3794
+ // Subscripts[1]*Sizes[0] +
3795
+ // Subscripts[2]*Sizes[0]*Sizes[1] +
3796
+ // ...
3797
+ // Subscripts[N-1]*Sizes[0]*Sizes[1]*...*Sizes[N-2]
3798
+ //
3799
+ // where `N` is the number of dimensions. The subsequent dependence tests
3800
+ // assume that different subscript values result in different offset values.
3801
+ // If the above calculation wraps, this assumption is violated.
3802
+ // Note that if every element of Subscripts is positive, the situation would
3803
+ // be simple. However, the subscript for the outermost dimension
3804
+ // (Subscripts[0]) can be negative.
3805
+
3789
3806
return true ;
3790
3807
}
3791
3808
You can’t perform that action at this time.
0 commit comments