diff options
Diffstat (limited to 'src/phys/place')
-rw-r--r-- | src/phys/place/place_bin.c | 6 | ||||
-rw-r--r-- | src/phys/place/place_partition.c | 26 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/phys/place/place_bin.c b/src/phys/place/place_bin.c index 92b283cc..01bcf461 100644 --- a/src/phys/place/place_bin.c +++ b/src/phys/place/place_bin.c @@ -82,7 +82,7 @@ void spreadDensityX(int numBins, float maxMovement) { } // spread X - qsort(allCells, moveableCells, sizeof(ConcreteCell*), cellSortByY); + qsort(allCells, (size_t)moveableCells, sizeof(ConcreteCell*), cellSortByY); y = 0; @@ -96,7 +96,7 @@ void spreadDensityX(int numBins, float maxMovement) { // have we filled up a y-bin? if (yCumArea >= totalArea*(y+1)/numBins && yBinArea > 0) { memcpy(binCells, &(allCells[yBinStart]), sizeof(ConcreteCell*)*yBinCount); - qsort(binCells, yBinCount, sizeof(ConcreteCell*), cellSortByX); + qsort(binCells, (size_t)yBinCount, sizeof(ConcreteCell*), cellSortByX); #if defined(DEBUG) printf("y-bin %d count=%d area=%f\n",y,yBinCount, yBinArea); @@ -217,7 +217,7 @@ void spreadDensityY(int numBins, float maxMovement) { // have we filled up an x-bin? if (xCumArea >= totalArea*(x+1)/numBins && xBinArea > 0) { memcpy(binCells, &(allCells[xBinStart]), sizeof(ConcreteCell*)*xBinCount); - qsort(binCells, xBinCount, sizeof(ConcreteCell*), cellSortByY); + qsort(binCells, (size_t)xBinCount, sizeof(ConcreteCell*), cellSortByY); // printf("x-bin %d count=%d area=%f\n",y,yBinCount, yBinArea); diff --git a/src/phys/place/place_partition.c b/src/phys/place/place_partition.c index eeef7037..477364df 100644 --- a/src/phys/place/place_partition.c +++ b/src/phys/place/place_partition.c @@ -107,14 +107,14 @@ void presortNets() { allNetsR2 = (ConcreteNet**)realloc(allNetsR2, sizeof(ConcreteNet*)*g_place_numNets); allNetsB2 = (ConcreteNet**)realloc(allNetsB2, sizeof(ConcreteNet*)*g_place_numNets); allNetsT2 = (ConcreteNet**)realloc(allNetsT2, sizeof(ConcreteNet*)*g_place_numNets); - memcpy(allNetsL2, g_place_concreteNets, sizeof(ConcreteNet*)*g_place_numNets); - memcpy(allNetsR2, g_place_concreteNets, sizeof(ConcreteNet*)*g_place_numNets); - memcpy(allNetsB2, g_place_concreteNets, sizeof(ConcreteNet*)*g_place_numNets); - memcpy(allNetsT2, g_place_concreteNets, sizeof(ConcreteNet*)*g_place_numNets); - qsort(allNetsL2, g_place_numNets, sizeof(ConcreteNet*), netSortByL); - qsort(allNetsR2, g_place_numNets, sizeof(ConcreteNet*), netSortByR); - qsort(allNetsB2, g_place_numNets, sizeof(ConcreteNet*), netSortByB); - qsort(allNetsT2, g_place_numNets, sizeof(ConcreteNet*), netSortByT); + memcpy(allNetsL2, (size_t)g_place_concreteNets, sizeof(ConcreteNet*)*g_place_numNets); + memcpy(allNetsR2, (size_t)g_place_concreteNets, sizeof(ConcreteNet*)*g_place_numNets); + memcpy(allNetsB2, (size_t)g_place_concreteNets, sizeof(ConcreteNet*)*g_place_numNets); + memcpy(allNetsT2, (size_t)g_place_concreteNets, sizeof(ConcreteNet*)*g_place_numNets); + qsort(allNetsL2, (size_t)g_place_numNets, sizeof(ConcreteNet*), netSortByL); + qsort(allNetsR2, (size_t)g_place_numNets, sizeof(ConcreteNet*), netSortByR); + qsort(allNetsB2, (size_t)g_place_numNets, sizeof(ConcreteNet*), netSortByB); + qsort(allNetsT2, (size_t)g_place_numNets, sizeof(ConcreteNet*), netSortByT); } // -------------------------------------------------------------------- @@ -838,10 +838,10 @@ void partitionEqualArea(Partition *parent) { // which way to sort? if (parent->m_vertical) // sort by X position - qsort(parent->m_members, parent->m_numMembers, sizeof(ConcreteCell*), cellSortByX); + qsort(parent->m_members, (size_t)parent->m_numMembers, sizeof(ConcreteCell*), cellSortByX); else // sort by Y position - qsort(parent->m_members, parent->m_numMembers, sizeof(ConcreteCell*), cellSortByY); + qsort(parent->m_members, (size_t)parent->m_numMembers, sizeof(ConcreteCell*), cellSortByY); // split the list halfArea = parent->m_area*0.5; @@ -1109,9 +1109,9 @@ void incrementalPartition() { assert(g_place_rootPartition); // update cell list of root partition - memcpy(allCells, g_place_concreteCells, sizeof(ConcreteCell*)*g_place_numCells); - qsort(allCells, g_place_numCells, sizeof(ConcreteCell*), cellSortByID); - qsort(g_place_rootPartition->m_members, g_place_rootPartition->m_numMembers, + memcpy(allCells, (size_t)g_place_concreteCells, sizeof(ConcreteCell*)*g_place_numCells); + qsort(allCells, (size_t)g_place_numCells, sizeof(ConcreteCell*), cellSortByID); + qsort(g_place_rootPartition->m_members, (size_t)g_place_rootPartition->m_numMembers, sizeof(ConcreteCell*), cellSortByID); // scan sorted lists and collect cells not in partitions |