diff options
Diffstat (limited to 'src/map/mapper/mapperSwitch.c')
-rw-r--r-- | src/map/mapper/mapperSwitch.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/mapper/mapperSwitch.c b/src/map/mapper/mapperSwitch.c index 11e99d24..e85eccbb 100644 --- a/src/map/mapper/mapperSwitch.c +++ b/src/map/mapper/mapperSwitch.c @@ -184,15 +184,16 @@ float Map_SwitchCutRefDeref( Map_Node_t * pNode, Map_Cut_t * pCut, int fPhase, i SeeAlso [] ***********************************************************************/ -float Map_MappingGetSwitching( Map_Man_t * pMan, Map_NodeVec_t * vMapping ) +float Map_MappingGetSwitching( Map_Man_t * pMan ) { Map_Node_t * pNode; - float Switch; + float Switch = 0.0; int i; - Switch = 0.0; - for ( i = 0; i < vMapping->nSize; i++ ) + for ( i = 0; i < pMan->vMapObjs->nSize; i++ ) { - pNode = vMapping->pArray[i]; + pNode = pMan->vMapObjs->pArray[i]; + if ( pNode->nRefAct[2] == 0 ) + continue; // at least one phase has the best cut assigned assert( pNode->pCutBest[0] != NULL || pNode->pCutBest[1] != NULL ); // at least one phase is used in the mapping |