diff options
Diffstat (limited to 'omega/examples/old_test/olda.oc-rt')
-rw-r--r-- | omega/examples/old_test/olda.oc-rt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/omega/examples/old_test/olda.oc-rt b/omega/examples/old_test/olda.oc-rt new file mode 100644 index 0000000..52e3406 --- /dev/null +++ b/omega/examples/old_test/olda.oc-rt @@ -0,0 +1,52 @@ +>>> T10:={[mp,mq,mi] -> [mi,mq,mp,0]}; +>>> T20:={[mp,mq,mi] -> [mi,mp,mq,1]}; +>>> +>>> Symbolic np,morb; +>>> IS10 := {[mp,mq,mi]: 1 <= mp <= np && 1 <= mq <= mp && 1 <= mi <= morb}; +>>> IS20 := IS10; +>>> +>>> codegen T10:IS10,T20:IS20; +if (np >= 1) { + for(t1 = 1; t1 <= morb; t1++) { + for(t2 = 1; t2 <= np; t2++) { + for(t3 = 1; t3 <= t2-1; t3++) { + s2(t2,t3,t1); + } + s1(t2,t2,t1); + s2(t2,t2,t1); + for(t3 = t2+1; t3 <= np; t3++) { + s1(t3,t2,t1); + } + } + } +} + +>>> codegen 2 T10:IS10,T20:IS20; +if (np >= 1) { + for(t1 = 1; t1 <= morb; t1++) { + s1(1,1,t1); + s2(1,1,t1); + for(t3 = 2; t3 <= np; t3++) { + s1(t3,1,t1); + } + for(t2 = 2; t2 <= np-1; t2++) { + for(t3 = 1; t3 <= t2-1; t3++) { + s2(t2,t3,t1); + } + s1(t2,t2,t1); + s2(t2,t2,t1); + for(t3 = t2+1; t3 <= np; t3++) { + s1(t3,t2,t1); + } + } + for(t3 = 1; t3 <= np-1; t3++) { + s2(np,t3,t1); + } + if (np >= 2) { + s1(np,np,t1); + s2(np,np,t1); + } + } +} + + |