abc/src/misc/vec/vecVec.h

647 lines
20 KiB
C
Raw Normal View History

2005-08-17 17:01:00 +02:00
/**CFile****************************************************************
FileName [vecVec.h]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Resizable arrays.]
Synopsis [Resizable vector of resizable vectors.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: vecVec.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
2012-01-21 13:30:10 +01:00
#ifndef ABC__misc__vec__vecVec_h
#define ABC__misc__vec__vecVec_h
2005-08-17 17:01:00 +02:00
2010-11-01 09:35:04 +01:00
2005-08-17 17:01:00 +02:00
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
#include <stdio.h>
2010-11-01 09:35:04 +01:00
ABC_NAMESPACE_HEADER_START
2005-08-17 17:01:00 +02:00
////////////////////////////////////////////////////////////////////////
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
////////////////////////////////////////////////////////////////////////
typedef struct Vec_Vec_t_ Vec_Vec_t;
struct Vec_Vec_t_
{
2005-08-27 17:01:00 +02:00
int nCap;
int nSize;
void ** pArray;
2005-08-17 17:01:00 +02:00
};
////////////////////////////////////////////////////////////////////////
2008-01-31 05:01:00 +01:00
/// MACRO DEFINITIONS ///
2005-08-17 17:01:00 +02:00
////////////////////////////////////////////////////////////////////////
// iterators through levels
#define Vec_VecForEachLevel( vGlob, vVec, i ) \
for ( i = 0; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
2005-08-17 17:01:00 +02:00
#define Vec_VecForEachLevelStart( vGlob, vVec, i, LevelStart ) \
for ( i = LevelStart; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
2011-03-27 20:35:31 +02:00
#define Vec_VecForEachLevelStop( vGlob, vVec, i, LevelStop ) \
for ( i = 0; (i < LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
2005-08-17 17:01:00 +02:00
#define Vec_VecForEachLevelStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
for ( i = LevelStart; (i < LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
2005-08-27 17:01:00 +02:00
#define Vec_VecForEachLevelReverse( vGlob, vVec, i ) \
for ( i = Vec_VecSize(vGlob)-1; (i >= 0) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )
2010-11-29 10:40:49 +01:00
#define Vec_VecForEachLevelReverseStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
for ( i = LevelStart-1; (i >= LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )
#define Vec_VecForEachLevelTwo( vGlob1, vGlob2, vVec1, vVec2, i ) \
for ( i = 0; (i < Vec_VecSize(vGlob1)) && (((vVec1) = Vec_VecEntry(vGlob1, i)), 1) && (((vVec2) = Vec_VecEntry(vGlob2, i)), 1); i++ )
2011-03-27 20:35:31 +02:00
// iterators through levels
#define Vec_VecForEachLevelInt( vGlob, vVec, i ) \
for ( i = 0; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
2011-03-27 20:35:31 +02:00
#define Vec_VecForEachLevelIntStart( vGlob, vVec, i, LevelStart ) \
for ( i = LevelStart; (i < Vec_VecSize(vGlob)) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
2011-03-27 20:35:31 +02:00
#define Vec_VecForEachLevelIntStop( vGlob, vVec, i, LevelStop ) \
for ( i = 0; (i < LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
2011-03-27 20:35:31 +02:00
#define Vec_VecForEachLevelIntStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
for ( i = LevelStart; (i < LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i++ )
2011-03-27 20:35:31 +02:00
#define Vec_VecForEachLevelIntReverse( vGlob, vVec, i ) \
for ( i = Vec_VecSize(vGlob)-1; (i >= 0) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i-- )
2011-03-27 20:35:31 +02:00
#define Vec_VecForEachLevelIntReverseStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
for ( i = LevelStart-1; (i >= LevelStop) && (((vVec) = Vec_VecEntryInt(vGlob, i)), 1); i-- )
#define Vec_VecForEachLevelIntTwo( vGlob1, vGlob2, vVec1, vVec2, i ) \
for ( i = 0; (i < Vec_VecSize(vGlob1)) && (((vVec1) = Vec_VecEntryInt(vGlob1, i)), 1) && (((vVec2) = Vec_VecEntryInt(vGlob2, i)), 1); i++ )
2005-08-17 17:01:00 +02:00
// iteratores through entries
2010-11-29 10:40:49 +01:00
#define Vec_VecForEachEntry( Type, vGlob, pEntry, i, k ) \
2005-08-17 17:01:00 +02:00
for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
2010-11-29 10:40:49 +01:00
#define Vec_VecForEachEntryLevel( Type, vGlob, pEntry, i, Level ) \
Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, Level), pEntry, i )
2010-11-29 10:40:49 +01:00
#define Vec_VecForEachEntryStart( Type, vGlob, pEntry, i, k, LevelStart ) \
2005-08-17 17:01:00 +02:00
for ( i = LevelStart; i < Vec_VecSize(vGlob); i++ ) \
Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
2010-11-29 10:40:49 +01:00
#define Vec_VecForEachEntryStartStop( Type, vGlob, pEntry, i, k, LevelStart, LevelStop ) \
2011-03-27 20:35:31 +02:00
for ( i = LevelStart; i < LevelStop; i++ ) \
Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
2010-11-29 10:40:49 +01:00
#define Vec_VecForEachEntryReverse( Type, vGlob, pEntry, i, k ) \
2005-09-04 17:01:00 +02:00
for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
Vec_PtrForEachEntryReverse( Type, Vec_VecEntry(vGlob, i), pEntry, k )
2010-11-29 10:40:49 +01:00
#define Vec_VecForEachEntryReverseReverse( Type, vGlob, pEntry, i, k ) \
2008-01-31 05:01:00 +01:00
for ( i = Vec_VecSize(vGlob) - 1; i >= 0; i-- ) \
Vec_PtrForEachEntryReverse( Type, Vec_VecEntry(vGlob, i), pEntry, k )
2010-11-29 10:40:49 +01:00
#define Vec_VecForEachEntryReverseStart( Type, vGlob, pEntry, i, k, LevelStart ) \
2011-03-27 20:35:31 +02:00
for ( i = LevelStart-1; i >= 0; i-- ) \
Vec_PtrForEachEntry( Type, Vec_VecEntry(vGlob, i), pEntry, k )
2005-08-17 17:01:00 +02:00
2011-03-27 20:35:31 +02:00
// iteratores through entries
#define Vec_VecForEachEntryInt( vGlob, Entry, i, k ) \
2011-03-27 20:35:31 +02:00
for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
#define Vec_VecForEachEntryIntLevel( vGlob, Entry, i, Level ) \
Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, Level), Entry, i )
#define Vec_VecForEachEntryIntStart( vGlob, Entry, i, k, LevelStart ) \
2011-03-27 20:35:31 +02:00
for ( i = LevelStart; i < Vec_VecSize(vGlob); i++ ) \
Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
#define Vec_VecForEachEntryIntStartStop( vGlob, Entry, i, k, LevelStart, LevelStop ) \
2011-03-27 20:35:31 +02:00
for ( i = LevelStart; i < LevelStop; i++ ) \
Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
#define Vec_VecForEachEntryIntReverse( vGlob, Entry, i, k ) \
2011-03-27 20:35:31 +02:00
for ( i = 0; i < Vec_VecSize(vGlob); i++ ) \
Vec_IntForEachEntryReverse( Vec_VecEntryInt(vGlob, i), Entry, k )
#define Vec_VecForEachEntryIntReverseReverse( vGlob, Entry, i, k ) \
2011-03-27 20:35:31 +02:00
for ( i = Vec_VecSize(vGlob) - 1; i >= 0; i-- ) \
Vec_IntForEachEntryReverse( Vec_VecEntryInt(vGlob, i), Entry, k )
#define Vec_VecForEachEntryIntReverseStart( vGlob, Entry, i, k, LevelStart ) \
2011-03-27 20:35:31 +02:00
for ( i = LevelStart-1; i >= 0; i-- ) \
Vec_IntForEachEntry( Vec_VecEntryInt(vGlob, i), Entry, k )
2011-03-27 20:35:31 +02:00
2005-08-17 17:01:00 +02:00
////////////////////////////////////////////////////////////////////////
2008-01-31 05:01:00 +01:00
/// FUNCTION DEFINITIONS ///
2005-08-17 17:01:00 +02:00
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis [Allocates a vector with the given capacity.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline Vec_Vec_t * Vec_VecAlloc( int nCap )
{
Vec_Vec_t * p;
2009-02-15 17:01:00 +01:00
p = ABC_ALLOC( Vec_Vec_t, 1 );
2005-08-17 17:01:00 +02:00
if ( nCap > 0 && nCap < 8 )
nCap = 8;
p->nSize = 0;
p->nCap = nCap;
2009-02-15 17:01:00 +01:00
p->pArray = p->nCap? ABC_ALLOC( void *, p->nCap ) : NULL;
2005-08-17 17:01:00 +02:00
return p;
}
2005-08-27 17:01:00 +02:00
/**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;
}
2008-01-31 05:01:00 +01:00
/**Function*************************************************************
Synopsis [Allocates a vector with the given capacity.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_VecExpand( Vec_Vec_t * p, int Level )
{
int i;
if ( p->nSize >= Level + 1 )
return;
Vec_PtrGrow( (Vec_Ptr_t *)p, Level + 1 );
for ( i = p->nSize; i <= Level; i++ )
p->pArray[i] = Vec_PtrAlloc( 0 );
p->nSize = Level + 1;
}
2011-03-27 20:35:31 +02:00
static inline void Vec_VecExpandInt( Vec_Vec_t * p, int Level )
{
int i;
if ( p->nSize >= Level + 1 )
return;
Vec_IntGrow( (Vec_Int_t *)p, Level + 1 );
for ( i = p->nSize; i <= Level; i++ )
p->pArray[i] = Vec_PtrAlloc( 0 );
p->nSize = Level + 1;
}
2005-08-17 17:01:00 +02:00
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline int Vec_VecSize( Vec_Vec_t * p )
{
return p->nSize;
}
2012-06-22 19:30:22 +02:00
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline int Vec_VecCap( Vec_Vec_t * p )
{
return p->nCap;
}
2011-03-27 20:35:31 +02:00
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline int Vec_VecLevelSize( Vec_Vec_t * p, int i )
{
2013-04-28 00:23:12 +02:00
assert( i >= 0 && i < p->nSize );
2011-03-27 20:35:31 +02:00
return Vec_PtrSize( (Vec_Ptr_t *)p->pArray[i] );
}
2005-08-17 17:01:00 +02:00
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline Vec_Ptr_t * Vec_VecEntry( Vec_Vec_t * p, int i )
2005-08-17 17:01:00 +02:00
{
assert( i >= 0 && i < p->nSize );
2011-09-18 01:24:40 +02:00
return (Vec_Ptr_t *)p->pArray[i];
2005-08-17 17:01:00 +02:00
}
static inline Vec_Int_t * Vec_VecEntryInt( Vec_Vec_t * p, int i )
{
assert( i >= 0 && i < p->nSize );
2011-09-18 01:24:40 +02:00
return (Vec_Int_t *)p->pArray[i];
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
2012-07-29 21:34:32 +02:00
static inline double Vec_VecMemory( Vec_Vec_t * p )
{
2012-07-29 21:34:32 +02:00
int i;
double Mem;
if ( p == NULL ) return 0.0;
Mem = Vec_PtrMemory( (Vec_Ptr_t *)p );
for ( i = 0; i < p->nSize; i++ )
if ( Vec_VecEntry(p, i) )
Mem += Vec_PtrMemory( Vec_VecEntry(p, i) );
return Mem;
}
static inline double Vec_VecMemoryInt( Vec_Vec_t * p )
{
int i;
double Mem;
if ( p == NULL ) return 0.0;
Mem = Vec_PtrMemory( (Vec_Ptr_t *)p );
for ( i = 0; i < p->nSize; i++ )
if ( Vec_VecEntry(p, i) )
Mem += Vec_IntMemory( Vec_VecEntryInt(p, i) );
return Mem;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
2012-07-29 21:34:32 +02:00
static inline void * Vec_VecEntryEntry( Vec_Vec_t * p, int i, int k )
{
return Vec_PtrEntry( Vec_VecEntry(p, i), k );
}
static inline int Vec_VecEntryEntryInt( Vec_Vec_t * p, int i, int k )
{
return Vec_IntEntry( Vec_VecEntryInt(p, i), k );
}
2005-08-17 17:01:00 +02:00
/**Function*************************************************************
Synopsis [Frees the vector.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_VecFree( Vec_Vec_t * p )
{
Vec_Ptr_t * vVec;
int i;
Vec_VecForEachLevel( p, vVec, i )
if ( vVec ) Vec_PtrFree( vVec );
2005-08-17 17:01:00 +02:00
Vec_PtrFree( (Vec_Ptr_t *)p );
}
static inline void Vec_VecErase( Vec_Vec_t * p )
{
Vec_Ptr_t * vVec;
int i;
Vec_VecForEachLevel( p, vVec, i )
if ( vVec ) Vec_PtrFree( vVec );
Vec_PtrErase( (Vec_Ptr_t *)p );
}
2005-08-17 17:01:00 +02:00
2010-11-01 09:35:04 +01:00
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_VecFreeP( Vec_Vec_t ** p )
{
if ( *p == NULL )
return;
Vec_VecFree( *p );
*p = NULL;
}
2008-03-01 17:01:00 +01:00
/**Function*************************************************************
Synopsis [Frees the vector.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
2011-03-27 20:35:31 +02:00
static inline Vec_Vec_t * Vec_VecDup( Vec_Vec_t * p )
2008-03-01 17:01:00 +01:00
{
Vec_Ptr_t * vNew, * vVec;
int i;
vNew = Vec_PtrAlloc( Vec_VecSize(p) );
Vec_VecForEachLevel( p, vVec, i )
Vec_PtrPush( vNew, Vec_PtrDup(vVec) );
return (Vec_Vec_t *)vNew;
}
static inline Vec_Vec_t * Vec_VecDupInt( Vec_Vec_t * p )
{
2011-03-27 20:35:31 +02:00
Vec_Ptr_t * vNew;
Vec_Int_t * vVec;
2008-03-01 17:01:00 +01:00
int i;
vNew = Vec_PtrAlloc( Vec_VecSize(p) );
2011-03-27 20:35:31 +02:00
Vec_VecForEachLevelInt( p, vVec, i )
Vec_PtrPush( vNew, Vec_IntDup(vVec) );
2008-03-01 17:01:00 +01:00
return (Vec_Vec_t *)vNew;
}
2005-08-17 17:01:00 +02:00
/**Function*************************************************************
Synopsis [Frees the vector of vectors.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline int Vec_VecSizeSize( Vec_Vec_t * p )
{
Vec_Ptr_t * vVec;
int i, Counter = 0;
Vec_VecForEachLevel( p, vVec, i )
Counter += vVec->nSize;
return Counter;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_VecClear( Vec_Vec_t * p )
{
Vec_Ptr_t * vVec;
int i;
Vec_VecForEachLevel( p, vVec, i )
Vec_PtrClear( vVec );
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_VecPush( Vec_Vec_t * p, int Level, void * Entry )
{
if ( p->nSize < Level + 1 )
{
int i;
Vec_PtrGrow( (Vec_Ptr_t *)p, Level + 1 );
for ( i = p->nSize; i < Level + 1; i++ )
p->pArray[i] = Vec_PtrAlloc( 0 );
p->nSize = Level + 1;
}
Vec_PtrPush( Vec_VecEntry(p, Level), Entry );
2005-08-17 17:01:00 +02:00
}
2011-03-27 20:35:31 +02:00
static inline void Vec_VecPushInt( Vec_Vec_t * p, int Level, int Entry )
{
if ( p->nSize < Level + 1 )
{
int i;
Vec_PtrGrow( (Vec_Ptr_t *)p, Level + 1 );
for ( i = p->nSize; i < Level + 1; i++ )
p->pArray[i] = Vec_IntAlloc( 0 );
2011-03-27 20:35:31 +02:00
p->nSize = Level + 1;
}
Vec_IntPush( Vec_VecEntryInt(p, Level), Entry );
2011-03-27 20:35:31 +02:00
}
2005-08-31 17:01:00 +02:00
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_VecPushUnique( Vec_Vec_t * p, int Level, void * Entry )
{
if ( p->nSize < Level + 1 )
Vec_VecPush( p, Level, Entry );
else
Vec_PtrPushUnique( Vec_VecEntry(p, Level), Entry );
2008-01-31 05:01:00 +01:00
}
2011-03-27 20:35:31 +02:00
static inline void Vec_VecPushUniqueInt( Vec_Vec_t * p, int Level, int Entry )
{
if ( p->nSize < Level + 1 )
Vec_VecPushInt( p, Level, Entry );
else
Vec_IntPushUnique( Vec_VecEntryInt(p, Level), Entry );
2011-03-27 20:35:31 +02:00
}
2008-01-31 05:01:00 +01:00
/**Function*************************************************************
Synopsis [Comparison procedure for two arrays.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
2008-07-02 17:01:00 +02:00
static int Vec_VecSortCompare1( Vec_Ptr_t ** pp1, Vec_Ptr_t ** pp2 )
2008-01-31 05:01:00 +01:00
{
if ( Vec_PtrSize(*pp1) < Vec_PtrSize(*pp2) )
return -1;
if ( Vec_PtrSize(*pp1) > Vec_PtrSize(*pp2) )
return 1;
return 0;
}
2008-07-02 17:01:00 +02:00
static int Vec_VecSortCompare2( Vec_Ptr_t ** pp1, Vec_Ptr_t ** pp2 )
2008-01-31 05:01:00 +01:00
{
if ( Vec_PtrSize(*pp1) > Vec_PtrSize(*pp2) )
return -1;
if ( Vec_PtrSize(*pp1) < Vec_PtrSize(*pp2) )
return 1;
return 0;
}
/**Function*************************************************************
Synopsis [Sorting the entries by their integer value.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_VecSort( Vec_Vec_t * p, int fReverse )
{
if ( fReverse )
qsort( (void *)p->pArray, (size_t)p->nSize, sizeof(void *),
2008-01-31 05:01:00 +01:00
(int (*)(const void *, const void *)) Vec_VecSortCompare2 );
else
qsort( (void *)p->pArray, (size_t)p->nSize, sizeof(void *),
2008-01-31 05:01:00 +01:00
(int (*)(const void *, const void *)) Vec_VecSortCompare1 );
2007-04-08 17:01:00 +02:00
}
2012-02-18 04:04:28 +01:00
/**Function*************************************************************
Synopsis [Comparison procedure for two integers.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static int Vec_VecSortCompare3( Vec_Int_t ** pp1, Vec_Int_t ** pp2 )
{
if ( Vec_IntEntry(*pp1,0) < Vec_IntEntry(*pp2,0) )
return -1;
if ( Vec_IntEntry(*pp1,0) > Vec_IntEntry(*pp2,0) )
return 1;
return 0;
}
static int Vec_VecSortCompare4( Vec_Int_t ** pp1, Vec_Int_t ** pp2 )
{
if ( Vec_IntEntry(*pp1,0) > Vec_IntEntry(*pp2,0) )
return -1;
if ( Vec_IntEntry(*pp1,0) < Vec_IntEntry(*pp2,0) )
return 1;
return 0;
}
/**Function*************************************************************
Synopsis [Sorting the entries by their integer value.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_VecSortByFirstInt( Vec_Vec_t * p, int fReverse )
{
if ( fReverse )
qsort( (void *)p->pArray, (size_t)p->nSize, sizeof(void *),
2012-02-18 04:04:28 +01:00
(int (*)(const void *, const void *)) Vec_VecSortCompare4 );
else
qsort( (void *)p->pArray, (size_t)p->nSize, sizeof(void *),
2012-02-18 04:04:28 +01:00
(int (*)(const void *, const void *)) Vec_VecSortCompare3 );
}
2012-01-16 05:47:58 +01:00
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
2012-02-17 22:19:09 +01:00
static inline void Vec_VecPrintInt( Vec_Vec_t * p, int fSkipSingles )
2012-01-16 05:47:58 +01:00
{
int i, k, Entry;
Vec_VecForEachEntryInt( p, Entry, i, k )
{
2013-04-28 00:23:12 +02:00
if ( fSkipSingles && Vec_VecLevelSize(p, i) == 1 )
2012-02-17 22:19:09 +01:00
break;
2012-01-16 05:47:58 +01:00
if ( k == 0 )
2012-02-17 22:19:09 +01:00
printf( " %4d : {", i );
printf( " %d", Entry );
if ( k == Vec_VecLevelSize(p, i) - 1 )
printf( " }\n" );
2012-01-16 05:47:58 +01:00
}
}
2010-11-01 09:35:04 +01:00
ABC_NAMESPACE_HEADER_END
2008-01-31 05:01:00 +01:00
#endif
2005-08-17 17:01:00 +02:00
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////