ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
bar.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BAR_PROGRESS_USE   1
 INCLUDES ///.
 

Typedefs

typedef struct Bar_Progress_t_ Bar_Progress_t
 BASIC TYPES ///.
 

Functions

Bar_Progress_tBar_ProgressStart (FILE *pFile, int nItemsTotal)
 MACRO DEFINITIONS ///.
 
void Bar_ProgressStop (Bar_Progress_t *p)
 
void Bar_ProgressUpdate_int (Bar_Progress_t *p, int nItemsCur, char *pString)
 

Macro Definition Documentation

◆ BAR_PROGRESS_USE

#define BAR_PROGRESS_USE   1

INCLUDES ///.

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

FileName [bar.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Progress bar.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

] PARAMETERS ///

Definition at line 42 of file bar.h.

Typedef Documentation

◆ Bar_Progress_t

BASIC TYPES ///.

Definition at line 48 of file bar.h.

Function Documentation

◆ Bar_ProgressStart()

Bar_Progress_t * Bar_ProgressStart ( FILE * pFile,
int nItemsTotal )
extern

MACRO DEFINITIONS ///.

FUNCTION DECLARATIONS ///

MACRO DEFINITIONS ///.

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

Synopsis [Starts the progress bar.]

Description [The first parameter is the output stream (pFile), where the progress is printed. The current printing position should be the first one on the given line. The second parameters is the total number of items that correspond to 100% position of the progress bar.]

SideEffects []

SeeAlso []

Definition at line 66 of file bar.c.

67{
69 Abc_Frame_t * pFrame;
70 pFrame = Abc_FrameReadGlobalFrame();
71 if ( pFrame == NULL )
72 return NULL;
73 if ( !Abc_FrameShowProgress(pFrame) ) return NULL;
75 memset( p, 0, sizeof(Bar_Progress_t) );
76 p->pFile = pFile;
77 p->nItemsTotal = nItemsTotal;
78 p->posTotal = 78;
79 p->posCur = 1;
80 p->nItemsNext = (int)((7.0+p->posCur)*p->nItemsTotal/p->posTotal);
81 Bar_ProgressShow( p, NULL );
82 return p;
83}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
Definition abcapis.h:38
struct Bar_Progress_t_ Bar_Progress_t
BASIC TYPES ///.
Definition bar.h:48
ABC_DLL int Abc_FrameShowProgress(Abc_Frame_t *p)
Definition mainFrame.c:310
ABC_DLL Abc_Frame_t * Abc_FrameReadGlobalFrame()
Definition mainFrame.c:666
Cube * p
Definition exorList.c:222
char * memset()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Bar_ProgressStop()

void Bar_ProgressStop ( Bar_Progress_t * p)
extern

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

Synopsis [Stops the progress bar.]

Description []

SideEffects []

SeeAlso []

Definition at line 126 of file bar.c.

127{
128 if ( p == NULL ) return;
129 Bar_ProgressClean( p );
130 ABC_FREE( p );
131}
#define ABC_FREE(obj)
Definition abc_global.h:267
Here is the caller graph for this function:

◆ Bar_ProgressUpdate_int()

void Bar_ProgressUpdate_int ( Bar_Progress_t * p,
int nItemsCur,
char * pString )
extern

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

Synopsis [Updates the progress bar.]

Description []

SideEffects []

SeeAlso []

Definition at line 96 of file bar.c.

97{
98 if ( p == NULL ) return;
99 if ( nItemsCur < p->nItemsNext )
100 return;
101 if ( nItemsCur >= p->nItemsTotal )
102 {
103 p->posCur = 78;
104 p->nItemsNext = 0x7FFFFFFF;
105 }
106 else
107 {
108 p->posCur += 7;
109 p->nItemsNext = (int)((7.0+p->posCur)*p->nItemsTotal/p->posTotal);
110 }
111 Bar_ProgressShow( p, pString );
112}