diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-20 15:56:14 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-20 15:56:14 -0600 |
commit | 6983c09937baac3ffb7d3a45c3c5009c0eba7e6c (patch) | |
tree | b42f0f9383b40fbeb540bf51b9f11eaf6f80c990 /src/loop_unroll.cc | |
parent | b829868dfd6cbe9da07227220856b975f33e2037 (diff) | |
download | chill-6983c09937baac3ffb7d3a45c3c5009c0eba7e6c.tar.gz chill-6983c09937baac3ffb7d3a45c3c5009c0eba7e6c.tar.bz2 chill-6983c09937baac3ffb7d3a45c3c5009c0eba7e6c.zip |
python loop & more doc
Diffstat (limited to 'src/loop_unroll.cc')
-rw-r--r-- | src/loop_unroll.cc | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/loop_unroll.cc b/src/loop_unroll.cc index 9bc6acf..911d900 100644 --- a/src/loop_unroll.cc +++ b/src/loop_unroll.cc @@ -20,7 +20,6 @@ std::set<int> Loop::unroll(int stmt_num, int level, int unroll_amount, std::vector<std::vector<std::string> > idxNames, int cleanup_split_level) { // check for sanity of parameters - // check for sanity of parameters if (unroll_amount < 0) throw std::invalid_argument( "invalid unroll amount " + to_string(unroll_amount)); @@ -71,16 +70,6 @@ std::set<int> Loop::unroll(int stmt_num, int level, int unroll_amount, } dim2 = stmt[*i].loop_level[dim2].payload; - /*if (dv.isCarried(dim2) - && (dv.hasNegative(dim2) && !dv.quasi)) - throw loop_error( - "loop error: Unrolling is illegal, dependence violation!"); - - if (dv.isCarried(dim2) - && (dv.hasPositive(dim2) && dv.quasi)) - throw loop_error( - "loop error: Unrolling is illegal, dependence violation!"); - */ bool safe = false; if (dv.isCarried(dim2) && dv.hasPositive(dim2)) { @@ -89,20 +78,11 @@ std::set<int> Loop::unroll(int stmt_num, int level, int unroll_amount, "loop error: a quasi dependence with a positive carried distance"); if (!dv.quasi) { if (dv.lbounds[dim2] != posInfinity) { - //if (dv.lbounds[dim2] != negInfinity) if (dv.lbounds[dim2] > unroll_amount) safe = true; } else safe = true; - }/* else { - if (dv.ubounds[dim2] != negInfinity) { - if (dv.ubounds[dim2] != posInfinity) - if ((-(dv.ubounds[dim2])) > unroll_amount) - safe = true; - } else - safe = true; - }*/ - + } if (!safe) { for (int l = level + 1; l <= (n - 1) / 2; l++) { int dim3 = l - 1; |