Skip to content

Commit

Permalink
Do not approximate pcost = vl * child->pcost unless child is guaranteed
Browse files Browse the repository at this point in the history
not to be a simple codelet.
  • Loading branch information
matteo-frigo committed Mar 12, 2005
1 parent a5282a5 commit 5569655
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions dft/vrank-geq1.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
*/

/* $Id: vrank-geq1.c,v 1.42 2005-03-06 01:09:25 athena Exp $ */
/* $Id: vrank-geq1.c,v 1.43 2005-03-12 20:03:45 athena Exp $ */


/* Plans for handling vector transform loops. These are *just* the
Expand Down Expand Up @@ -186,7 +186,9 @@ static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
X(ops_zero)(&pln->super.super.ops);
pln->super.super.ops.other = 3.14159; /* magic to prefer codelet loops */
X(ops_madd2)(pln->vl, &cld->ops, &pln->super.super.ops);
pln->super.super.pcost = pln->vl * cld->pcost;

if (p->sz->rnk != 1 || (p->sz->dims[0].n > 64))
pln->super.super.pcost = pln->vl * cld->pcost;

return &(pln->super.super);
}
Expand Down
6 changes: 4 additions & 2 deletions rdft/vrank-geq1-rdft2.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
*/

/* $Id: vrank-geq1-rdft2.c,v 1.34 2003-04-15 19:03:20 stevenj Exp $ */
/* $Id: vrank-geq1-rdft2.c,v 1.35 2005-03-12 20:03:47 athena Exp $ */


/* Plans for handling vector transform loops. These are *just* the
Expand Down Expand Up @@ -191,7 +191,9 @@ static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
X(ops_zero)(&pln->super.super.ops);
pln->super.super.ops.other = 3.14159; /* magic to prefer codelet loops */
X(ops_madd2)(pln->vl, &cld->ops, &pln->super.super.ops);
pln->super.super.pcost = pln->vl * cld->pcost;

if (p->sz->rnk != 1 || (p->sz->dims[0].n > 128))
pln->super.super.pcost = pln->vl * cld->pcost;

return &(pln->super.super);
}
Expand Down
6 changes: 4 additions & 2 deletions rdft/vrank-geq1.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
*/

/* $Id: vrank-geq1.c,v 1.31 2005-03-06 01:09:25 athena Exp $ */
/* $Id: vrank-geq1.c,v 1.32 2005-03-12 20:03:47 athena Exp $ */


/* Plans for handling vector transform loops. These are *just* the
Expand Down Expand Up @@ -191,7 +191,9 @@ static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
X(ops_zero)(&pln->super.super.ops);
pln->super.super.ops.other = 3.14159; /* magic to prefer codelet loops */
X(ops_madd2)(pln->vl, &cld->ops, &pln->super.super.ops);
pln->super.super.pcost = pln->vl * cld->pcost;

if (p->sz->rnk != 1 || (p->sz->dims[0].n > 128))
pln->super.super.pcost = pln->vl * cld->pcost;

return &(pln->super.super);
}
Expand Down

0 comments on commit 5569655

Please sign in to comment.