ISCC Online Demonstrator
Barvinok documentation
ISL documentation
Barvinok sources
Reset
Execute
Input
ISCC script
### Example code (analysed by pet) # void polynomial_product(int n, int *A, int *B, int *C) { # for(int k = 0; k < 2*n-1; k++) # S: C[k] = 0; # for(int i = 0; i < n; i++) # for(int j = 0; j < n; j++) # T: C[i+j] += A[i] * B[j]; # } Domain := [n] -> { S[k] : k <= -2 + 2n and k >= 0; T[i, j] : i >= 0 and i <= -1 + n and j <= -1 + n and j >= 0; }; Read := [n] -> { T[i, j] -> C[i + j]; T[i, j] -> B[j]; T[i, j] -> A[i]; } * Domain; Write := [n] -> { S[k] -> C[k]; T[i, j] -> C[i + j]; } * Domain; Schedule := [n] -> { T[i, j] -> [1, i, j]; S[k] -> [0, k, 0]; }; print "Schedule"; print Schedule; ### Happens-Before relation without syntactic sugar # Lexico := { [i0,i1,i2] -> [o0,o1,o2] : i0 < o0 or i0 = o0 and i1 < o1 or i0 = o0 and i1 = o1 and i2 < o2 }; # Before := Schedule . Lexico . (Schedule^-1) Before := Schedule << Schedule; print "Before"; print Before; RaW := (Write . (Read^-1)) * Before; WaW := (Write . (Write^-1)) * Before; WaR := (Read . (Write^-1)) * Before; print "RaW deps"; print RaW; print "WaW deps"; print WaW; print "WaR deps"; print WaR; IslSchedule := schedule Domain respecting (RaW+WaW+WaR) minimizing RaW; IslSchedule := IslSchedule + {}; # flatten the schedule tree print "IslSchedule"; print IslSchedule; IslBefore := IslSchedule << IslSchedule; print "IslBefore"; print IslBefore; print "Does IslSchedule respects RaW deps?"; print RaW <= IslBefore; print "Does IslSchedule respects WaW deps?"; print WaW <= IslBefore; print "Does IslSchedule respects WaR deps?"; print WaR <= IslBefore; print "Codegen"; codegen (IslSchedule * Domain);
Output format
isl
omega
polylib
ext-polylib
latex
C
Indent output (experimental)