diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-01 12:45:34 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-01 12:45:34 -0700 |
commit | bc504219287b22898d5e7c6e1d5756265b957eca (patch) | |
tree | 344dba21a2bbd2251f7d9dcbfd78edb364bbe000 /src/misc | |
parent | 1039c8b432c78d75f01e1360a7bb616777033dd7 (diff) | |
download | abc-bc504219287b22898d5e7c6e1d5756265b957eca.tar.gz abc-bc504219287b22898d5e7c6e1d5756265b957eca.tar.bz2 abc-bc504219287b22898d5e7c6e1d5756265b957eca.zip |
Minor changes and improvement in PO partitioning (command &popart).
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/vec/vecHsh.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/misc/vec/vecHsh.h b/src/misc/vec/vecHsh.h index 04f1e9f2..5d9d2e9f 100644 --- a/src/misc/vec/vecHsh.h +++ b/src/misc/vec/vecHsh.h @@ -184,6 +184,20 @@ static inline Vec_Int_t * Hsh_IntManHashArray( Vec_Int_t * vData, int nSize ) Hsh_IntManStop( p ); return vRes; } +static inline Vec_Int_t * Hsh_WrdManHashArray( Vec_Wrd_t * vDataW, int nSize ) +{ + Hsh_IntMan_t * p; + Vec_Int_t Data = { 2*Vec_WrdCap(vDataW), 2*Vec_WrdSize(vDataW), (int *)Vec_WrdArray(vDataW) }; + Vec_Int_t * vData = &Data; + Vec_Int_t * vRes = Vec_IntAlloc( 100 ); + int i, nEntries = Vec_IntSize(vData) / (2*nSize); + assert( Vec_IntSize(vData) % (2*nSize) == 0 ); + p = Hsh_IntManStart( vData, (2*nSize), nEntries ); + for ( i = 0; i < nEntries; i++ ) + Vec_IntPush( vRes, Hsh_IntManAdd(p, i) ); + Hsh_IntManStop( p ); + return vRes; +} /**Function************************************************************* |