summaryrefslogtreecommitdiffstats
path: root/src/misc/vec/vecInt.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-10-06 15:57:17 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-10-06 15:57:17 -0700
commit8a03e530c299fba1e862a5943207c39fbd52ee06 (patch)
tree775a402f266cd507849d188b0f6db0b76250be86 /src/misc/vec/vecInt.h
parent812a877ab694956be34b979fbd219a244580cced (diff)
downloadabc-8a03e530c299fba1e862a5943207c39fbd52ee06.tar.gz
abc-8a03e530c299fba1e862a5943207c39fbd52ee06.tar.bz2
abc-8a03e530c299fba1e862a5943207c39fbd52ee06.zip
Resubstitution code.
Diffstat (limited to 'src/misc/vec/vecInt.h')
-rw-r--r--src/misc/vec/vecInt.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h
index 5456dc0b..f8dc9385 100644
--- a/src/misc/vec/vecInt.h
+++ b/src/misc/vec/vecInt.h
@@ -1473,9 +1473,8 @@ static inline int Vec_IntTwoRemove( Vec_Int_t * vArr1, Vec_Int_t * vArr2 )
SeeAlso []
***********************************************************************/
-static inline Vec_Int_t * Vec_IntTwoMerge( Vec_Int_t * vArr1, Vec_Int_t * vArr2 )
+static inline void Vec_IntTwoMerge2Int( Vec_Int_t * vArr1, Vec_Int_t * vArr2, Vec_Int_t * vArr )
{
- Vec_Int_t * vArr = Vec_IntAlloc( vArr1->nSize + vArr2->nSize );
int * pBeg = vArr->pArray;
int * pBeg1 = vArr1->pArray;
int * pBeg2 = vArr2->pArray;
@@ -1498,8 +1497,18 @@ static inline Vec_Int_t * Vec_IntTwoMerge( Vec_Int_t * vArr1, Vec_Int_t * vArr2
assert( vArr->nSize <= vArr->nCap );
assert( vArr->nSize >= vArr1->nSize );
assert( vArr->nSize >= vArr2->nSize );
+}
+static inline Vec_Int_t * Vec_IntTwoMerge( Vec_Int_t * vArr1, Vec_Int_t * vArr2 )
+{
+ Vec_Int_t * vArr = Vec_IntAlloc( vArr1->nSize + vArr2->nSize );
+ Vec_IntTwoMerge2Int( vArr1, vArr2, vArr );
return vArr;
}
+static inline void Vec_IntTwoMerge2( Vec_Int_t * vArr1, Vec_Int_t * vArr2, Vec_Int_t * vArr )
+{
+ Vec_IntGrow( vArr, Vec_IntSize(vArr1) + Vec_IntSize(vArr2) );
+ Vec_IntTwoMerge2Int( vArr1, vArr2, vArr );
+}
/**Function*************************************************************