mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-08 11:53:16 +02:00
Version abc70906
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdio.h>
|
||||
#include "extra.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/// PARAMETERS ///
|
||||
@@ -475,45 +474,6 @@ static inline void Vec_IntPushFirst( Vec_Int_t * p, int Entry )
|
||||
p->pArray[0] = Entry;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis []
|
||||
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
static inline void Vec_IntPushMem( Extra_MmStep_t * pMemMan, Vec_Int_t * p, int Entry )
|
||||
{
|
||||
if ( p->nSize == p->nCap )
|
||||
{
|
||||
int * pArray;
|
||||
int i;
|
||||
|
||||
if ( p->nSize == 0 )
|
||||
p->nCap = 1;
|
||||
if ( pMemMan )
|
||||
pArray = (int *)Extra_MmStepEntryFetch( pMemMan, p->nCap * 8 );
|
||||
else
|
||||
pArray = ALLOC( int, p->nCap * 2 );
|
||||
if ( p->pArray )
|
||||
{
|
||||
for ( i = 0; i < p->nSize; i++ )
|
||||
pArray[i] = p->pArray[i];
|
||||
if ( pMemMan )
|
||||
Extra_MmStepEntryRecycle( pMemMan, (char *)p->pArray, p->nCap * 4 );
|
||||
else
|
||||
free( p->pArray );
|
||||
}
|
||||
p->nCap *= 2;
|
||||
p->pArray = pArray;
|
||||
}
|
||||
p->pArray[p->nSize++] = Entry;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [Inserts the entry while preserving the increasing order.]
|
||||
|
||||
Reference in New Issue
Block a user