Skip to content

Commit 9596162

Browse files
committed
Bug fix in the previous commit.
1 parent 4c25599 commit 9596162

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/aig/gia/giaDeep.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,12 @@ Gia_Man_t * Gia_ManDeepSyn( Gia_Man_t * pGia, int nIters, int nNoImpr, int TimeO
164164

165165
}
166166
Gia_ManStop( pInit );
167-
if ( vGias ) {
168-
extern Gia_Man_t * Gia_ManCreateChoicesArray( Vec_Ptr_t * vGias, int fVerbose );
169-
Gia_ManStopP( &pBest );
170-
pBest = Gia_ManCreateChoicesArray( vGias, fVerbose );
167+
if ( vGias) {
168+
if ( Vec_PtrSize(vGias) > 1 ) {
169+
extern Gia_Man_t * Gia_ManCreateChoicesArray( Vec_Ptr_t * vGias, int fVerbose );
170+
Gia_ManStopP( &pBest );
171+
pBest = Gia_ManCreateChoicesArray( vGias, fVerbose );
172+
}
171173
// cleanup
172174
Gia_Man_t * pTemp;
173175
Vec_PtrForEachEntry( Gia_Man_t *, vGias, pTemp, i )

src/aig/gia/giaStoch.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,13 +1033,14 @@ Vec_Wec_t * Gia_ManStochOutputs( Gia_Man_t * p, Vec_Wec_t * vAnds )
10331033
***********************************************************************/
10341034
Gia_Man_t * Gia_ManCreateChoicesArray( Vec_Ptr_t * vGias, int fVerbose )
10351035
{
1036-
abctime clkStart = Abc_Clock(); int i;
1036+
abctime clkStart = Abc_Clock();
10371037
// swap around the first and the last
1038-
Gia_Man_t * pTemp = (Gia_Man_t *)Vec_PtrPop( vGias );
1039-
Vec_PtrPush( vGias, Vec_PtrEntry(vGias,0) );
1040-
Vec_PtrWriteEntry( vGias, 0, pTemp );
1038+
//Gia_Man_t * pTemp = (Gia_Man_t *)Vec_PtrPop( vGias );
1039+
//Vec_PtrPush( vGias, Vec_PtrEntry(vGias,0) );
1040+
//Vec_PtrWriteEntry( vGias, 0, pTemp );
10411041
if ( fVerbose ) {
10421042
printf( "Choicing will be performed with %d AIGs:\n", Vec_PtrSize(vGias) );
1043+
Gia_Man_t * pTemp; int i;
10431044
Vec_PtrForEachEntry( Gia_Man_t *, vGias, pTemp, i )
10441045
Gia_ManPrintStats( pTemp, NULL );
10451046
}

0 commit comments

Comments
 (0)