summaryrefslogtreecommitdiffstats
path: root/src/map/if
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2007-03-28 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2007-03-28 08:01:00 -0700
commit4da784c049b79b76d8c1b82297bd27f45ead9377 (patch)
tree8e69de9f95a13f1ef6ec9f3624be997ef080dc0d /src/map/if
parentdd5531caf916d526551049b59151990adaef575d (diff)
downloadabc-4da784c049b79b76d8c1b82297bd27f45ead9377.tar.gz
abc-4da784c049b79b76d8c1b82297bd27f45ead9377.tar.bz2
abc-4da784c049b79b76d8c1b82297bd27f45ead9377.zip
Version abc70328
Diffstat (limited to 'src/map/if')
-rw-r--r--src/map/if/if.h1
-rw-r--r--src/map/if/ifMap.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h
index 759a9801..a440d7ea 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -101,6 +101,7 @@ struct If_Par_t_
float * pTimesArr; // arrival times
float * pTimesReq; // required times
int (* pFuncCost) (If_Cut_t *); // procedure to compute the user's cost of a cut
+ int (* pFuncUser) (If_Man_t *, If_Obj_t *, If_Cut_t *); // procedure called for each cut when cut computation is finished
void * pReoMan; // reordering manager
};
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 7423bd05..e3f0dfda 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -149,6 +149,11 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
if ( Mode && pObj->nRefs > 0 )
If_CutRef( p, If_ObjCutBest(pObj), IF_INFINITY );
+ // call the user specified function for each cut
+ if ( p->pPars->pFuncUser )
+ If_ObjForEachCut( pObj, pCut, i )
+ p->pPars->pFuncUser( p, pObj, pCut );
+
// free the cuts
If_ManDerefNodeCutSet( p, pObj );
}