summaryrefslogtreecommitdiffstats
path: root/src/misc
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2021-10-07 20:34:58 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2021-10-07 20:34:58 -0700
commit1afd156dbdf4a0845610bbfd2159e930944b1f57 (patch)
tree99f6a49a0701adee89cb95d6a45a6f8274bada5d /src/misc
parente56a767640e57df42f463792333e5a1ff817a65e (diff)
downloadabc-1afd156dbdf4a0845610bbfd2159e930944b1f57.tar.gz
abc-1afd156dbdf4a0845610bbfd2159e930944b1f57.tar.bz2
abc-1afd156dbdf4a0845610bbfd2159e930944b1f57.zip
New command &stochsyn for stochastic synthesis.
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/vec/vecWec.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/misc/vec/vecWec.h b/src/misc/vec/vecWec.h
index 2be08d04..a97f1ceb 100644
--- a/src/misc/vec/vecWec.h
+++ b/src/misc/vec/vecWec.h
@@ -303,6 +303,15 @@ static inline void Vec_WecPush( Vec_Wec_t * p, int Level, int Entry )
}
Vec_IntPush( Vec_WecEntry(p, Level), Entry );
}
+static inline void Vec_WecPushTwo( Vec_Wec_t * p, int Level, int Entry1, int Entry2 )
+{
+ if ( p->nSize < Level + 1 )
+ {
+ Vec_WecGrow( p, Abc_MaxInt(2*p->nSize, Level + 1) );
+ p->nSize = Level + 1;
+ }
+ Vec_IntPushTwo( Vec_WecEntry(p, Level), Entry1, Entry2 );
+}
static inline Vec_Int_t * Vec_WecPushLevel( Vec_Wec_t * p )
{
if ( p->nSize == p->nCap )