Skip to content

Commit

Permalink
Example fix for #11, the outer loop should NOT be outside the annotat…
Browse files Browse the repository at this point in the history
…ionbecause Orio needs to see its index variable in the body. Similar fixes should be implemented for other examples that give this error.
  • Loading branch information
brnorris03 committed Jul 14, 2015
1 parent e6ad834 commit a335d78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions orio/module/loop/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def visit(self, nodes, params={}):
try:
for node in nodes:
if not node: continue
v = CFGVertex(node.id, node)
if isinstance(node, ast.ForStmt):
self.display(node)
# Children: header: node.init, node.test, node.iter; body: node.stmt
Expand Down
5 changes: 3 additions & 2 deletions testsuite/SPAPT/lu/lu.src1.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
param U1_K[] = [1];
param U1_J[] = range(1,31);
param VEC1[] = [False,True];
Expand Down Expand Up @@ -77,12 +78,12 @@ int iii, jjj, kkk;

/*@ begin Loop (
for (k=0; k<=N-1; k++) {
transform Composite(
unrolljam = (['j'],[U1_J]),
unrolljam = (['k','j'],[U1_K,U1_J]),
scalarreplace = (SCR, 'double'),
vector = (VEC1, ['ivdep','vector always'])
)
for (k=0; k<=N-1; k++) {
for (j=k+1; j<=N-1; j++)
A[k][j] = A[k][j]/A[k][k];
Expand Down

0 comments on commit a335d78

Please sign in to comment.