diff options
author | Derick Huth <derickhuth@gmail.com> | 2014-10-06 12:42:34 -0600 |
---|---|---|
committer | Derick Huth <derickhuth@gmail.com> | 2014-10-06 12:42:34 -0600 |
commit | 8d73c8fcc75556c1df71dd39dd99783f8f86fc3e (patch) | |
tree | 157d627863d76a4c256a27cae27ce2e8566c7ea0 /omega/examples/floor_bound | |
parent | e87b55ad69f0ac6211daae741b32c8ee9dcbe470 (diff) | |
parent | 8c646f24570079eac53e58fcf42d0d4fbc437ee3 (diff) | |
download | chill-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/floor_bound')
-rw-r--r-- | omega/examples/floor_bound | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/omega/examples/floor_bound b/omega/examples/floor_bound new file mode 100644 index 0000000..3cb0d57 --- /dev/null +++ b/omega/examples/floor_bound @@ -0,0 +1,46 @@ +# +# Test floor/ceiling variable definitions in loop bounds +# Notes: +# intFloor, intCeil are strict mathematical definition, +# intMod(a,b) always has input b>0 and returns [0,b). +# + +symbolic m, n; + +# loop is strided +# +is := {[i]: exists (alpha: i = 4alpha && m <= 3i <= n)}; +codegen is; + +# only one single floor/ceiling variable in bound +# +is := {[i]: exists (lb: m-4 < 4*lb <= m && lb <= i <= n)}; +codegen is; + +# the floor/ceiling variable in bound has coefficient +# +is := {[i]: exists (lb: m-4 < 4*lb <= m && 4*lb <= i <= n)}; +codegen is; + +# mutiple floor/ceiling variables in bound +# +is := {[i]:exists (alpha,beta: m-4<4alpha<=m && m-3<3beta<=m && + 4alpha+3*beta<=i<=n )}; +codegen is; + +# non-tight floor/ceiling definition +# +is := {[i]: exists (ub: n-2 < 3*ub <= n && m <= i <= 5*ub)}; +codegen is; + +# chain floor/ceiling definitions +# +is := {[i]: exists (alpha, beta: beta-4<4alpha<=beta && + m-8<8beta<=m && 4alpha<=i<=n )}; +codegen is; + +# one complicated case +# +is := {[i]: exists (alpha, beta: beta-4<4alpha<=beta && + m-7<8beta<=m && 4alpha<=i<=n )}; +codegen is; |