petabricks/petabricks — Issue #25: Bitonicsort.pbcc should not be compiled
Author: yod
Created: 2011-12-16 18:36:50+00:00
State: open

The output of the rule could not be aliased.

transform BitonicInner
from INC, DIR
to OUT[n]
{
to(OUT.cell(i) ele, OUT out) from(INC inc, DIR dir) {
int j = i ^ (int) inc;
if(i < j) {
bool decend = i & (int) dir;
if(decend ^ (out.cell(i) > out.cell(j))) {
ElementT temp = out.cell(j);
out.cell(j) = out.cell(i);
out.cell(i) = temp;
}
}
}
}