diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
commit | 0871bffae307e0553e0c5186336189e8b55cf6a6 (patch) | |
tree | 4571d1563fe33a53a57fea1c35fb668b9d33265f /src/aig/csw | |
parent | f936cc0680c98ffe51b3a1716c996072d5dbf76c (diff) | |
download | abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2 abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip |
Version abc90215
Diffstat (limited to 'src/aig/csw')
-rw-r--r-- | src/aig/csw/csw.h | 8 | ||||
-rw-r--r-- | src/aig/csw/cswCut.c | 2 | ||||
-rw-r--r-- | src/aig/csw/cswInt.h | 8 | ||||
-rw-r--r-- | src/aig/csw/cswMan.c | 32 |
4 files changed, 25 insertions, 25 deletions
diff --git a/src/aig/csw/csw.h b/src/aig/csw/csw.h index 1443f4d9..3d704d5f 100644 --- a/src/aig/csw/csw.h +++ b/src/aig/csw/csw.h @@ -21,10 +21,6 @@ #ifndef __CSW_H__ #define __CSW_H__ -#ifdef __cplusplus -extern "C" { -#endif - //////////////////////////////////////////////////////////////////////// /// INCLUDES /// //////////////////////////////////////////////////////////////////////// @@ -33,6 +29,10 @@ extern "C" { /// PARAMETERS /// //////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +extern "C" { +#endif + //////////////////////////////////////////////////////////////////////// /// BASIC TYPES /// //////////////////////////////////////////////////////////////////////// diff --git a/src/aig/csw/cswCut.c b/src/aig/csw/cswCut.c index a3d9b04e..14cc3e4c 100644 --- a/src/aig/csw/cswCut.c +++ b/src/aig/csw/cswCut.c @@ -78,7 +78,7 @@ static inline float Csw_CutFindCost2( Csw_Man_t * p, Csw_Cut_t * pCut ) /**Function************************************************************* - Synopsis [Returns the next free cut to use.] + Synopsis [Returns the next ABC_FREE cut to use.] Description [] diff --git a/src/aig/csw/cswInt.h b/src/aig/csw/cswInt.h index 37efe9b4..76c673a3 100644 --- a/src/aig/csw/cswInt.h +++ b/src/aig/csw/cswInt.h @@ -21,10 +21,6 @@ #ifndef __CSW_INT_H__ #define __CSW_INT_H__ -#ifdef __cplusplus -extern "C" { -#endif - //////////////////////////////////////////////////////////////////////// /// INCLUDES /// //////////////////////////////////////////////////////////////////////// @@ -44,6 +40,10 @@ extern "C" { /// PARAMETERS /// //////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +extern "C" { +#endif + //////////////////////////////////////////////////////////////////////// /// BASIC TYPES /// //////////////////////////////////////////////////////////////////////// diff --git a/src/aig/csw/cswMan.c b/src/aig/csw/cswMan.c index c3061dee..4225402c 100644 --- a/src/aig/csw/cswMan.c +++ b/src/aig/csw/cswMan.c @@ -47,7 +47,7 @@ Csw_Man_t * Csw_ManStart( Aig_Man_t * pMan, int nCutsMax, int nLeafMax, int fVer assert( nCutsMax >= 2 ); assert( nLeafMax <= 16 ); // allocate the fraiging manager - p = ALLOC( Csw_Man_t, 1 ); + p = ABC_ALLOC( Csw_Man_t, 1 ); memset( p, 0, sizeof(Csw_Man_t) ); p->nCutsMax = nCutsMax; p->nLeafMax = nLeafMax; @@ -57,9 +57,9 @@ Csw_Man_t * Csw_ManStart( Aig_Man_t * pMan, int nCutsMax, int nLeafMax, int fVer p->pManRes = Aig_ManStartFrom( pMan ); assert( Aig_ManPiNum(p->pManAig) == Aig_ManPiNum(p->pManRes) ); // allocate room for cuts and equivalent nodes - p->pnRefs = ALLOC( int, Aig_ManObjNumMax(pMan) ); - p->pEquiv = ALLOC( Aig_Obj_t *, Aig_ManObjNumMax(pMan) ); - p->pCuts = ALLOC( Csw_Cut_t *, Aig_ManObjNumMax(pMan) ); + p->pnRefs = ABC_ALLOC( int, Aig_ManObjNumMax(pMan) ); + p->pEquiv = ABC_ALLOC( Aig_Obj_t *, Aig_ManObjNumMax(pMan) ); + p->pCuts = ABC_ALLOC( Csw_Cut_t *, Aig_ManObjNumMax(pMan) ); memset( p->pCuts, 0, sizeof(Aig_Obj_t *) * Aig_ManObjNumMax(pMan) ); memset( p->pnRefs, 0, sizeof(int) * Aig_ManObjNumMax(pMan) ); // allocate memory manager @@ -68,14 +68,14 @@ Csw_Man_t * Csw_ManStart( Aig_Man_t * pMan, int nCutsMax, int nLeafMax, int fVer p->pMemCuts = Aig_MmFixedStart( p->nCutSize * p->nCutsMax, 512 ); // allocate hash table for cuts p->nTableSize = Aig_PrimeCudd( Aig_ManNodeNum(pMan) * p->nCutsMax / 2 ); - p->pTable = ALLOC( Csw_Cut_t *, p->nTableSize ); + p->pTable = ABC_ALLOC( Csw_Cut_t *, p->nTableSize ); memset( p->pTable, 0, sizeof(Aig_Obj_t *) * p->nTableSize ); // set the pointers to the available fraig nodes Csw_ObjSetEquiv( p, Aig_ManConst1(p->pManAig), Aig_ManConst1(p->pManRes) ); Aig_ManForEachPi( p->pManAig, pObj, i ) Csw_ObjSetEquiv( p, pObj, Aig_ManPi(p->pManRes, i) ); // room for temporary truth tables - p->puTemp[0] = ALLOC( unsigned, 4 * p->nTruthWords ); + p->puTemp[0] = ABC_ALLOC( unsigned, 4 * p->nTruthWords ); p->puTemp[1] = p->puTemp[0] + p->nTruthWords; p->puTemp[2] = p->puTemp[1] + p->nTruthWords; p->puTemp[3] = p->puTemp[2] + p->nTruthWords; @@ -104,18 +104,18 @@ void Csw_ManStop( Csw_Man_t * p ) p->nNodesTried, Csw_TableCountCuts( p ) ); printf( "Triv0 = %6d. Triv1 = %6d. Triv2 = %6d. Cut-replace = %6d.\n", p->nNodesTriv0, p->nNodesTriv1, p->nNodesTriv2, p->nNodesCuts ); - PRTP( "Cuts ", p->timeCuts, p->timeTotal ); - PRTP( "Hashing ", p->timeHash, p->timeTotal ); - PRTP( "Other ", p->timeOther, p->timeTotal ); - PRTP( "TOTAL ", p->timeTotal, p->timeTotal ); + ABC_PRTP( "Cuts ", p->timeCuts, p->timeTotal ); + ABC_PRTP( "Hashing ", p->timeHash, p->timeTotal ); + ABC_PRTP( "Other ", p->timeOther, p->timeTotal ); + ABC_PRTP( "TOTAL ", p->timeTotal, p->timeTotal ); } - free( p->puTemp[0] ); + ABC_FREE( p->puTemp[0] ); Aig_MmFixedStop( p->pMemCuts, 0 ); - free( p->pnRefs ); - free( p->pEquiv ); - free( p->pCuts ); - free( p->pTable ); - free( p ); + ABC_FREE( p->pnRefs ); + ABC_FREE( p->pEquiv ); + ABC_FREE( p->pCuts ); + ABC_FREE( p->pTable ); + ABC_FREE( p ); } //////////////////////////////////////////////////////////////////////// |