diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-07-11 22:08:35 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-07-11 22:08:35 -0700 |
commit | 2ee26b00f9ac8dc93bd1335f89d4c3b165dbd7fd (patch) | |
tree | a1dcf454fe71cfe1c9f29983430db16e4261c2da /src/misc/vec | |
parent | 773b1c1351cb132f14b919ac318decf077ffd925 (diff) | |
download | abc-2ee26b00f9ac8dc93bd1335f89d4c3b165dbd7fd.tar.gz abc-2ee26b00f9ac8dc93bd1335f89d4c3b165dbd7fd.tar.bz2 abc-2ee26b00f9ac8dc93bd1335f89d4c3b165dbd7fd.zip |
Precomputing DSD functions.
Diffstat (limited to 'src/misc/vec')
-rw-r--r-- | src/misc/vec/vecHsh.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/misc/vec/vecHsh.h b/src/misc/vec/vecHsh.h index 2d15fce7..a613c68b 100644 --- a/src/misc/vec/vecHsh.h +++ b/src/misc/vec/vecHsh.h @@ -207,6 +207,19 @@ static inline Vec_Int_t * Hsh_WrdManHashArray( Vec_Wrd_t * vDataW, int nSize ) Hsh_IntManStop( p ); return vRes; } +static inline Hsh_IntMan_t * Hsh_WrdManHashArrayStart( 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; + 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++ ) + Hsh_IntManAdd( p, i ); + assert( Vec_WrdSize(p->vObjs) == nEntries ); + return p; +} /**Function************************************************************* |