47 float aResult, aResult2;
103 float aSwitchActivity;
110 return aSwitchActivity;
114 for ( i = 0; i < pCut->
nLeaves; i++ )
126 if ( pNodeChild->
nRefAct[fPhaseChild]++ > 0 )
133 if ( pNodeChild->
nRefAct[fPhaseChild]++ == 0 && pNodeChild->
pCutBest[fPhaseChild] == NULL )
134 aSwitchActivity += pNodeChild->
Switching;
136 if ( pNodeChild->
nRefAct[2]++ > 0 )
146 if ( --pNodeChild->
nRefAct[fPhaseChild] > 0 )
153 if ( --pNodeChild->
nRefAct[fPhaseChild] == 0 && pNodeChild->
pCutBest[fPhaseChild] == NULL )
154 aSwitchActivity += pNodeChild->
Switching;
156 if ( --pNodeChild->
nRefAct[2] > 0 )
163 pCutChild = pNodeChild->
pCutBest[fPhaseChild];
165 if ( pCutChild == NULL )
167 fPhaseChild = !fPhaseChild;
168 pCutChild = pNodeChild->
pCutBest[fPhaseChild];
173 return aSwitchActivity;
192 for ( i = 0; i < pMan->vMapObjs->nSize; i++ )
194 pNode = pMan->vMapObjs->pArray[i];
217 for ( i = 0; i < pMan->nOutputs; i++ )
219 Switch += pMan->pOutputs[i]->Switching;
int Map_NodeIsAnd(Map_Node_t *p)
float Map_MappingGetSwitching(Map_Man_t *pMan)
#define Map_IsComplement(p)
GLOBAL VARIABLES ///.
#define ABC_NAMESPACE_IMPL_END
int Map_NodeIsVar(Map_Node_t *p)
float Map_SwitchCutDeref(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
#define ABC_NAMESPACE_IMPL_START
typedefABC_NAMESPACE_HEADER_START struct Map_ManStruct_t_ Map_Man_t
INCLUDES ///.
int Map_CutGetLeafPhase(Map_Cut_t *pCut, int fPhase, int iLeaf)
static ABC_NAMESPACE_IMPL_START float Map_SwitchCutRefDeref(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase, int fReference)
DECLARATIONS ///.
float Map_SwitchCutRef(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
float Map_SwitchCutGetDerefed(Map_Node_t *pNode, Map_Cut_t *pCut, int fPhase)
FUNCTION DEFINITIONS ///.