ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
amapMan.c
Go to the documentation of this file.
1
20
21#include "amapInt.h"
22
24
25
29
33
46{
47 Amap_Man_t * p;
48 // start the manager
49 p = ABC_ALLOC( Amap_Man_t, 1 );
50 memset( p, 0, sizeof(Amap_Man_t) );
51 p->fEpsilonInternal = (float)0.01;
52 // allocate arrays for nodes
53 p->vPis = Vec_PtrAlloc( 100 );
54 p->vPos = Vec_PtrAlloc( 100 );
55 p->vObjs = Vec_PtrAlloc( 100 );
56 p->vTemp = Vec_IntAlloc( 100 );
57 p->vCuts0 = Vec_PtrAlloc( 100 );
58 p->vCuts1 = Vec_PtrAlloc( 100 );
59 p->vCuts2 = Vec_PtrAlloc( 100 );
60 p->vTempP = Vec_PtrAlloc( 100 );
61 // prepare the memory manager
62 p->pMemObj = Aig_MmFixedStart( sizeof(Amap_Obj_t), nNodes );
63 p->pMemCuts = Aig_MmFlexStart();
64 p->pMemCutBest = Aig_MmFlexStart();
65 p->pMemTemp = Aig_MmFlexStart();
66 return p;
67}
68
81{
82 Vec_PtrFree( p->vPis );
83 Vec_PtrFree( p->vPos );
84 Vec_PtrFree( p->vObjs );
85 Vec_PtrFree( p->vCuts0 );
86 Vec_PtrFree( p->vCuts1 );
87 Vec_PtrFree( p->vCuts2 );
88 Vec_PtrFree( p->vTempP );
89 Vec_IntFree( p->vTemp );
90 Aig_MmFixedStop( p->pMemObj, 0 );
91 Aig_MmFlexStop( p->pMemCuts, 0 );
92 Aig_MmFlexStop( p->pMemCutBest, 0 );
93 Aig_MmFlexStop( p->pMemTemp, 0 );
94 ABC_FREE( p->pMatsTemp );
95 ABC_FREE( p->ppCutsTemp );
96 ABC_FREE( p->pCutsPi );
97 ABC_FREE( p );
98}
99
103
104
106
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
void Aig_MmFlexStop(Aig_MmFlex_t *p, int fVerbose)
Definition aigMem.c:337
Aig_MmFixed_t * Aig_MmFixedStart(int nEntrySize, int nEntriesMax)
FUNCTION DEFINITIONS ///.
Definition aigMem.c:96
Aig_MmFlex_t * Aig_MmFlexStart()
Definition aigMem.c:305
void Aig_MmFixedStop(Aig_MmFixed_t *p, int fVerbose)
Definition aigMem.c:132
struct Amap_Obj_t_ Amap_Obj_t
Definition amapInt.h:71
struct Amap_Man_t_ Amap_Man_t
Definition amapInt.h:70
void Amap_ManStop(Amap_Man_t *p)
Definition amapMan.c:80
ABC_NAMESPACE_IMPL_START Amap_Man_t * Amap_ManStart(int nNodes)
DECLARATIONS ///.
Definition amapMan.c:45
Cube * p
Definition exorList.c:222
char * memset()