src/opt/cut/cutApi.c File Reference

#include "cutInt.h"
Include dependency graph for cutApi.c:

Go to the source code of this file.

Functions

Cut_Cut_tCut_NodeReadCutsNew (Cut_Man_t *p, int Node)
Cut_Cut_tCut_NodeReadCutsOld (Cut_Man_t *p, int Node)
Cut_Cut_tCut_NodeReadCutsTemp (Cut_Man_t *p, int Node)
void Cut_NodeWriteCutsNew (Cut_Man_t *p, int Node, Cut_Cut_t *pList)
void Cut_NodeWriteCutsOld (Cut_Man_t *p, int Node, Cut_Cut_t *pList)
void Cut_NodeWriteCutsTemp (Cut_Man_t *p, int Node, Cut_Cut_t *pList)
void Cut_NodeSetTriv (Cut_Man_t *p, int Node)
void Cut_NodeTryDroppingCuts (Cut_Man_t *p, int Node)
void Cut_NodeFreeCuts (Cut_Man_t *p, int Node)

Function Documentation

void Cut_NodeFreeCuts ( Cut_Man_t p,
int  Node 
)

Function*************************************************************

Synopsis [Deallocates the cuts at the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 181 of file cutApi.c.

00182 {
00183     Cut_Cut_t * pList, * pCut, * pCut2;
00184     pList = Cut_NodeReadCutsNew( p, Node );
00185     if ( pList == NULL )
00186         return;
00187     Cut_ListForEachCutSafe( pList, pCut, pCut2 )
00188         Cut_CutRecycle( p, pCut );
00189     Cut_NodeWriteCutsNew( p, Node, NULL );
00190 }

Cut_Cut_t* Cut_NodeReadCutsNew ( Cut_Man_t p,
int  Node 
)

CFile****************************************************************

FileName [cutNode.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [K-feasible cut computation package.]

Synopsis [Procedures to compute cuts for a node.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
cutNode.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

] DECLARATIONS /// FUNCTION DEFINITIONS ///Function*************************************************************

Synopsis [Returns the pointer to the linked list of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 42 of file cutApi.c.

00043 {
00044     if ( Node >= p->vCutsNew->nSize )
00045         return NULL;
00046     return Vec_PtrEntry( p->vCutsNew, Node );
00047 }

Cut_Cut_t* Cut_NodeReadCutsOld ( Cut_Man_t p,
int  Node 
)

Function*************************************************************

Synopsis [Returns the pointer to the linked list of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 60 of file cutApi.c.

00061 {
00062     assert( Node < p->vCutsOld->nSize );
00063     return Vec_PtrEntry( p->vCutsOld, Node );
00064 }

Cut_Cut_t* Cut_NodeReadCutsTemp ( Cut_Man_t p,
int  Node 
)

Function*************************************************************

Synopsis [Returns the pointer to the linked list of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 77 of file cutApi.c.

00078 {
00079     assert( Node < p->vCutsTemp->nSize );
00080     return Vec_PtrEntry( p->vCutsTemp, Node );
00081 }

void Cut_NodeSetTriv ( Cut_Man_t p,
int  Node 
)

Function*************************************************************

Synopsis [Sets the trivial cut for the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 142 of file cutApi.c.

00143 {
00144     assert( Cut_NodeReadCutsNew(p, Node) == NULL );
00145     Cut_NodeWriteCutsNew( p, Node, Cut_CutCreateTriv(p, Node) );
00146 }

void Cut_NodeTryDroppingCuts ( Cut_Man_t p,
int  Node 
)

Function*************************************************************

Synopsis [Consider dropping cuts if they are useless by now.]

Description []

SideEffects []

SeeAlso []

Definition at line 159 of file cutApi.c.

00160 {
00161     int nFanouts;
00162     assert( p->vFanCounts );
00163     nFanouts = Vec_IntEntry( p->vFanCounts, Node );
00164     assert( nFanouts > 0 );
00165     if ( --nFanouts == 0 )
00166         Cut_NodeFreeCuts( p, Node );
00167     Vec_IntWriteEntry( p->vFanCounts, Node, nFanouts );
00168 }

void Cut_NodeWriteCutsNew ( Cut_Man_t p,
int  Node,
Cut_Cut_t pList 
)

Function*************************************************************

Synopsis [Returns the pointer to the linked list of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 94 of file cutApi.c.

00095 {
00096     Vec_PtrWriteEntry( p->vCutsNew, Node, pList );
00097 }

void Cut_NodeWriteCutsOld ( Cut_Man_t p,
int  Node,
Cut_Cut_t pList 
)

Function*************************************************************

Synopsis [Returns the pointer to the linked list of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 110 of file cutApi.c.

00111 {
00112     Vec_PtrWriteEntry( p->vCutsOld, Node, pList );
00113 }

void Cut_NodeWriteCutsTemp ( Cut_Man_t p,
int  Node,
Cut_Cut_t pList 
)

Function*************************************************************

Synopsis [Returns the pointer to the linked list of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 126 of file cutApi.c.

00127 {
00128     Vec_PtrWriteEntry( p->vCutsTemp, Node, pList );
00129 }


Generated on Tue Jan 5 12:19:23 2010 for abc70930 by  doxygen 1.6.1