From eacfad762271794965d428cacd1ce56fbc575f93 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 5 May 2013 09:04:14 -0700 Subject: Changing the queue to work in the same the array of costs is realloced. --- src/base/abci/abcFx.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/base/abci') diff --git a/src/base/abci/abcFx.c b/src/base/abci/abcFx.c index 77a606f1..b337c6ca 100644 --- a/src/base/abci/abcFx.c +++ b/src/base/abci/abcFx.c @@ -636,10 +636,7 @@ int Fx_ManCubeSingleCubeDivisors( Fx_Man_t * p, Vec_Int_t * vPivot, int fRemove, { if ( Vec_FltSize(p->vWeights) == iDiv ) { - float * pArray = Vec_FltArray(p->vWeights); Vec_FltPush(p->vWeights, -2); - if ( p->vPrio && pArray != Vec_FltArray(p->vWeights) ) - Vec_QueSetCosts( p->vPrio, Vec_FltArray(p->vWeights) ); p->nDivsS++; } assert( iDiv < Vec_FltSize(p->vWeights) ); @@ -692,12 +689,7 @@ void Fx_ManCubeDoubleCubeDivisors( Fx_Man_t * p, int iFirst, Vec_Int_t * vPivot, if ( !fRemove ) { if ( iDiv == Vec_FltSize(p->vWeights) ) - { - float * pArray = Vec_FltArray(p->vWeights); Vec_FltPush(p->vWeights, -Vec_IntSize(p->vFree)); - if ( p->vPrio && pArray != Vec_FltArray(p->vWeights) ) - Vec_QueSetCosts( p->vPrio, Vec_FltArray(p->vWeights) ); - } assert( iDiv < Vec_FltSize(p->vWeights) ); Vec_FltAddToEntry( p->vWeights, iDiv, Base + Vec_IntSize(p->vFree) - 1 ); p->nPairsD++; @@ -735,7 +727,7 @@ void Fx_ManCreateDivisors( Fx_Man_t * p ) Fx_ManCubeDoubleCubeDivisors( p, i+1, vCube, 0, 0 ); // add - no update // create queue with all divisors p->vPrio = Vec_QueAlloc( Vec_FltSize(p->vWeights) ); - Vec_QueSetCosts( p->vPrio, Vec_FltArray(p->vWeights) ); + Vec_QueSetCosts( p->vPrio, Vec_FltArrayP(p->vWeights) ); Vec_FltForEachEntry( p->vWeights, Weight, i ) if ( Weight > 0.0 ) Vec_QuePush( p->vPrio, i ); -- cgit v1.2.3