summaryrefslogtreecommitdiffstats
path: root/src/map/if/if.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-04-14 09:06:14 -0500
committerAlan Mishchenko <alanmi@berkeley.edu>2014-04-14 09:06:14 -0500
commit02cf86939178ce0f95b98a4c7b432d4375a872e5 (patch)
tree2050cb947436114aa3fd7f4edb0d66bbb3109d38 /src/map/if/if.h
parent5cd9145046219f25d6d2ba2d746fcd7bb9531ef2 (diff)
downloadabc-02cf86939178ce0f95b98a4c7b432d4375a872e5.tar.gz
abc-02cf86939178ce0f95b98a4c7b432d4375a872e5.tar.bz2
abc-02cf86939178ce0f95b98a4c7b432d4375a872e5.zip
Changes in the LUT mapper data-structures.
Diffstat (limited to 'src/map/if/if.h')
-rw-r--r--src/map/if/if.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h
index cd1f7b8f..6807e6ad 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -282,8 +282,7 @@ struct If_Cut_t_
unsigned fUseless: 1; // using the user's area and delay
unsigned nLimit : 8; // the maximum number of leaves
unsigned nLeaves : 8; // the number of leaves
- int * pLeaves; // array of fanins
- char * pPerm; // permutation
+ int pLeaves[0];
};
// set of priority cut
@@ -390,6 +389,9 @@ static inline unsigned If_CutSuppMask( If_Cut_t * pCut ) { r
static inline int If_CutTruthWords( int nVarsMax ) { return nVarsMax <= 5 ? 2 : (1 << (nVarsMax - 5)); }
static inline int If_CutPermWords( int nVarsMax ) { return nVarsMax / sizeof(int) + ((nVarsMax % sizeof(int)) > 0); }
static inline int If_CutLeafBit( If_Cut_t * pCut, int i ) { return (pCut->uMaskFunc >> i) & 1; }
+static inline char * If_CutPerm( If_Cut_t * pCut ) { return (char *)(pCut->pLeaves + pCut->nLeaves); }
+static inline void If_CutCopy( If_Man_t * p, If_Cut_t * pDst, If_Cut_t * pSrc ) { memcpy( pDst, pSrc, p->nCutBytes ); }
+static inline void If_CutSetup( If_Man_t * p, If_Cut_t * pCut ) { memset(pCut, 0, p->nCutBytes); pCut->nLimit = p->pPars->nLutSize; }
static inline If_Cut_t * If_ObjCutBest( If_Obj_t * pObj ) { return &pObj->CutBest; }
static inline unsigned If_ObjCutSign( unsigned ObjId ) { return (1 << (ObjId % 31)); }