diff options
Diffstat (limited to 'omegalib/examples/old_test/x.oc-rt')
-rw-r--r-- | omegalib/examples/old_test/x.oc-rt | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/omegalib/examples/old_test/x.oc-rt b/omegalib/examples/old_test/x.oc-rt new file mode 100644 index 0000000..fc77e1a --- /dev/null +++ b/omegalib/examples/old_test/x.oc-rt @@ -0,0 +1,84 @@ +>>> old_IS:= {[i,j]: 1 <= i <= 8 & 1 <= j <= 4}; +>>> T1:={[i,j] -> [j-i+8,i,0]}; +>>> T2:={[i,j] -> [i+j-1,i,1]}; +>>> n1:= T1 \ old_IS; +>>> n1; +{[i,j] -> [j-i+8,i,0] : 1 <= i <= 8 && 1 <= j <= 4} +>>> n2:= T2 \ old_IS; +>>> n2; +{[i,j] -> [i+j-1,i,1] : 1 <= i <= 8 && 1 <= j <= 4} +>>> codegen T1:old_IS,T2:old_IS; +for(t1 = 1; t1 <= 11; t1++) { + for(t2 = max(t1-3,1); t2 <= min(t1,-t1+8); t2++) { + s2(t2,t1-t2+1); + } + for(t2 = max(-t1+9,1); t2 <= min(-t1+12,t1-4); t2++) { + s1(t2,t1+t2-8); + } + for(t2 = max(-t1+9,t1-3); t2 <= min(-t1+12,t1); t2++) { + s1(t2,t1+t2-8); + s2(t2,t1-t2+1); + } + for(t2 = max(-t1+9,t1+1); t2 <= min(-t1+12,8); t2++) { + s1(t2,t1+t2-8); + } + for(t2 = max(t1-3,-t1+13); t2 <= min(t1,8); t2++) { + s2(t2,t1-t2+1); + } +} + +>>> codegen 2 T1:old_IS,T2:old_IS; +for(t1 = 1; t1 <= 3; t1++) { + for(t2 = 1; t2 <= t1; t2++) { + s2(t2,t1-t2+1); + } + for(t2 = -t1+9; t2 <= 8; t2++) { + s1(t2,t1+t2-8); + } +} +for(t2 = 1; t2 <= 4; t2++) { + s2(t2,-t2+5); +} +for(t2 = 5; t2 <= 8; t2++) { + s1(t2,t2-4); +} +for(t2 = 2; t2 <= 3; t2++) { + s2(t2,-t2+6); +} +for(t2 = 4; t2 <= 5; t2++) { + s1(t2,t2-3); + s2(t2,-t2+6); +} +for(t2 = 6; t2 <= 7; t2++) { + s1(t2,t2-3); +} +for(t2 = 3; t2 <= 6; t2++) { + s1(t2,t2-2); + s2(t2,-t2+7); +} +for(t2 = 2; t2 <= 3; t2++) { + s1(t2,t2-1); +} +for(t2 = 4; t2 <= 5; t2++) { + s1(t2,t2-1); + s2(t2,-t2+8); +} +for(t2 = 6; t2 <= 7; t2++) { + s2(t2,-t2+8); +} +for(t2 = 1; t2 <= 4; t2++) { + s1(t2,t2); +} +for(t2 = 5; t2 <= 8; t2++) { + s2(t2,-t2+9); +} +for(t1 = 9; t1 <= 11; t1++) { + for(t2 = 1; t2 <= -t1+12; t2++) { + s1(t2,t1+t2-8); + } + for(t2 = t1-3; t2 <= 8; t2++) { + s2(t2,t1-t2+1); + } +} + + |