summaryrefslogtreecommitdiff
path: root/omega/examples/old_test/olda.oc-rt
diff options
context:
space:
mode:
authorDerick Huth <derickhuth@gmail.com>2014-10-06 12:42:34 -0600
committerDerick Huth <derickhuth@gmail.com>2014-10-06 12:42:34 -0600
commit8d73c8fcc75556c1df71dd39dd99783f8f86fc3e (patch)
tree157d627863d76a4c256a27cae27ce2e8566c7ea0 /omega/examples/old_test/olda.oc-rt
parente87b55ad69f0ac6211daae741b32c8ee9dcbe470 (diff)
parent8c646f24570079eac53e58fcf42d0d4fbc437ee3 (diff)
downloadchill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.tar.gz
chill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.tar.bz2
chill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.zip
Merge pull request #2 from dhuth/master
Moved omega into chill.
Diffstat (limited to 'omega/examples/old_test/olda.oc-rt')
-rw-r--r--omega/examples/old_test/olda.oc-rt52
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);
+ }
+ }
+}
+
+