From e4b20015a4ee35f1279af4caa983478fa2ff0d4a Mon Sep 17 00:00:00 2001 From: dhuth Date: Mon, 6 Oct 2014 11:56:47 -0600 Subject: Added omega to source --- omega/examples/old_test/olda.oc-rt | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 omega/examples/old_test/olda.oc-rt (limited to 'omega/examples/old_test/olda.oc-rt') 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); + } + } +} + + -- cgit v1.2.3-70-g09d2