Version abc50827

This commit is contained in:
Alan Mishchenko
2005-08-27 08:01:00 -07:00
parent 9093ca5320
commit 28db025b83
35 changed files with 2300 additions and 1167 deletions
+1 -1
View File
@@ -47,8 +47,8 @@ struct Abc_Fan_t_ // 1 word
typedef struct Vec_Fan_t_ Vec_Fan_t;
struct Vec_Fan_t_
{
int nSize;
int nCap;
int nSize;
Abc_Fan_t * pArray;
};
+25 -3
View File
@@ -39,8 +39,8 @@
typedef struct Vec_Int_t_ Vec_Int_t;
struct Vec_Int_t_
{
int nSize;
int nCap;
int nSize;
int * pArray;
};
@@ -322,9 +322,31 @@ static inline void Vec_IntFill( Vec_Int_t * p, int nSize, int Entry )
{
int i;
Vec_IntGrow( p, nSize );
p->nSize = nSize;
for ( i = 0; i < p->nSize; i++ )
for ( i = 0; i < nSize; i++ )
p->pArray[i] = Entry;
p->nSize = nSize;
}
/**Function*************************************************************
Synopsis [Fills the vector with given number of entries.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_IntFillExtra( Vec_Int_t * p, int nSize, int Entry )
{
int i;
if ( p->nSize >= nSize )
return;
Vec_IntGrow( p, nSize );
for ( i = p->nSize; i < nSize; i++ )
p->pArray[i] = Entry;
p->nSize = nSize;
}
/**Function*************************************************************
+25 -3
View File
@@ -39,8 +39,8 @@
typedef struct Vec_Ptr_t_ Vec_Ptr_t;
struct Vec_Ptr_t_
{
int nSize;
int nCap;
int nSize;
void ** pArray;
};
@@ -323,9 +323,31 @@ static inline void Vec_PtrFill( Vec_Ptr_t * p, int nSize, void * Entry )
{
int i;
Vec_PtrGrow( p, nSize );
p->nSize = nSize;
for ( i = 0; i < p->nSize; i++ )
for ( i = 0; i < nSize; i++ )
p->pArray[i] = Entry;
p->nSize = nSize;
}
/**Function*************************************************************
Synopsis [Fills the vector with given number of entries.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_PtrFillExtra( Vec_Ptr_t * p, int nSize, void * Entry )
{
int i;
if ( p->nSize >= nSize )
return;
Vec_PtrGrow( p, nSize );
for ( i = p->nSize; i < nSize; i++ )
p->pArray[i] = Entry;
p->nSize = nSize;
}
/**Function*************************************************************
+1 -1
View File
@@ -39,8 +39,8 @@
typedef struct Vec_Str_t_ Vec_Str_t;
struct Vec_Str_t_
{
int nSize;
int nCap;
int nSize;
char * pArray;
};
+27 -3
View File
@@ -39,9 +39,9 @@
typedef struct Vec_Vec_t_ Vec_Vec_t;
struct Vec_Vec_t_
{
int nSize;
int nCap;
void ** pArray;
int nCap;
int nSize;
void ** pArray;
};
////////////////////////////////////////////////////////////////////////
@@ -55,6 +55,8 @@ struct Vec_Vec_t_
for ( i = LevelStart; (i < Vec_PtrSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
#define Vec_VecForEachLevelStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
for ( i = LevelStart; (i <= LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
#define Vec_VecForEachLevelReverse( vGlob, vVec, i ) \
for ( i = Vec_VecSize(vGlob) - 1; (i >= 0) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )
// iteratores through entries
#define Vec_VecForEachEntry( vGlob, pEntry, i, k ) \
@@ -94,6 +96,28 @@ static inline Vec_Vec_t * Vec_VecAlloc( int nCap )
return p;
}
/**Function*************************************************************
Synopsis [Allocates a vector with the given capacity.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline Vec_Vec_t * Vec_VecStart( int nSize )
{
Vec_Vec_t * p;
int i;
p = Vec_VecAlloc( nSize );
for ( i = 0; i < nSize; i++ )
p->pArray[i] = Vec_PtrAlloc( 0 );
p->nSize = nSize;
return p;
}
/**Function*************************************************************
Synopsis []