diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2010-11-01 01:35:04 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2010-11-01 01:35:04 -0700 |
commit | 6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch) | |
tree | 0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/opt/cut/cutNode.c | |
parent | f0e77f6797c0504b0da25a56152b707d3357f386 (diff) | |
download | abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2 abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip |
initial commit of public abc
Diffstat (limited to 'src/opt/cut/cutNode.c')
-rw-r--r-- | src/opt/cut/cutNode.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/opt/cut/cutNode.c b/src/opt/cut/cutNode.c index 633219fd..010e1e00 100644 --- a/src/opt/cut/cutNode.c +++ b/src/opt/cut/cutNode.c @@ -20,6 +20,9 @@ #include "cutInt.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -490,20 +493,20 @@ int Cut_NodeMapping( Cut_Man_t * p, Cut_Cut_t * pCuts, int Node, int Node0, int // get the fanin cuts Delay0 = Vec_IntEntry( p->vDelays2, Node0 ); Delay1 = Vec_IntEntry( p->vDelays2, Node1 ); - pCut0 = (Delay0 == 0) ? Vec_PtrEntry( p->vCutsNew, Node0 ) : Vec_PtrEntry( p->vCutsMax, Node0 ); - pCut1 = (Delay1 == 0) ? Vec_PtrEntry( p->vCutsNew, Node1 ) : Vec_PtrEntry( p->vCutsMax, Node1 ); + pCut0 = (Delay0 == 0) ? (Cut_Cut_t *)Vec_PtrEntry( p->vCutsNew, Node0 ) : (Cut_Cut_t *)Vec_PtrEntry( p->vCutsMax, Node0 ); + pCut1 = (Delay1 == 0) ? (Cut_Cut_t *)Vec_PtrEntry( p->vCutsNew, Node1 ) : (Cut_Cut_t *)Vec_PtrEntry( p->vCutsMax, Node1 ); if ( Delay0 == Delay1 ) Delay = (Delay0 == 0) ? Delay0 + 1: Delay0; else if ( Delay0 > Delay1 ) { Delay = Delay0; - pCut1 = Vec_PtrEntry( p->vCutsNew, Node1 ); + pCut1 = (Cut_Cut_t *)Vec_PtrEntry( p->vCutsNew, Node1 ); assert( pCut1->nLeaves == 1 ); } else // if ( Delay0 < Delay1 ) { Delay = Delay1; - pCut0 = Vec_PtrEntry( p->vCutsNew, Node0 ); + pCut0 = (Cut_Cut_t *)Vec_PtrEntry( p->vCutsNew, Node0 ); assert( pCut0->nLeaves == 1 ); } // merge the cuts @@ -544,7 +547,7 @@ int Cut_ManMappingArea_rec( Cut_Man_t * p, int Node ) int i, Counter; if ( p->vCutsMax == NULL ) return 0; - pCut = Vec_PtrEntry( p->vCutsMax, Node ); + pCut = (Cut_Cut_t *)Vec_PtrEntry( p->vCutsMax, Node ); if ( pCut == NULL || pCut->nLeaves == 1 ) return 0; Counter = 0; @@ -729,7 +732,7 @@ Cut_Cut_t * Cut_NodeUnionCuts( Cut_Man_t * p, Vec_Int_t * vNodes ) Vec_IntForEachEntryStart( vNodes, Node, k, i+1 ) Cut_NodeFreeCuts( p, Node ); // recycle the saved cuts of other nodes - Vec_PtrForEachEntry( p->vTemp, pList, k ) + Vec_PtrForEachEntry( Cut_Cut_t *, p->vTemp, pList, k ) Cut_ListForEachCutSafe( pList, pCut, pCut2 ) Cut_CutRecycle( p, pCut ); goto finish; @@ -737,7 +740,7 @@ Cut_Cut_t * Cut_NodeUnionCuts( Cut_Man_t * p, Vec_Int_t * vNodes ) } } // collect larger cuts next - Vec_PtrForEachEntry( p->vTemp, pList, i ) + Vec_PtrForEachEntry( Cut_Cut_t *, p->vTemp, pList, i ) { Cut_ListForEachCutSafe( pList, pCut, pCut2 ) { @@ -756,7 +759,7 @@ Cut_Cut_t * Cut_NodeUnionCuts( Cut_Man_t * p, Vec_Int_t * vNodes ) Cut_ListForEachCutSafe( pListStart, pCut, pCut2 ) Cut_CutRecycle( p, pCut ); // recycle the saved cuts of other nodes - Vec_PtrForEachEntryStart( p->vTemp, pList, k, i+1 ) + Vec_PtrForEachEntryStart( Cut_Cut_t *, p->vTemp, pList, k, i+1 ) Cut_ListForEachCutSafe( pList, pCut, pCut2 ) Cut_CutRecycle( p, pCut ); goto finish; @@ -885,7 +888,7 @@ Cut_Cut_t * Cut_NodeUnionCutsSeq( Cut_Man_t * p, Vec_Int_t * vNodes, int CutSetN Vec_IntForEachEntryStart( vNodes, Node, k, i+1 ) Cut_NodeFreeCuts( p, Node ); // recycle the saved cuts of other nodes - Vec_PtrForEachEntry( p->vTemp, pList, k ) + Vec_PtrForEachEntry( Cut_Cut_t *, p->vTemp, pList, k ) Cut_ListForEachCutSafe( pList, pCut, pCut2 ) Cut_CutRecycle( p, pCut ); goto finish; @@ -893,7 +896,7 @@ Cut_Cut_t * Cut_NodeUnionCutsSeq( Cut_Man_t * p, Vec_Int_t * vNodes, int CutSetN } } // collect larger cuts next - Vec_PtrForEachEntry( p->vTemp, pList, i ) + Vec_PtrForEachEntry( Cut_Cut_t *, p->vTemp, pList, i ) { Cut_ListForEachCutSafe( pList, pCut, pCut2 ) { @@ -925,7 +928,7 @@ Cut_Cut_t * Cut_NodeUnionCutsSeq( Cut_Man_t * p, Vec_Int_t * vNodes, int CutSetN Cut_ListForEachCutSafe( pListStart, pCut, pCut2 ) Cut_CutRecycle( p, pCut ); // recycle the saved cuts of other nodes - Vec_PtrForEachEntryStart( p->vTemp, pList, k, i+1 ) + Vec_PtrForEachEntryStart( Cut_Cut_t *, p->vTemp, pList, k, i+1 ) Cut_ListForEachCutSafe( pList, pCut, pCut2 ) Cut_CutRecycle( p, pCut ); goto finish; @@ -997,3 +1000,5 @@ int Cut_CutListVerify( Cut_Cut_t * pList ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + |