ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
abc_global.h
Go to the documentation of this file.
1
20
21#ifndef ABC__misc__util__abc_global_h
22#define ABC__misc__util__abc_global_h
23
27
28#ifndef ABC_USE_BRIDGE
29#define ABC_USE_BRIDGE
30#endif
31
32#ifdef _WIN32
33#ifndef __MINGW32__
34#define inline __inline // compatible with MS VS 6.0
35#pragma warning(disable : 4152) // warning C4152: nonstandard extension, function/data pointer conversion in expression
36#pragma warning(disable : 4200) // warning C4200: nonstandard extension used : zero-sized array in struct/union
37#pragma warning(disable : 4244) // warning C4244: '+=' : conversion from 'int ' to 'unsigned short ', possible loss of data
38#pragma warning(disable : 4514) // warning C4514: 'Vec_StrPop' : unreferenced inline function has been removed
39#pragma warning(disable : 4710) // warning C4710: function 'Vec_PtrGrow' not inlined
40//#pragma warning( disable : 4273 )
41#endif
42#endif
43
44#ifdef WIN32
45 #ifdef WIN32_NO_DLL
46 #define ABC_DLLEXPORT
47 #define ABC_DLLIMPORT
48 #else
49 #define ABC_DLLEXPORT __declspec(dllexport)
50 #define ABC_DLLIMPORT __declspec(dllimport)
51 #endif
52#else /* defined(WIN32) */
53#define ABC_DLLIMPORT
54#endif /* defined(WIN32) */
55
56#ifndef ABC_DLL
57#define ABC_DLL ABC_DLLIMPORT
58#endif
59
60#if !defined(___unused)
61#if defined(__GNUC__)
62#define ___unused __attribute__ ((__unused__))
63#else
64#define ___unused
65#endif
66#endif
67
68/*
69#ifdef __cplusplus
70#error "C++ code"
71#else
72#error "C code"
73#endif
74*/
75
76#include <time.h>
77#include <stdarg.h>
78#include <stdlib.h>
79#include <assert.h>
80#include <stdio.h>
81#include <string.h>
82
83// catch memory leaks in Visual Studio
84#ifdef WIN32
85 #ifdef _DEBUG
86 #define _CRTDBG_MAP_ALLOC
87 #include <crtdbg.h>
88 #endif
89#endif
90
91#include "abc_namespaces.h"
92
96
100
101#ifdef ABC_USE_STDINT_H
102// If there is stdint.h, assume this is a reasonably-modern platform that
103// would also have stddef.h and limits.h
104#include <limits.h>
105#include <stddef.h>
106#include <stdint.h>
107
108#if UINTPTR_MAX == 0xFFFFFFFFFFFFFFFF
109#define SIZEOF_VOID_P 8
110#ifdef _WIN32
111#define NT64
112#else
113#define LIN64
114#endif
115#elif UINTPTR_MAX == 0xFFFFFFFF
116#define SIZEOF_VOID_P 4
117#ifdef _WIN32
118#define NT
119#else
120#define LIN
121#endif
122#else
123 #error unsupported platform
124#endif
125
126#if ULONG_MAX == 0xFFFFFFFFFFFFFFFF
127#define SIZEOF_LONG 8
128#elif ULONG_MAX == 0xFFFFFFFF
129#define SIZEOF_LONG 4
130#else
131 #error unsupported platform
132#endif
133
134#if UINT_MAX == 0xFFFFFFFFFFFFFFFF
135#define SIZEOF_INT 8
136#elif UINT_MAX == 0xFFFFFFFF
137#define SIZEOF_INT 4
138#else
139 #error unsupported platform
140#endif
141
142#endif
143
145
151#if defined(__ccdoc__)
152typedef platform_dependent_type ABC_PTRDIFF_T;
153#elif defined(ABC_USE_STDINT_H)
154typedef ptrdiff_t ABC_PTRDIFF_T;
155#elif defined(LIN64)
156typedef long ABC_PTRDIFF_T;
157#elif defined(NT64)
158typedef long long ABC_PTRDIFF_T;
159#elif defined(NT) || defined(LIN) || defined(WIN32)
160typedef int ABC_PTRDIFF_T;
161#else
162 #error unknown platform
163#endif /* defined(PLATFORM) */
164
170#if defined(__ccdoc__)
171typedef platform_dependent_type ABC_PTRUINT_T;
172#elif defined(ABC_USE_STDINT_H)
173typedef uintptr_t ABC_PTRUINT_T;
174#elif defined(LIN64)
175typedef unsigned long ABC_PTRUINT_T;
176#elif defined(NT64)
177typedef unsigned long long ABC_PTRUINT_T;
178#elif defined(NT) || defined(LIN) || defined(WIN32)
179typedef unsigned int ABC_PTRUINT_T;
180#else
181 #error unknown platform
182#endif /* defined(PLATFORM) */
183
189#if defined(__ccdoc__)
190typedef platform_dependent_type ABC_PTRINT_T;
191#elif defined(ABC_USE_STDINT_H)
192typedef intptr_t ABC_PTRINT_T;
193#elif defined(LIN64)
194typedef long ABC_PTRINT_T;
195#elif defined(NT64)
196typedef long long ABC_PTRINT_T;
197#elif defined(NT) || defined(LIN) || defined(WIN32)
198typedef int ABC_PTRINT_T;
199#else
200 #error unknown platform
201#endif /* defined(PLATFORM) */
202
206#if defined(__ccdoc__)
207typedef platform_dependent_type ABC_INT64_T;
208#elif defined(ABC_USE_STDINT_H)
209typedef int64_t ABC_INT64_T;
210#elif defined(LIN64)
211typedef long ABC_INT64_T;
212#elif defined(NT64) || defined(LIN)
213typedef long long ABC_INT64_T;
214#elif defined(WIN32) || defined(NT)
215typedef signed __int64 ABC_INT64_T;
216#else
217 #error unknown platform
218#endif /* defined(PLATFORM) */
219
223#if defined(__ccdoc__)
224typedef platform_dependent_type ABC_UINT64_T;
225#elif defined(ABC_USE_STDINT_H)
226typedef uint64_t ABC_UINT64_T;
227#elif defined(LIN64)
228typedef unsigned long ABC_UINT64_T;
229#elif defined(NT64) || defined(LIN)
230typedef unsigned long long ABC_UINT64_T;
231#elif defined(WIN32) || defined(NT)
232typedef unsigned __int64 ABC_UINT64_T;
233#else
234 #error unknown platform
235#endif /* defined(PLATFORM) */
236
237#ifdef LIN
238 #define ABC_CONST(number) number ## ULL
239#else // LIN64 and windows
240 #define ABC_CONST(number) number
241#endif
242
243typedef ABC_UINT64_T word;
244typedef ABC_INT64_T iword;
245
249
250#define ABC_INFINITY (1000000000)
251#define ABC_INT_MAX (2147483647)
252
253#define ABC_SWAP(Type, a, b) { Type t = a; a = b; b = t; }
254
255#define ABC_PRT(a,t) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec\n", 1.0*((double)(t))/((double)CLOCKS_PER_SEC)))
256#define ABC_PRTr(a,t) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec\r", 1.0*((double)(t))/((double)CLOCKS_PER_SEC)))
257#define ABC_PRTn(a,t) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec ", 1.0*((double)(t))/((double)CLOCKS_PER_SEC)))
258#define ABC_PRTP(a,t,T) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%9.2f sec (%6.2f %%)\n", 1.0*((double)(t))/((double)CLOCKS_PER_SEC), ((double)(T))? 100.0*((double)(t))/((double)(T)) : 0.0))
259#define ABC_PRM(a,f) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%10.3f MB\n", 1.0*((double)(f))/(1<<20)))
260#define ABC_PRMr(a,f) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%10.3f MB\r", 1.0*((double)(f))/(1<<20)))
261#define ABC_PRMn(a,f) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%10.3f MB ", 1.0*((double)(f))/(1<<20)))
262#define ABC_PRMP(a,f,F) (Abc_Print(1, "%s =", (a)), Abc_Print(1, "%10.3f MB (%6.2f %%)\n", (1.0*((double)(f))/(1<<20)), (((double)(F))? 100.0*((double)(f))/((double)(F)) : 0.0) ) )
263
264#define ABC_ALLOC(type, num) ((type *) malloc(sizeof(type) * (size_t)(num)))
265#define ABC_CALLOC(type, num) ((type *) calloc((size_t)(num), sizeof(type)))
266#define ABC_FALLOC(type, num) ((type *) memset(malloc(sizeof(type) * (size_t)(num)), 0xff, sizeof(type) * (size_t)(num)))
267#define ABC_FREE(obj) ((obj) ? (free((char *) (obj)), (obj) = 0) : 0)
268#define ABC_REALLOC(type, obj, num) \
269 ((obj) ? ((type *) realloc((char *)(obj), sizeof(type) * (size_t)(num))) : \
270 ((type *) malloc(sizeof(type) * (size_t)(num))))
271
272static inline int Abc_AbsInt( int a ) { return a < 0 ? -a : a; }
273static inline int Abc_MaxInt( int a, int b ) { return a > b ? a : b; }
274static inline int Abc_MinInt( int a, int b ) { return a < b ? a : b; }
275static inline word Abc_MaxWord( word a, word b ) { return a > b ? a : b; }
276static inline word Abc_MinWord( word a, word b ) { return a < b ? a : b; }
277static inline float Abc_AbsFloat( float a ) { return a < 0 ? -a : a; }
278static inline float Abc_MaxFloat( float a, float b ) { return a > b ? a : b; }
279static inline float Abc_MinFloat( float a, float b ) { return a < b ? a : b; }
280static inline double Abc_AbsDouble( double a ) { return a < 0 ? -a : a; }
281static inline double Abc_MaxDouble( double a, double b ) { return a > b ? a : b; }
282static inline double Abc_MinDouble( double a, double b ) { return a < b ? a : b; }
283
284static inline int Abc_Float2Int( float Val ) { union { int x; float y; } v; v.y = Val; return v.x; }
285static inline float Abc_Int2Float( int Num ) { union { int x; float y; } v; v.x = Num; return v.y; }
286static inline word Abc_Dbl2Word( double Dbl ) { union { word x; double y; } v; v.y = Dbl; return v.x; }
287static inline double Abc_Word2Dbl( word Num ) { union { word x; double y; } v; v.x = Num; return v.y; }
288static inline int Abc_Base2Log( unsigned n ) { int r; if ( n < 2 ) return (int)n; for ( r = 0, n--; n; n >>= 1, r++ ) {}; return r; }
289static inline int Abc_Base10Log( unsigned n ) { int r; if ( n < 2 ) return (int)n; for ( r = 0, n--; n; n /= 10, r++ ) {}; return r; }
290static inline int Abc_Base16Log( unsigned n ) { int r; if ( n < 2 ) return (int)n; for ( r = 0, n--; n; n /= 16, r++ ) {}; return r; }
291static inline int Abc_Base2LogW( word n ) { int r; if ( n < 2 ) return (int)n; for ( r = 0, n--; n; n >>= 1, r++ ) {}; return r; }
292static inline int Abc_Base10LogW( word n ) { int r; if ( n < 2 ) return (int)n; for ( r = 0, n--; n; n /= 10, r++ ) {}; return r; }
293static inline int Abc_Base16LogW( word n ) { int r; if ( n < 2 ) return (int)n; for ( r = 0, n--; n; n /= 16, r++ ) {}; return r; }
294static inline char * Abc_UtilStrsav( char * s ) { return s ? strcpy(ABC_ALLOC(char, strlen(s)+1), s) : NULL; }
295static inline char * Abc_UtilStrsavTwo( char * s, char * a ){ char * r; if (!a) return Abc_UtilStrsav(s); r = ABC_ALLOC(char, strlen(s)+strlen(a)+1); sprintf(r, "%s%s", s, a ); return r; }
296static inline char * Abc_UtilStrsavNum( char * s, int n ) { char * r; if (!s) return NULL; r = ABC_ALLOC(char, strlen(s)+12+1); sprintf(r, "%s%d", s, n ); return r; }
297static inline int Abc_BitByteNum( int nBits ) { return (nBits>>3) + ((nBits&7) > 0); }
298static inline int Abc_BitWordNum( int nBits ) { return (nBits>>5) + ((nBits&31) > 0); }
299static inline int Abc_Bit6WordNum( int nBits ) { return (nBits>>6) + ((nBits&63) > 0); }
300static inline int Abc_TruthByteNum( int nVars ) { return nVars <= 3 ? 1 : (1 << (nVars - 3)); }
301static inline int Abc_TruthWordNum( int nVars ) { return nVars <= 5 ? 1 : (1 << (nVars - 5)); }
302static inline int Abc_Truth6WordNum( int nVars ) { return nVars <= 6 ? 1 : (1 << (nVars - 6)); }
303static inline int Abc_InfoHasBit( unsigned * p, int i ) { return (p[(i)>>5] & (unsigned)(1<<((i) & 31))) > 0; }
304static inline void Abc_InfoSetBit( unsigned * p, int i ) { p[(i)>>5] |= (unsigned)(1<<((i) & 31)); }
305static inline void Abc_InfoXorBit( unsigned * p, int i ) { p[(i)>>5] ^= (unsigned)(1<<((i) & 31)); }
306static inline unsigned Abc_InfoMask( int nVar ) { return (~(unsigned)0) >> (32-nVar); }
307
308static inline int Abc_Var2Lit( int Var, int c ) { assert(Var >= 0 && !(c >> 1)); return Var + Var + c; }
309static inline int Abc_Lit2Var( int Lit ) { assert(Lit >= 0); return Lit >> 1; }
310static inline int Abc_LitIsCompl( int Lit ) { assert(Lit >= 0); return Lit & 1; }
311static inline int Abc_LitNot( int Lit ) { assert(Lit >= 0); return Lit ^ 1; }
312static inline int Abc_LitNotCond( int Lit, int c ) { assert(Lit >= 0); return Lit ^ (int)(c > 0); }
313static inline int Abc_LitRegular( int Lit ) { assert(Lit >= 0); return Lit & ~01; }
314static inline int Abc_Lit2LitV( int * pMap, int Lit ) { assert(Lit >= 0); return Abc_Var2Lit( pMap[Abc_Lit2Var(Lit)], Abc_LitIsCompl(Lit) ); }
315static inline int Abc_Lit2LitL( int * pMap, int Lit ) { assert(Lit >= 0); return Abc_LitNotCond( pMap[Abc_Lit2Var(Lit)], Abc_LitIsCompl(Lit) ); }
316
317static inline int Abc_Ptr2Int( void * p ) { return (int)(ABC_PTRINT_T)p; }
318static inline void * Abc_Int2Ptr( int i ) { return (void *)(ABC_PTRINT_T)i; }
319static inline word Abc_Ptr2Wrd( void * p ) { return (word)(ABC_PTRUINT_T)p; }
320static inline void * Abc_Wrd2Ptr( word i ) { return (void *)(ABC_PTRUINT_T)i; }
321
322static inline int Abc_Var2Lit2( int Var, int Att ) { assert(!(Att >> 2)); return (Var << 2) + Att; }
323static inline int Abc_Lit2Var2( int Lit ) { assert(Lit >= 0); return Lit >> 2; }
324static inline int Abc_Lit2Att2( int Lit ) { assert(Lit >= 0); return Lit & 3; }
325static inline int Abc_Var2Lit3( int Var, int Att ) { assert(!(Att >> 3)); return (Var << 3) + Att; }
326static inline int Abc_Lit2Var3( int Lit ) { assert(Lit >= 0); return Lit >> 3; }
327static inline int Abc_Lit2Att3( int Lit ) { assert(Lit >= 0); return Lit & 7; }
328static inline int Abc_Var2Lit4( int Var, int Att ) { assert(!(Att >> 4)); return (Var << 4) + Att; }
329static inline int Abc_Lit2Var4( int Lit ) { assert(Lit >= 0); return Lit >> 4; }
330static inline int Abc_Lit2Att4( int Lit ) { assert(Lit >= 0); return Lit & 15; }
331
332typedef ABC_INT64_T abctime;
333// counting wall time
334static inline abctime Abc_Clock()
335{
336#if defined(__APPLE__) && defined(__MACH__)
337 #define APPLE_MACH (__APPLE__ & __MACH__)
338#else
339 #define APPLE_MACH 0
340#endif
341#if (defined(LIN) || defined(LIN64)) && !APPLE_MACH && !defined(__MINGW32__) && !defined(__wasm)
342 struct timespec ts;
343 if ( clock_gettime(CLOCK_MONOTONIC, &ts) < 0 )
344 return (abctime)-1;
345 abctime res = ((abctime) ts.tv_sec) * CLOCKS_PER_SEC;
346 res += (((abctime) ts.tv_nsec) * CLOCKS_PER_SEC) / 1000000000;
347 return res;
348#else
349 return (abctime) clock();
350#endif
351}
352// counting thread time
353static inline abctime Abc_ThreadClock()
354{
355#if defined(__APPLE__) && defined(__MACH__)
356 #define APPLE_MACH (__APPLE__ & __MACH__)
357#else
358 #define APPLE_MACH 0
359#endif
360#if (defined(LIN) || defined(LIN64)) && !APPLE_MACH && !defined(__MINGW32__) && !defined(__wasm)
361 struct timespec ts;
362 if ( clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) < 0 )
363 return (abctime)-1;
364 abctime res = ((abctime) ts.tv_sec) * CLOCKS_PER_SEC;
365 res += (((abctime) ts.tv_nsec) * CLOCKS_PER_SEC) / 1000000000;
366 return res;
367#else
368 return (abctime) clock();
369#endif
370}
371
372// misc printing procedures
381
382
383#ifdef ABC_USE_BRIDGE
384
385// bridge communication
386#define BRIDGE_NETLIST 106
387#define BRIDGE_ABS_NETLIST 107
388extern int Gia_ManToBridgeText( FILE * pFile, int Size, unsigned char * pBuffer );
389extern int Gia_ManToBridgeAbsNetlist( FILE * pFile, void * p, int pkg_type );
390
391// string printing
392extern char * vnsprintf(const char* format, va_list args);
393extern char * nsprintf(const char* format, ...);
394
395static inline void Abc_Print( int level, const char * format, ... )
396{
397 extern ABC_DLL int Abc_FrameIsBridgeMode();
398 va_list args;
399 extern unsigned enable_dbg_outs;
400 if ( !enable_dbg_outs )
401 return;
402
403 if ( ! Abc_FrameIsBridgeMode() ){
404 if ( level == ABC_ERROR )
405 printf( "Error: " );
406 else if ( level == ABC_WARNING )
407 printf( "Warning: " );
408 }else{
409 if ( level == ABC_ERROR )
410 Gia_ManToBridgeText( stdout, (int)strlen("Error: "), (unsigned char*)"Error: " );
411 else if ( level == ABC_WARNING )
412 Gia_ManToBridgeText( stdout, (int)strlen("Warning: "), (unsigned char*)"Warning: " );
413 }
414
415 va_start( args, format );
416 if ( Abc_FrameIsBridgeMode() )
417 {
418 char * tmp = vnsprintf( format, args );
419 Gia_ManToBridgeText( stdout, (int)strlen(tmp), (unsigned char*)tmp );
420 free( tmp );
421 }
422 else
423 vprintf( format, args );
424 va_end( args );
425}
426
427#else
428
429static inline void Abc_Print( int level, const char * format, ... )
430{
431 va_list args;
432 va_start( args, format );
433 if ( level == ABC_ERROR )
434 printf( "Error: " );
435 else if ( level == ABC_WARNING )
436 printf( "Warning: " );
437 vprintf( format, args );
438 va_end( args );
439}
440
441#endif
442
443
444static inline void Abc_PrintInt( int i )
445{
446 double v3 = (double)i/1000;
447 double v6 = (double)i/1000000;
448
449 Abc_Print( 1, " " );
450
451 if ( i > -1000 && i < 1000 )
452 Abc_Print( 1, " %4d", i );
453
454 else if ( v3 > -9.995 && v3 < 9.995 )
455 Abc_Print( 1, "%4.2fk", v3 );
456 else if ( v3 > -99.95 && v3 < 99.95 )
457 Abc_Print( 1, "%4.1fk", v3 );
458 else if ( v3 > -999.5 && v3 < 999.5 )
459 Abc_Print( 1, "%4.0fk", v3 );
460
461 else if ( v6 > -9.995 && v6 < 9.995 )
462 Abc_Print( 1, "%4.2fm", v6 );
463 else if ( v6 > -99.95 && v6 < 99.95 )
464 Abc_Print( 1, "%4.1fm", v6 );
465 else if ( v6 > -999.5 && v6 < 999.5 )
466 Abc_Print( 1, "%4.0fm", v6 );
467}
468
469
470static inline void Abc_PrintTime( int level, const char * pStr, abctime time )
471{
472 ABC_PRT( pStr, time );
473}
474
475static inline void Abc_PrintTimeP( int level, const char * pStr, abctime time, abctime Time )
476{
477 ABC_PRTP( pStr, time, Time );
478}
479
480static inline void Abc_PrintMemoryP( int level, const char * pStr, int mem, int Mem )
481{
482 ABC_PRMP( pStr, mem, Mem );
483}
484
485// Returns the next prime >= p
486static inline int Abc_PrimeCudd( unsigned int p )
487{
488 int i,pn;
489 p--;
490 do {
491 p++;
492 if (p&1)
493 {
494 pn = 1;
495 i = 3;
496 while ((unsigned) (i * i) <= p)
497 {
498 if (p % (unsigned)i == 0) {
499 pn = 0;
500 break;
501 }
502 i += 2;
503 }
504 }
505 else
506 pn = 0;
507 } while (!pn);
508 return (int)(p);
509
510} // end of Cudd_Prime
511
512// the returned buffer has 32 unused bytes at the end, filled with zeros
513static inline void * Abc_FileReadContents( char * pFileName, int * pnFileSize )
514{
515 int RetValue, nFileSize;
516 char * pBuffer;
517 FILE * pFile = fopen( pFileName, "rb" );
518 if ( pFile == NULL )
519 return NULL;
520 // get the file size, in bytes
521 fseek( pFile, 0, SEEK_END );
522 nFileSize = ftell( pFile );
523 if ( pnFileSize )
524 *pnFileSize = nFileSize;
525 rewind( pFile );
526 // load the contents of the file into memory
527 pBuffer = ABC_ALLOC( char, nFileSize + 32 );
528 RetValue = fread( pBuffer, 1, nFileSize, pFile );
529 memset( pBuffer + nFileSize, 0, 32 );
530 assert( RetValue == nFileSize );
531 fclose( pFile );
532 return (void *)pBuffer;
533}
534static inline void Abc_ReverseOrder( int * pA, int nA )
535{
536 int i;
537 for ( i = 0; i < nA/2; i++ )
538 ABC_SWAP( int, pA[i], pA[nA-1-i] );
539}
540
541
542// sorting
543extern void Abc_MergeSort( int * pInput, int nSize );
544extern int * Abc_MergeSortCost( int * pCosts, int nSize );
545extern void Abc_MergeSortCost2( int * pInput, int nSize, int * pCost );
546extern void Abc_MergeSortCost2Reverse( int * pInput, int nSize, int * pCost );
547extern void Abc_QuickSort1( word * pData, int nSize, int fDecrease );
548extern void Abc_QuickSort2( word * pData, int nSize, int fDecrease );
549extern void Abc_QuickSort3( word * pData, int nSize, int fDecrease );
550extern void Abc_QuickSortCostData( int * pCosts, int nSize, int fDecrease, word * pData, int * pResult );
551extern int * Abc_QuickSortCost( int * pCosts, int nSize, int fDecrease );
552
553extern unsigned Abc_Random( int fReset );
554extern word Abc_RandomW( int fReset );
555
556// pthreads
557extern void Util_ProcessThreads( int (*pUserFunc)(void *), void * vData, int nProcs, int TimeOut, int fVerbose );
558
560
561#endif
562
ABC_INT64_T iword
Definition abc_global.h:244
word Abc_RandomW(int fReset)
Definition utilSort.c:1022
#define ABC_SWAP(Type, a, b)
Definition abc_global.h:253
void Abc_QuickSortCostData(int *pCosts, int nSize, int fDecrease, word *pData, int *pResult)
Definition utilSort.c:914
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_PRT(a, t)
Definition abc_global.h:255
void Abc_MergeSort(int *pInput, int nSize)
Definition utilSort.c:129
void Abc_MergeSortCost2(int *pInput, int nSize, int *pCost)
Definition utilSort.c:231
void Abc_QuickSort1(word *pData, int nSize, int fDecrease)
Definition utilSort.c:681
int * Abc_MergeSortCost(int *pCosts, int nSize)
Definition utilSort.c:442
char * vnsprintf(const char *format, va_list args)
Definition utilFile.c:196
Abc_VerbLevel
Definition abc_global.h:374
@ ABC_ERROR
Definition abc_global.h:376
@ ABC_VERBOSE
Definition abc_global.h:379
@ ABC_STANDARD
Definition abc_global.h:378
@ ABC_PROMPT
Definition abc_global.h:375
@ ABC_WARNING
Definition abc_global.h:377
void Abc_QuickSort2(word *pData, int nSize, int fDecrease)
Definition utilSort.c:866
int * Abc_QuickSortCost(int *pCosts, int nSize, int fDecrease)
Definition utilSort.c:923
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
#define ABC_PRTP(a, t, T)
Definition abc_global.h:258
int Gia_ManToBridgeAbsNetlist(FILE *pFile, void *p, int pkg_type)
Definition utilBridge.c:192
#define ABC_PRMP(a, f, F)
Definition abc_global.h:262
unsigned Abc_Random(int fReset)
Definition utilSort.c:1004
int Gia_ManToBridgeText(FILE *pFile, int Size, unsigned char *pBuffer)
Definition utilBridge.c:171
void Abc_QuickSort3(word *pData, int nSize, int fDecrease)
Definition utilSort.c:884
char * nsprintf(const char *format,...)
Definition utilFile.c:233
void Util_ProcessThreads(int(*pUserFunc)(void *), void *vData, int nProcs, int TimeOut, int fVerbose)
DECLARATIONS ///.
Definition utilPth.c:70
void Abc_MergeSortCost2Reverse(int *pInput, int nSize, int *pCost)
Definition utilSort.c:333
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
#define ABC_DLL
Definition abcapis.h:57
ABC_DLL int Abc_FrameIsBridgeMode()
Definition mainFrame.c:113
ptrdiff_t intptr_t
Definition pstdint.h:729
Cube * p
Definition exorList.c:222
int Var
Definition exorList.c:228
#define vprintf
Definition fretime.h:138
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
unsigned enable_dbg_outs
FUNCTION DEFINITIONS ///.
Definition mainReal.c:75
#define assert(ex)
Definition util_old.h:213
char * memset()
int strlen()
char * sprintf()
char * strcpy()
VOID_HACK free()
VOID_HACK rewind()
#define SEEK_END
Definition zconf.h:392