* ./metis:

- New: In computeQuadriPartitions, throw an exception when the size of the
        first quadri-partition is already under the critical size.
This commit is contained in:
Jean-Paul Chaput 2010-06-22 20:51:02 +00:00
parent c824b088be
commit 11499eb6ed
1 changed files with 7 additions and 2 deletions

View File

@ -285,7 +285,12 @@ namespace Metis {
ysplits = ((int)(trunc ( (1.0/aspectRatio)+0.5 ) )) * 2;
}
int partitionSizeStop = Cfg::getParamInt("metis.numberOfInstancesStopCriterion",45)->asInt();
size_t partitionSizeStop = Cfg::getParamInt("metis.numberOfInstancesStopCriterion",45)->asInt();
if ( gates / (xsplits*ysplits) < partitionSizeStop )
throw Error("Design &lt;%s&gt; is too small to be quadri-partionned, only %d gates."
,getString(cell->getName()).c_str(),gates);
double quadPartitions = log((double)gates / (double)(partitionSizeStop*xsplits*ysplits) ) / log(4.0) + 1.0;
return (unsigned int)(quadPartitions);