diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-02-08 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-02-08 08:01:00 -0800 |
commit | f2d4f6c26eb610cf4843004fc6955a1548aa9f8f (patch) | |
tree | 089ca0bde7ecc2bb0acec04aeb28c52ecc18139f /src/opt/mfs/mfsResub.c | |
parent | 5a6924060bffb688101f54711f967305fc3fa480 (diff) | |
download | abc-f2d4f6c26eb610cf4843004fc6955a1548aa9f8f.tar.gz abc-f2d4f6c26eb610cf4843004fc6955a1548aa9f8f.tar.bz2 abc-f2d4f6c26eb610cf4843004fc6955a1548aa9f8f.zip |
Version abc80208
Diffstat (limited to 'src/opt/mfs/mfsResub.c')
-rw-r--r-- | src/opt/mfs/mfsResub.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/opt/mfs/mfsResub.c b/src/opt/mfs/mfsResub.c index 1e9da4d2..4171c111 100644 --- a/src/opt/mfs/mfsResub.c +++ b/src/opt/mfs/mfsResub.c @@ -235,12 +235,8 @@ p->timeInt += clock() - clk; clk = clock(); // derive the function pFunc = Abc_NtkMfsInterplate( p, pCands, nCands+1 ); - // shift fanins by 1 - for ( i = Vec_PtrSize(p->vFanins); i > 0; i-- ) - p->vFanins->pArray[i] = p->vFanins->pArray[i-1]; - p->vFanins->nSize++; - Vec_PtrWriteEntry( p->vFanins, 0, Vec_PtrEntry(p->vDivs, iVar) ); // update the network + Vec_PtrPush( p->vFanins, Vec_PtrEntry(p->vDivs, iVar) ); Abc_NtkMfsUpdateNetwork( p, pNode, p->vFanins, pFunc ); p->timeInt += clock() - clk; return 1; @@ -372,17 +368,10 @@ p->timeInt += clock() - clk; clk = clock(); // derive the function pFunc = Abc_NtkMfsInterplate( p, pCands, nCands+2 ); - // shift fanins by 1 - for ( i = Vec_PtrSize(p->vFanins); i > 0; i-- ) - p->vFanins->pArray[i] = p->vFanins->pArray[i-1]; - p->vFanins->nSize++; - // shift fanins by 1 - for ( i = Vec_PtrSize(p->vFanins); i > 0; i-- ) - p->vFanins->pArray[i] = p->vFanins->pArray[i-1]; - p->vFanins->nSize++; - Vec_PtrWriteEntry( p->vFanins, 0, Vec_PtrEntry(p->vDivs, iVar2) ); - Vec_PtrWriteEntry( p->vFanins, 1, Vec_PtrEntry(p->vDivs, iVar) ); // update the network + Vec_PtrPush( p->vFanins, Vec_PtrEntry(p->vDivs, iVar2) ); + Vec_PtrPush( p->vFanins, Vec_PtrEntry(p->vDivs, iVar) ); + assert( Vec_PtrSize(p->vFanins) == nCands + 2 ); Abc_NtkMfsUpdateNetwork( p, pNode, p->vFanins, pFunc ); p->timeInt += clock() - clk; return 1; |