mirror of https://github.com/YosysHQ/abc.git
Hash table profiling.
This commit is contained in:
parent
86f76e9519
commit
f38ea72b89
|
|
@ -341,10 +341,24 @@ static int * Vec_MemHashLookup( Vec_Mem_t * p, word * pEntry )
|
||||||
return pSpot;
|
return pSpot;
|
||||||
return pSpot;
|
return pSpot;
|
||||||
}
|
}
|
||||||
|
static void Vec_MemHashProfile( Vec_Mem_t * p )
|
||||||
|
{
|
||||||
|
int e;
|
||||||
|
for ( e = 0; e < 1000; e++ )
|
||||||
|
{
|
||||||
|
int Count = 0;
|
||||||
|
int * pSpot = Vec_IntEntryP( p->vTable, e );
|
||||||
|
for ( ; *pSpot != -1; pSpot = Vec_IntEntryP(p->vNexts, *pSpot) )
|
||||||
|
Count++;
|
||||||
|
printf( "%d ", Count );
|
||||||
|
}
|
||||||
|
printf( "\n" );
|
||||||
|
}
|
||||||
static void Vec_MemHashResize( Vec_Mem_t * p )
|
static void Vec_MemHashResize( Vec_Mem_t * p )
|
||||||
{
|
{
|
||||||
word * pEntry;
|
word * pEntry;
|
||||||
int i, * pSpot;
|
int i, * pSpot;
|
||||||
|
//Vec_MemHashProfile( p );
|
||||||
Vec_IntFill( p->vTable, Abc_PrimeCudd(2 * Vec_IntSize(p->vTable)), -1 );
|
Vec_IntFill( p->vTable, Abc_PrimeCudd(2 * Vec_IntSize(p->vTable)), -1 );
|
||||||
Vec_IntClear( p->vNexts );
|
Vec_IntClear( p->vNexts );
|
||||||
Vec_MemForEachEntry( p, pEntry, i )
|
Vec_MemForEachEntry( p, pEntry, i )
|
||||||
|
|
|
||||||
|
|
@ -628,6 +628,7 @@ int Dau_InsertFunction( Abc_TtHieMan_t * pMan, word * pCur, int nNodes, int nInp
|
||||||
// Dau_TablesSave( nInputs, nVars0, vTtMem, vTtMemA, vNodSup, vMapping, nFronts, clk );
|
// Dau_TablesSave( nInputs, nVars0, vTtMem, vTtMemA, vNodSup, vMapping, nFronts, clk );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Entry = 0;
|
||||||
Phase = 0;
|
Phase = 0;
|
||||||
//printf( "%d ", Dau_CountCompl(pCur[0], nVarsNew) );
|
//printf( "%d ", Dau_CountCompl(pCur[0], nVarsNew) );
|
||||||
// this is a new class
|
// this is a new class
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue