Skip to content

Commit

Permalink
Minor: debug info, comments, etc.
Browse files Browse the repository at this point in the history
Minor: debug info, comments, etc.

Signed-off-by: Uday Reddy <udayreddy@gmail.com>
  • Loading branch information
bondhugula committed Apr 16, 2011
1 parent a1eb97d commit 79e8cb4
Show file tree
Hide file tree
Showing 29 changed files with 61 additions and 30 deletions.
4 changes: 2 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Uday Kumar Bondhugula (US version)
B Uday Kumar Reddy (Indian version)
Uday Bondhugula / Uday Kumar Reddy B

udayreddy@gmail.com
uday@csa.iisc.ernet.in
1 change: 1 addition & 0 deletions examples/adi/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/advect3d/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/corcol/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/covcol/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/dct/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/doitgen/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/dsyr2k/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/dsyrk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/fdtd-1d/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/fdtd-2d/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/gemver/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/jacobi-1d-imper/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/jacobi-2d-imper/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/lu/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/matmul-init/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/matmul/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/mvt/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/pca/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/seidel/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/ssymm/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/strmm/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/swim/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/tce/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/template/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
1 change: 1 addition & 0 deletions examples/tmm/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tiled
orig
par
opt
orig_par
14 changes: 9 additions & 5 deletions src/framework.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,15 +542,19 @@ static void eliminate_farkas_multipliers(PlutoConstraints *farkas_cst, int num_e
int i;
int best_elim;

/* printf("To start with: %d constraints, %d to be eliminated out of %d\n",
farkas_cst->nrows, num_elim, farkas_cst->ncols-1); */
if (options->moredebug) {
printf("To start with: %d constraints, %d to be eliminated out of %d vars\n",
farkas_cst->nrows, num_elim, farkas_cst->ncols-1);
}

for (i=0; i<num_elim; i++) {
best_elim = best_elim_candidate(farkas_cst, num_elim-i);
fourier_motzkin_eliminate(farkas_cst, best_elim);
/* printf("After elimination of %d variable: %d constraints\n",
num_elim-i, farkas_cst->nrows); */
/* constraints_print(stdout, farkas_cst); */
if (options->moredebug) {
printf("After elimination of %d variable: %d constraints\n",
num_elim-i, farkas_cst->nrows);
}
// pluto_constraints_print(stdout, farkas_cst);
}

}
Expand Down
6 changes: 4 additions & 2 deletions src/pluto.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,23 +1027,25 @@ void normalize_domains(PlutoProg *prog)
pluto_constraints_print(stdout, context );
}

#if 0
/* Add context to every dep polyhedron */
for (i=0; i<prog->ndeps; i++) {
PlutoConstraints *dpolytope = prog->deps[i].dpolytope;

for (k=0; k<context->nrows; k++) {
pluto_constraints_add_inequality(dpolytope, dpolytope->nrows);

/* already initialized to zero */
/* Already initialized to zero */

for (j=0; j<npar+1; j++){
dpolytope->val[dpolytope->nrows-1][j+dpolytope->ncols-(npar+1)] =
context->val[k][j];
}
}
/* update the reference, add_row can resize */
/* Update reference, add_row can resize */
prog->deps[i].dpolytope = dpolytope;
}
#endif
pluto_constraints_free(context);
}else{
IF_DEBUG(printf("No global context\n"));
Expand Down
42 changes: 21 additions & 21 deletions src/program.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,27 +972,27 @@ PlutoProg *scop_to_pluto_prog(scoplib_scop_p scop, PlutoOptions *options)
clan_stmt = clan_stmt->next;
}

// hack for linearized accesses
FILE *lfp = fopen(".linearized", "r");
FILE *nlfp = fopen(".nonlinearized", "r");
char tmpstr[256];
char linearized[256];
if (lfp && nlfp) {
for (i=0; i<prog->nstmts; i++) {
rewind(lfp);
rewind(nlfp);
while (!feof(lfp)) {
fgets(tmpstr, 256, nlfp);
fgets(linearized, 256, lfp);
if (strstr(tmpstr, prog->stmts[i].text)) {
prog->stmts[i].text = (char *) realloc(prog->stmts[i].text, sizeof(char)*(strlen(linearized)+1));
strcpy(prog->stmts[i].text, linearized);
}
}
}
fclose(lfp);
fclose(nlfp);
}
// hack for linearized accesses
FILE *lfp = fopen(".linearized", "r");
FILE *nlfp = fopen(".nonlinearized", "r");
char tmpstr[256];
char linearized[256];
if (lfp && nlfp) {
for (i=0; i<prog->nstmts; i++) {
rewind(lfp);
rewind(nlfp);
while (!feof(lfp) && !feof(nlfp)) {
fgets(tmpstr, 256, nlfp);
fgets(linearized, 256, lfp);
if (strstr(tmpstr, prog->stmts[i].text)) {
prog->stmts[i].text = (char *) realloc(prog->stmts[i].text, sizeof(char)*(strlen(linearized)+1));
strcpy(prog->stmts[i].text, linearized);
}
}
}
fclose(lfp);
fclose(nlfp);
}

return prog;
}
Expand Down

0 comments on commit 79e8cb4

Please sign in to comment.