summaryrefslogtreecommitdiffstats
path: root/src/map/amap/amapUniq.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
commit6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch)
tree0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/map/amap/amapUniq.c
parentf0e77f6797c0504b0da25a56152b707d3357f386 (diff)
downloadabc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip
initial commit of public abc
Diffstat (limited to 'src/map/amap/amapUniq.c')
-rw-r--r--src/map/amap/amapUniq.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/map/amap/amapUniq.c b/src/map/amap/amapUniq.c
index e57161e4..a2375389 100644
--- a/src/map/amap/amapUniq.c
+++ b/src/map/amap/amapUniq.c
@@ -20,6 +20,9 @@
#include "amapInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -87,9 +90,9 @@ static inline void Vec_IntPushOrderWithMask( Vec_Int_t * p, int Entry )
int Amap_LibFindNode( Amap_Lib_t * pLib, int iFan0, int iFan1, int fXor )
{
if ( fXor )
- return Vec_IntCheckWithMask( Vec_PtrEntry(pLib->vRulesX, iFan0), iFan1 );
+ return Vec_IntCheckWithMask( (Vec_Int_t *)Vec_PtrEntry(pLib->vRulesX, iFan0), iFan1 );
else
- return Vec_IntCheckWithMask( Vec_PtrEntry(pLib->vRules, iFan0), iFan1 );
+ return Vec_IntCheckWithMask( (Vec_Int_t *)Vec_PtrEntry(pLib->vRules, iFan0), iFan1 );
}
/**Function*************************************************************
@@ -207,21 +210,21 @@ Amap_Lit2Var(iFan1), (Amap_LitIsCompl(iFan1)?'-':'+') );
if ( fXor )
{
if ( iFan0 == iFan1 )
- Vec_IntPushOrderWithMask( Vec_PtrEntry(p->vRulesX, iFan0), (pNode->Id << 16) | iFan1 );
+ Vec_IntPushOrderWithMask( (Vec_Int_t *)Vec_PtrEntry(p->vRulesX, iFan0), (pNode->Id << 16) | iFan1 );
else
{
- Vec_IntPushOrderWithMask( Vec_PtrEntry(p->vRulesX, iFan0), (pNode->Id << 16) | iFan1 );
- Vec_IntPushOrderWithMask( Vec_PtrEntry(p->vRulesX, iFan1), (pNode->Id << 16) | iFan0 );
+ Vec_IntPushOrderWithMask( (Vec_Int_t *)Vec_PtrEntry(p->vRulesX, iFan0), (pNode->Id << 16) | iFan1 );
+ Vec_IntPushOrderWithMask( (Vec_Int_t *)Vec_PtrEntry(p->vRulesX, iFan1), (pNode->Id << 16) | iFan0 );
}
}
else
{
if ( iFan0 == iFan1 )
- Vec_IntPushOrderWithMask( Vec_PtrEntry(p->vRules, iFan0), (pNode->Id << 16) | iFan1 );
+ Vec_IntPushOrderWithMask( (Vec_Int_t *)Vec_PtrEntry(p->vRules, iFan0), (pNode->Id << 16) | iFan1 );
else
{
- Vec_IntPushOrderWithMask( Vec_PtrEntry(p->vRules, iFan0), (pNode->Id << 16) | iFan1 );
- Vec_IntPushOrderWithMask( Vec_PtrEntry(p->vRules, iFan1), (pNode->Id << 16) | iFan0 );
+ Vec_IntPushOrderWithMask( (Vec_Int_t *)Vec_PtrEntry(p->vRules, iFan0), (pNode->Id << 16) | iFan1 );
+ Vec_IntPushOrderWithMask( (Vec_Int_t *)Vec_PtrEntry(p->vRules, iFan1), (pNode->Id << 16) | iFan0 );
}
}
return pNode->Id;
@@ -279,13 +282,13 @@ int ** Amap_LibLookupTableAlloc( Vec_Ptr_t * vVec, int fVerbose )
int i, k, nTotal, nSize, nEntries, Value;
// count the total size
nEntries = nSize = Vec_PtrSize( vVec );
- Vec_PtrForEachEntry( vVec, vOne, i )
+ Vec_PtrForEachEntry( Vec_Int_t *, vVec, vOne, i )
nEntries += Vec_IntSize(vOne);
pBuffer = ABC_ALLOC( int, nSize * sizeof(void *) + nEntries );
pRes = (int **)pBuffer;
pRes[0] = pBuffer + nSize * sizeof(void *);
nTotal = 0;
- Vec_PtrForEachEntry( vVec, vOne, i )
+ Vec_PtrForEachEntry( Vec_Int_t *, vVec, vOne, i )
{
pRes[i] = pRes[0] + nTotal;
nTotal += Vec_IntSize(vOne) + 1;
@@ -310,3 +313,5 @@ int ** Amap_LibLookupTableAlloc( Vec_Ptr_t * vVec, int fVerbose )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+