src/opt/cut/cutList.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Cut_ListStruct_t_

Typedefs

typedef struct Cut_ListStruct_t_ Cut_List_t

Functions

static void Cut_ListStart (Cut_List_t *p)
static void Cut_ListAdd (Cut_List_t *p, Cut_Cut_t *pCut)
static void Cut_ListAdd2 (Cut_List_t *p, Cut_Cut_t *pCut)
static void Cut_ListDerive (Cut_List_t *p, Cut_Cut_t *pList)
static void Cut_ListAddList (Cut_List_t *pOld, Cut_List_t *pNew)
static Cut_Cut_tCut_ListFinish (Cut_List_t *p)

Typedef Documentation

typedef struct Cut_ListStruct_t_ Cut_List_t

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

FileName [cutList.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Implementation of layered listed list of cuts.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id
cutList.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

] INCLUDES /// PARAMETERS /// BASIC TYPES ///

Definition at line 36 of file cutList.h.


Function Documentation

static void Cut_ListAdd ( Cut_List_t p,
Cut_Cut_t pCut 
) [inline, static]

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

Synopsis [Adds one cut to the cut list.]

Description []

SideEffects []

SeeAlso []

Definition at line 83 of file cutList.h.

00084 {
00085     assert( pCut->nLeaves > 0 && pCut->nLeaves <= CUT_SIZE_MAX );
00086     *p->ppTail[pCut->nLeaves] = pCut;
00087     p->ppTail[pCut->nLeaves] = &pCut->pNext;
00088 }

static void Cut_ListAdd2 ( Cut_List_t p,
Cut_Cut_t pCut 
) [inline, static]

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

Synopsis [Adds one cut to the cut list while preserving order.]

Description []

SideEffects []

SeeAlso []

Definition at line 101 of file cutList.h.

00102 {
00103     extern int Cut_CutCompare( Cut_Cut_t * pCut1, Cut_Cut_t * pCut2 );
00104     Cut_Cut_t * pTemp, ** ppSpot;
00105     assert( pCut->nLeaves > 0 && pCut->nLeaves <= CUT_SIZE_MAX );
00106     if ( p->pHead[pCut->nLeaves] != NULL )
00107     {
00108         ppSpot = &p->pHead[pCut->nLeaves];
00109         for ( pTemp = p->pHead[pCut->nLeaves]; pTemp; pTemp = pTemp->pNext )
00110         {
00111             if ( Cut_CutCompare(pCut, pTemp) < 0 )
00112             {
00113                 *ppSpot = pCut;
00114                 pCut->pNext = pTemp;
00115                 return;
00116             }
00117             else
00118                 ppSpot = &pTemp->pNext;
00119         }
00120     }
00121     *p->ppTail[pCut->nLeaves] = pCut;
00122     p->ppTail[pCut->nLeaves] = &pCut->pNext;
00123 }

static void Cut_ListAddList ( Cut_List_t pOld,
Cut_List_t pNew 
) [inline, static]

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

Synopsis [Adds the second list to the first list.]

Description []

SideEffects []

SeeAlso []

Definition at line 164 of file cutList.h.

00165 {
00166     int i;
00167     for ( i = 1; i <= CUT_SIZE_MAX; i++ )
00168     {
00169         if ( pNew->pHead[i] == NULL )
00170             continue;
00171         *pOld->ppTail[i] = pNew->pHead[i];
00172         pOld->ppTail[i] = pNew->ppTail[i];
00173     }
00174 }

static void Cut_ListDerive ( Cut_List_t p,
Cut_Cut_t pList 
) [inline, static]

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

Synopsis [Derive the super list from the linked list of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 136 of file cutList.h.

00137 {
00138     Cut_Cut_t * pPrev;
00139     int nLeaves;
00140     Cut_ListStart( p );
00141     while ( pList != NULL )
00142     {
00143         nLeaves = pList->nLeaves;
00144         p->pHead[nLeaves] = pList;
00145         for ( pPrev = pList, pList = pList->pNext; pList; pPrev = pList, pList = pList->pNext )
00146             if ( nLeaves < (int)pList->nLeaves )
00147                 break;
00148         p->ppTail[nLeaves] = &pPrev->pNext;
00149         pPrev->pNext = NULL;
00150     }
00151 }

static Cut_Cut_t* Cut_ListFinish ( Cut_List_t p  )  [inline, static]

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

Synopsis [Returns the cut list linked into one sequence of cuts.]

Description []

SideEffects []

SeeAlso []

Definition at line 187 of file cutList.h.

00188 {
00189     Cut_Cut_t * pHead = NULL, ** ppTail = &pHead;
00190     int i;
00191     for ( i = 1; i <= CUT_SIZE_MAX; i++ )
00192     {
00193         if ( p->pHead[i] == NULL )
00194             continue;
00195         *ppTail = p->pHead[i];
00196         ppTail = p->ppTail[i];
00197     }
00198     *ppTail = NULL;
00199     return pHead;
00200 }

static void Cut_ListStart ( Cut_List_t p  )  [inline, static]

MACRO DEFINITIONS /// FUNCTION DECLARATIONS ///Function*************************************************************

Synopsis [Start the cut list.]

Description []

SideEffects []

SeeAlso []

Definition at line 62 of file cutList.h.

00063 {
00064     int i;
00065     for ( i = 1; i <= CUT_SIZE_MAX; i++ )
00066     {
00067         p->pHead[i] = 0;
00068         p->ppTail[i] = &p->pHead[i];
00069     }
00070 }


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