diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-07-02 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-07-02 08:01:00 -0700 |
commit | 303baf27cf34c2a57db97c4c567fd744241fa14b (patch) | |
tree | d6235cca48e7bdfe5884e517058c7791e66bb806 /src/opt/fxu | |
parent | fa67e3c19e27c011517b91182eb3929412aaf402 (diff) | |
download | abc-303baf27cf34c2a57db97c4c567fd744241fa14b.tar.gz abc-303baf27cf34c2a57db97c4c567fd744241fa14b.tar.bz2 abc-303baf27cf34c2a57db97c4c567fd744241fa14b.zip |
Version abc80702
Diffstat (limited to 'src/opt/fxu')
-rw-r--r-- | src/opt/fxu/fxu.c | 10 | ||||
-rw-r--r-- | src/opt/fxu/fxuCreate.c | 8 | ||||
-rw-r--r-- | src/opt/fxu/fxuInt.h | 2 | ||||
-rw-r--r-- | src/opt/fxu/fxuPair.c | 2 | ||||
-rw-r--r-- | src/opt/fxu/fxuReduce.c | 8 | ||||
-rw-r--r-- | src/opt/fxu/fxuSingle.c | 8 |
6 files changed, 19 insertions, 19 deletions
diff --git a/src/opt/fxu/fxu.c b/src/opt/fxu/fxu.c index d11fd793..b49ef9aa 100644 --- a/src/opt/fxu/fxu.c +++ b/src/opt/fxu/fxu.c @@ -79,7 +79,7 @@ int Fxu_FastExtract( Fxu_Data_t * pData ) Weight1 = Fxu_HeapSingleReadMaxWeight( p->pHeapSingle ); if ( pData->fVerbose ) printf( "Div %5d : Best single = %5d.\r", Counter++, Weight1 ); - if ( Weight1 > 0 || Weight1 == 0 && pData->fUse0 ) + if ( Weight1 > 0 || (Weight1 == 0 && pData->fUse0) ) Fxu_UpdateSingle( p ); else break; @@ -94,7 +94,7 @@ int Fxu_FastExtract( Fxu_Data_t * pData ) Weight2 = Fxu_HeapDoubleReadMaxWeight( p->pHeapDouble ); if ( pData->fVerbose ) printf( "Div %5d : Best double = %5d.\r", Counter++, Weight2 ); - if ( Weight2 > 0 || Weight2 == 0 && pData->fUse0 ) + if ( Weight2 > 0 || (Weight2 == 0 && pData->fUse0) ) Fxu_UpdateDouble( p ); else break; @@ -115,14 +115,14 @@ int Fxu_FastExtract( Fxu_Data_t * pData ) if ( Weight1 >= Weight2 ) { - if ( Weight1 > 0 || Weight1 == 0 && pData->fUse0 ) + if ( Weight1 > 0 || (Weight1 == 0 && pData->fUse0) ) Fxu_UpdateSingle( p ); else break; } else { - if ( Weight2 > 0 || Weight2 == 0 && pData->fUse0 ) + if ( Weight2 > 0 || (Weight2 == 0 && pData->fUse0) ) Fxu_UpdateDouble( p ); else break; @@ -144,7 +144,7 @@ int Fxu_FastExtract( Fxu_Data_t * pData ) printf( "Div %5d : Best double = %5d. Best single = %5d. Best complement = %5d.\r", Counter++, Weight2, Weight1, Weight3 ); - if ( Weight3 > 0 || Weight3 == 0 && pData->fUse0 ) + if ( Weight3 > 0 || (Weight3 == 0 && pData->fUse0) ) Fxu_Update( p, pSingle, pDouble ); else break; diff --git a/src/opt/fxu/fxuCreate.c b/src/opt/fxu/fxuCreate.c index 55026b27..21dfd419 100644 --- a/src/opt/fxu/fxuCreate.c +++ b/src/opt/fxu/fxuCreate.c @@ -71,7 +71,7 @@ Fxu_Matrix * Fxu_CreateMatrix( Fxu_Data_t * pData ) nPairsStore = 0; nBitsMax = -1; for ( i = 0; i < pData->nNodesOld; i++ ) - if ( pSopCover = pData->vSops->pArray[i] ) + if ( (pSopCover = pData->vSops->pArray[i]) ) { nCubes = Abc_SopGetCubeNum( pSopCover ); nFanins = Abc_SopGetVarNum( pSopCover ); @@ -109,7 +109,7 @@ Fxu_Matrix * Fxu_CreateMatrix( Fxu_Data_t * pData ) iCube = 0; iPair = 0; for ( i = 0; i < pData->nNodesOld; i++ ) - if ( pSopCover = pData->vSops->pArray[i] ) + if ( (pSopCover = pData->vSops->pArray[i]) ) { // get the number of cubes nCubes = Abc_SopGetCubeNum( pSopCover ); @@ -136,7 +136,7 @@ Fxu_Matrix * Fxu_CreateMatrix( Fxu_Data_t * pData ) pOrder = ALLOC( int, nBitsMax ); // create the rows for ( i = 0; i < pData->nNodesOld; i++ ) - if ( pSopCover = pData->vSops->pArray[i] ) + if ( (pSopCover = pData->vSops->pArray[i]) ) { // get the new var in the matrix pVar = p->ppVars[2*i+1]; @@ -272,7 +272,7 @@ void Fxu_CreateCovers( Fxu_Matrix * p, Fxu_Data_t * pData ) // go through the internal nodes for ( n = 0; n < pData->nNodesOld; n++ ) - if ( pSopCover = pData->vSops->pArray[n] ) + if ( (pSopCover = pData->vSops->pArray[n]) ) { // get the number of this node iNode = n; diff --git a/src/opt/fxu/fxuInt.h b/src/opt/fxu/fxuInt.h index ea85cb79..4e3d72eb 100644 --- a/src/opt/fxu/fxuInt.h +++ b/src/opt/fxu/fxuInt.h @@ -365,7 +365,7 @@ struct FxuSingle // 7 words #define Fxu_CubeForEachPair( pCube, pPair, i )\ for ( i = 0;\ i < pCube->pVar->nCubes &&\ - (((unsigned)(pPair = pCube->pVar->ppPairs[pCube->iCube][i])) >= 0);\ + (((unsigned)(PORT_PTRUINT_T)(pPair = pCube->pVar->ppPairs[pCube->iCube][i])) >= 0);\ i++ )\ if ( pPair ) diff --git a/src/opt/fxu/fxuPair.c b/src/opt/fxu/fxuPair.c index 3c031ce8..87645cc7 100644 --- a/src/opt/fxu/fxuPair.c +++ b/src/opt/fxu/fxuPair.c @@ -24,7 +24,7 @@ #define MAX_PRIMES 304 -static s_Primes[MAX_PRIMES] = +static int s_Primes[MAX_PRIMES] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, diff --git a/src/opt/fxu/fxuReduce.c b/src/opt/fxu/fxuReduce.c index 0ab8a157..38032bfa 100644 --- a/src/opt/fxu/fxuReduce.c +++ b/src/opt/fxu/fxuReduce.c @@ -55,9 +55,9 @@ int Fxu_PreprocessCubePairs( Fxu_Matrix * p, Vec_Ptr_t * vCovers, int nPairsTota Fxu_Cube * pCube1, * pCube2; Fxu_Var * pVar; int nCubes, nBitsMax, nSum; - int CutOffNum, CutOffQuant; + int CutOffNum = -1, CutOffQuant = -1; // Suppress "might be used uninitialized" int iPair, iQuant, k, c; - int clk = clock(); +// int clk = clock(); char * pSopCover; int nFanins; @@ -69,7 +69,7 @@ int Fxu_PreprocessCubePairs( Fxu_Matrix * p, Vec_Ptr_t * vCovers, int nPairsTota iPair = 0; nBitsMax = -1; for ( c = 0; c < vCovers->nSize; c++ ) - if ( pSopCover = vCovers->pArray[c] ) + if ( (pSopCover = vCovers->pArray[c]) ) { nFanins = Abc_SopGetVarNum(pSopCover); // precompute the differences @@ -135,7 +135,7 @@ int Fxu_PreprocessCubePairs( Fxu_Matrix * p, Vec_Ptr_t * vCovers, int nPairsTota // collect the corresponding pairs and add the divisors iPair = 0; for ( c = 0; c < vCovers->nSize; c++ ) - if ( pSopCover = vCovers->pArray[c] ) + if ( (pSopCover = vCovers->pArray[c]) ) { // get the var pVar = p->ppVars[2*c+1]; diff --git a/src/opt/fxu/fxuSingle.c b/src/opt/fxu/fxuSingle.c index 73d9a76c..d2e3607c 100644 --- a/src/opt/fxu/fxuSingle.c +++ b/src/opt/fxu/fxuSingle.c @@ -63,7 +63,7 @@ void Fxu_MatrixComputeSingles( Fxu_Matrix * p, int fUse0, int nSingleMax ) memset( pWeigtCounts, 0, sizeof(int) * 1000 ); for ( i = 2; i < Vec_PtrSize(vSingles); i += 3 ) { - Weight = (int)Vec_PtrEntry(vSingles, i); + Weight = (int)(PORT_PTRUINT_T)Vec_PtrEntry(vSingles, i); if ( Weight >= 999 ) pWeigtCounts[999]++; else @@ -82,7 +82,7 @@ void Fxu_MatrixComputeSingles( Fxu_Matrix * p, int fUse0, int nSingleMax ) k = 0; for ( i = 2; i < Vec_PtrSize(vSingles); i += 3 ) { - Weight = (int)Vec_PtrEntry(vSingles, i); + Weight = (int)(PORT_PTRUINT_T)Vec_PtrEntry(vSingles, i); if ( Weight < c ) continue; Vec_PtrWriteEntry( vSingles, k++, Vec_PtrEntry(vSingles, i-2) ); @@ -102,7 +102,7 @@ void Fxu_MatrixComputeSingles( Fxu_Matrix * p, int fUse0, int nSingleMax ) Fxu_MatrixAddSingle( p, Vec_PtrEntry(vSingles,i), Vec_PtrEntry(vSingles,i+1), - (int)Vec_PtrEntry(vSingles,i+2) ); + (int)(PORT_PTRUINT_T)Vec_PtrEntry(vSingles,i+2) ); } Vec_PtrFree( vSingles ); } @@ -159,7 +159,7 @@ void Fxu_MatrixComputeSinglesOneCollect( Fxu_Matrix * p, Fxu_Var * pVar, Vec_Ptr { Vec_PtrPush( vSingles, pVar2 ); Vec_PtrPush( vSingles, pVar ); - Vec_PtrPush( vSingles, (void *)WeightCur ); + Vec_PtrPush( vSingles, (void *)(PORT_PTRUINT_T)WeightCur ); } } |