diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-17 03:22:53 +0000 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-17 03:22:53 +0000 |
commit | 75ff98e4d65862ff5b36b533b4f6e3ea71ede1d5 (patch) | |
tree | 498ac06b4cf78568b807fafd2619856afff69c28 /omegalib/examples/old_test/olda.oc-rt | |
parent | 29efa7b1a0d089e02a70f73f348f11878955287c (diff) | |
download | chill-75ff98e4d65862ff5b36b533b4f6e3ea71ede1d5.tar.gz chill-75ff98e4d65862ff5b36b533b4f6e3ea71ede1d5.tar.bz2 chill-75ff98e4d65862ff5b36b533b4f6e3ea71ede1d5.zip |
cmake build
Diffstat (limited to 'omegalib/examples/old_test/olda.oc-rt')
-rw-r--r-- | omegalib/examples/old_test/olda.oc-rt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/omegalib/examples/old_test/olda.oc-rt b/omegalib/examples/old_test/olda.oc-rt new file mode 100644 index 0000000..52e3406 --- /dev/null +++ b/omegalib/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); + } + } +} + + |