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/ge.oc-rt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 omega/examples/old_test/ge.oc-rt (limited to 'omega/examples/old_test/ge.oc-rt') diff --git a/omega/examples/old_test/ge.oc-rt b/omega/examples/old_test/ge.oc-rt new file mode 100644 index 0000000..1006fe5 --- /dev/null +++ b/omega/examples/old_test/ge.oc-rt @@ -0,0 +1,38 @@ +>>> symbolic n; +>>> I1 := {[k,i] : 1 <= k < i <= n }; +>>> I2 := {[k,i,j] : 1 <= k < i,j <= n }; +>>> T1 := {[k,i] -> [i,k,1,0]}; +>>> T2 := {[k,i,j] -> [i,j,0,k]}; +>>> T1(I1); +{[i,k,1,0]: 1 <= k < i <= n} +>>> T2(I2); +{[i,j,0,k]: 1 <= k < i,j <= n} +>>> codegen T1:I1,T2:I2; +for(t1 = 2; t1 <= n; t1++) { + for(t2 = 1; t2 <= n; t2++) { + for(t4 = 1; t4 <= min(t1-1,t2-1); t4++) { + s2(t4,t1,t2); + } + if (t2 <= t1-1) { + s1(t2,t1); + } + } +} + +>>> codegen 2 T1:I1,T2:I2; +for(t1 = 2; t1 <= n; t1++) { + s1(1,t1); + for(t2 = 2; t2 <= t1-1; t2++) { + for(t4 = 1; t4 <= t2-1; t4++) { + s2(t4,t1,t2); + } + s1(t2,t1); + } + for(t2 = t1; t2 <= n; t2++) { + for(t4 = 1; t4 <= t1-1; t4++) { + s2(t4,t1,t2); + } + } +} + + -- cgit v1.2.3-70-g09d2