summaryrefslogtreecommitdiffstats
path: root/src/misc/vec/vecInt.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-11-14 20:12:20 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2014-11-14 20:12:20 -0800
commitcc37fb95732e71c78be055b43dc0fb7d0e74ab3e (patch)
tree5fa7d60f3f8347d4bee6a22b3474809161ea5165 /src/misc/vec/vecInt.h
parent3dd08c7172511b8291074e605e5e235272557ad6 (diff)
downloadabc-cc37fb95732e71c78be055b43dc0fb7d0e74ab3e.tar.gz
abc-cc37fb95732e71c78be055b43dc0fb7d0e74ab3e.tar.bz2
abc-cc37fb95732e71c78be055b43dc0fb7d0e74ab3e.zip
Improvements to word-level network package.
Diffstat (limited to 'src/misc/vec/vecInt.h')
-rw-r--r--src/misc/vec/vecInt.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h
index b56d8661..26c67073 100644
--- a/src/misc/vec/vecInt.h
+++ b/src/misc/vec/vecInt.h
@@ -551,6 +551,14 @@ static inline void Vec_IntFill( Vec_Int_t * p, int nSize, int Fill )
p->pArray[i] = Fill;
p->nSize = nSize;
}
+static inline void Vec_IntFillTwo( Vec_Int_t * p, int nSize, int FillEven, int FillOdd )
+{
+ int i;
+ Vec_IntGrow( p, nSize );
+ for ( i = 0; i < nSize; i++ )
+ p->pArray[i] = (i & 1) ? FillOdd : FillEven;
+ p->nSize = nSize;
+}
/**Function*************************************************************