abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vecMem.h File Reference
#include <stdio.h>

Go to the source code of this file.

Data Structures

struct  Vec_Mem_t_
 

Macros

#define Vec_MemForEachEntry(p, pEntry, i)   for ( i = 0; (i < Vec_MemEntryNum(p)) && ((pEntry) = Vec_MemReadEntry(p, i)); i++ )
 MACRO DEFINITIONS ///. More...
 

Typedefs

typedef
typedefABC_NAMESPACE_HEADER_START
struct Vec_Mem_t_ 
Vec_Mem_t
 INCLUDES ///. More...
 

Functions

static Vec_Mem_tVec_MemAlloc (int nEntrySize, int LogPageSze)
 FUNCTION DEFINITIONS ///. More...
 
static void Vec_MemFree (Vec_Mem_t *p)
 
static void Vec_MemFreeP (Vec_Mem_t **p)
 
static Vec_Mem_tVec_MemDup (Vec_Mem_t *pVec)
 
static void Vec_MemFill (Vec_Mem_t *pVec, int nEntries)
 
static void Vec_MemClean (Vec_Mem_t *pVec, int nEntries)
 
static int Vec_MemEntrySize (Vec_Mem_t *p)
 
static int Vec_MemEntryNum (Vec_Mem_t *p)
 
static int Vec_MemPageSize (Vec_Mem_t *p)
 
static int Vec_MemPageNum (Vec_Mem_t *p)
 
static double Vec_MemMemory (Vec_Mem_t *p)
 
static wordVec_MemReadEntry (Vec_Mem_t *p, int i)
 
static wordVec_MemReadEntryLast (Vec_Mem_t *p)
 
static void Vec_MemWriteEntry (Vec_Mem_t *p, int i, word *pEntry)
 
static wordVec_MemGetEntry (Vec_Mem_t *p, int i)
 
static void Vec_MemSetEntry (Vec_Mem_t *p, int i, word *pEntry)
 
static void Vec_MemPush (Vec_Mem_t *p, word *pEntry)
 
static void Vec_MemShrink (Vec_Mem_t *p, int nEntriesNew)
 
static void Vec_MemDumpDigit (FILE *pFile, int HexDigit)
 
static void Vec_MemDump (FILE *pFile, Vec_Mem_t *pVec)
 
static void Vec_MemHashAlloc (Vec_Mem_t *p, int nTableSize)
 
static void Vec_MemHashFree (Vec_Mem_t *p)
 
static unsigned Vec_MemHashKey (Vec_Mem_t *p, word *pEntry)
 
static int * Vec_MemHashLookup (Vec_Mem_t *p, word *pEntry)
 
static void Vec_MemHashResize (Vec_Mem_t *p)
 
static int Vec_MemHashInsert (Vec_Mem_t *p, word *pEntry)
 
static Vec_Mem_tVec_MemAllocForTT (int nVars, int fCompl)
 
static void Vec_MemAddMuxTT (Vec_Mem_t *p, int nVars)
 
static void Vec_MemDumpTruthTables (Vec_Mem_t *p, char *pName, int nLutSize)
 

Macro Definition Documentation

#define Vec_MemForEachEntry (   p,
  pEntry,
 
)    for ( i = 0; (i < Vec_MemEntryNum(p)) && ((pEntry) = Vec_MemReadEntry(p, i)); i++ )

MACRO DEFINITIONS ///.

Definition at line 68 of file vecMem.h.

Typedef Documentation

typedef typedefABC_NAMESPACE_HEADER_START struct Vec_Mem_t_ Vec_Mem_t

INCLUDES ///.

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

FileName [vecMem.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Resizable arrays.]

Synopsis [Resizable array of memory pieces.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - July 20, 2012.]

Revision [

Id:
vecMem.h,v 1.00 2012/07/20 00:00:00 alanmi Exp

]PARAMETERS ///BASIC TYPES ///

Definition at line 50 of file vecMem.h.

Function Documentation

static void Vec_MemAddMuxTT ( Vec_Mem_t p,
int  nVars 
)
inlinestatic

Definition at line 394 of file vecMem.h.

395 {
396  int Value, nWords = (nVars <= 6 ? 1 : (1 << (nVars - 6)));
397  word * uTruth = ABC_ALLOC( word, nWords );
398  memset( uTruth, 0xCA, sizeof(word) * nWords );
399  Value = Vec_MemHashInsert( p, uTruth ); assert( Value == 2 );
400  ABC_FREE( uTruth );
401 }
char * memset()
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
int nWords
Definition: abcNpn.c:127
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define ABC_FREE(obj)
Definition: abc_global.h:232
static int Vec_MemHashInsert(Vec_Mem_t *p, word *pEntry)
Definition: vecMem.h:351
#define assert(ex)
Definition: util_old.h:213
static Vec_Mem_t* Vec_MemAlloc ( int  nEntrySize,
int  LogPageSze 
)
inlinestatic

FUNCTION DEFINITIONS ///.

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

Synopsis [Allocates a memory vector.]

Description [Entry size is in terms of 8-byte words. Page size is log2 of the number of entries on one page.]

SideEffects []

SeeAlso []

Definition at line 87 of file vecMem.h.

88 {
89  Vec_Mem_t * p;
90  p = ABC_CALLOC( Vec_Mem_t, 1 );
91  p->nEntrySize = nEntrySize;
92  p->LogPageSze = LogPageSze;
93  p->PageMask = (1 << p->LogPageSze) - 1;
94  p->iPage = -1;
95  return p;
96 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Mem_t_ Vec_Mem_t
DECLARATIONS ///.
Definition: utilMem.c:35
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
static Vec_Mem_t* Vec_MemAllocForTT ( int  nVars,
int  fCompl 
)
inlinestatic

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

Synopsis [Allocates memory vector for storing truth tables.]

Description []

SideEffects []

SeeAlso []

Definition at line 378 of file vecMem.h.

379 {
380  int Value, nWords = (nVars <= 6 ? 1 : (1 << (nVars - 6)));
381  word * uTruth = ABC_ALLOC( word, nWords );
382  Vec_Mem_t * vTtMem = Vec_MemAlloc( nWords, 12 );
383  Vec_MemHashAlloc( vTtMem, 10000 );
384  memset( uTruth, 0x00, sizeof(word) * nWords );
385  Value = Vec_MemHashInsert( vTtMem, uTruth ); assert( Value == 0 );
386  if ( fCompl )
387  memset( uTruth, 0x55, sizeof(word) * nWords );
388  else
389  memset( uTruth, 0xAA, sizeof(word) * nWords );
390  Value = Vec_MemHashInsert( vTtMem, uTruth ); assert( Value == 1 );
391  ABC_FREE( uTruth );
392  return vTtMem;
393 }
char * memset()
static void Vec_MemHashAlloc(Vec_Mem_t *p, int nTableSize)
Definition: vecMem.h:305
static Vec_Mem_t * Vec_MemAlloc(int nEntrySize, int LogPageSze)
FUNCTION DEFINITIONS ///.
Definition: vecMem.h:87
typedefABC_NAMESPACE_IMPL_START struct Vec_Mem_t_ Vec_Mem_t
DECLARATIONS ///.
Definition: utilMem.c:35
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
int nWords
Definition: abcNpn.c:127
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define ABC_FREE(obj)
Definition: abc_global.h:232
static int Vec_MemHashInsert(Vec_Mem_t *p, word *pEntry)
Definition: vecMem.h:351
#define assert(ex)
Definition: util_old.h:213
static void Vec_MemClean ( Vec_Mem_t pVec,
int  nEntries 
)
inlinestatic

Definition at line 132 of file vecMem.h.

133 {
134 }
static void Vec_MemDump ( FILE *  pFile,
Vec_Mem_t pVec 
)
inlinestatic

Definition at line 279 of file vecMem.h.

280 {
281  word * pEntry;
282  int i, w, d;
283  if ( pFile == stdout )
284  printf( "Memory vector has %d entries: \n", Vec_MemEntryNum(pVec) );
285  Vec_MemForEachEntry( pVec, pEntry, i )
286  {
287  for ( w = pVec->nEntrySize - 1; w >= 0; w-- )
288  for ( d = 15; d >= 0; d-- )
289  Vec_MemDumpDigit( pFile, (int)(pEntry[w] >> (d<<2)) & 15 );
290  fprintf( pFile, "\n" );
291  }
292 }
#define Vec_MemForEachEntry(p, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecMem.h:68
static int Vec_MemEntryNum(Vec_Mem_t *p)
Definition: vecMem.h:151
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static void Vec_MemDumpDigit(FILE *pFile, int HexDigit)
Definition: vecMem.h:271
static void Vec_MemDumpDigit ( FILE *  pFile,
int  HexDigit 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 271 of file vecMem.h.

272 {
273  assert( HexDigit >= 0 && HexDigit < 16 );
274  if ( HexDigit < 10 )
275  fprintf( pFile, "%d", HexDigit );
276  else
277  fprintf( pFile, "%c", 'A' + HexDigit-10 );
278 }
#define assert(ex)
Definition: util_old.h:213
static void Vec_MemDumpTruthTables ( Vec_Mem_t p,
char *  pName,
int  nLutSize 
)
inlinestatic

Definition at line 402 of file vecMem.h.

403 {
404  FILE * pFile;
405  char pFileName[1000];
406  sprintf( pFileName, "tt_%s_%02d.txt", pName ? pName : NULL, nLutSize );
407  pFile = pName ? fopen( pFileName, "wb" ) : stdout;
408  Vec_MemDump( pFile, p );
409  if ( pFile != stdout )
410  fclose( pFile );
411  printf( "Dumped %d %d-var truth tables into file \"%s\" (%.2f MB).\n",
412  Vec_MemEntryNum(p), nLutSize, pName ? pFileName : "stdout",
413  8.0 * Vec_MemEntryNum(p) * Vec_MemEntrySize(p) / (1 << 20) );
414 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_MemEntrySize(Vec_Mem_t *p)
Definition: vecMem.h:147
static int Vec_MemEntryNum(Vec_Mem_t *p)
Definition: vecMem.h:151
char * sprintf()
static void Vec_MemDump(FILE *pFile, Vec_Mem_t *pVec)
Definition: vecMem.h:279
static Vec_Mem_t* Vec_MemDup ( Vec_Mem_t pVec)
inlinestatic

Definition at line 112 of file vecMem.h.

113 {
114  Vec_Mem_t * p = NULL;
115  return p;
116 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Mem_t_ Vec_Mem_t
DECLARATIONS ///.
Definition: utilMem.c:35
static int Vec_MemEntryNum ( Vec_Mem_t p)
inlinestatic

Definition at line 151 of file vecMem.h.

152 {
153  return p->nEntries;
154 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_MemEntrySize ( Vec_Mem_t p)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 147 of file vecMem.h.

148 {
149  return p->nEntrySize;
150 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_MemFill ( Vec_Mem_t pVec,
int  nEntries 
)
inlinestatic

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

Synopsis [Duplicates the integer array.]

Description []

SideEffects []

SeeAlso []

Definition at line 129 of file vecMem.h.

130 {
131 }
static void Vec_MemFree ( Vec_Mem_t p)
inlinestatic

Definition at line 97 of file vecMem.h.

98 {
99  int i;
100  for ( i = 0; i <= p->iPage; i++ )
101  ABC_FREE( p->ppPages[i] );
102  ABC_FREE( p->ppPages );
103  ABC_FREE( p );
104 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_MemFreeP ( Vec_Mem_t **  p)
inlinestatic

Definition at line 105 of file vecMem.h.

106 {
107  if ( *p == NULL )
108  return;
109  Vec_MemFree( *p );
110  *p = NULL;
111 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_MemFree(Vec_Mem_t *p)
Definition: vecMem.h:97
static word* Vec_MemGetEntry ( Vec_Mem_t p,
int  i 
)
inlinestatic

Definition at line 206 of file vecMem.h.

207 {
208  assert( i >= 0 );
209  if ( i >= p->nEntries )
210  {
211  int k, iPageNew = (i >> p->LogPageSze);
212  if ( p->iPage < iPageNew )
213  {
214  // realloc page pointers if needed
215  if ( iPageNew >= p->nPageAlloc )
216  p->ppPages = ABC_REALLOC( word *, p->ppPages, (p->nPageAlloc = p->nPageAlloc ? 2 * p->nPageAlloc : iPageNew + 32) );
217  // allocate new pages if needed
218  for ( k = p->iPage + 1; k <= iPageNew; k++ )
219  p->ppPages[k] = ABC_ALLOC( word, p->nEntrySize * (1 << p->LogPageSze) );
220  // update page counter
221  p->iPage = iPageNew;
222  }
223  // update entry counter
224  p->nEntries = i + 1;
225  }
226  return Vec_MemReadEntry( p, i );
227 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_REALLOC(type, obj, num)
Definition: abc_global.h:233
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define assert(ex)
Definition: util_old.h:213
static word * Vec_MemReadEntry(Vec_Mem_t *p, int i)
Definition: vecMem.h:191
static void Vec_MemHashAlloc ( Vec_Mem_t p,
int  nTableSize 
)
inlinestatic

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

Synopsis [Hashing entries in the memory vector.]

Description []

SideEffects []

SeeAlso []

Definition at line 305 of file vecMem.h.

306 {
307  assert( p->vTable == NULL && p->vNexts == NULL );
308  p->vTable = Vec_IntStartFull( Abc_PrimeCudd(nTableSize) );
309  p->vNexts = Vec_IntAlloc( nTableSize );
310 }
static int Abc_PrimeCudd(unsigned int p)
Definition: abc_global.h:383
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static Vec_Int_t * Vec_IntStartFull(int nSize)
Definition: vecInt.h:119
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
#define assert(ex)
Definition: util_old.h:213
static void Vec_MemHashFree ( Vec_Mem_t p)
inlinestatic

Definition at line 311 of file vecMem.h.

312 {
313  if ( p == NULL )
314  return;
315  Vec_IntFreeP( &p->vTable );
316  Vec_IntFreeP( &p->vNexts );
317 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
static int Vec_MemHashInsert ( Vec_Mem_t p,
word pEntry 
)
static

Definition at line 351 of file vecMem.h.

352 {
353  int * pSpot;
354  if ( p->nEntries > Vec_IntSize(p->vTable) )
355  Vec_MemHashResize( p );
356  pSpot = Vec_MemHashLookup( p, pEntry );
357  if ( *pSpot != -1 )
358  return *pSpot;
359  *pSpot = Vec_IntSize(p->vNexts);
360  Vec_IntPush( p->vNexts, -1 );
361  Vec_MemPush( p, pEntry );
362  assert( p->nEntries == Vec_IntSize(p->vNexts) );
363  return Vec_IntSize(p->vNexts) - 1;
364 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_MemHashResize(Vec_Mem_t *p)
Definition: vecMem.h:336
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
#define assert(ex)
Definition: util_old.h:213
static int * Vec_MemHashLookup(Vec_Mem_t *p, word *pEntry)
Definition: vecMem.h:328
static void Vec_MemPush(Vec_Mem_t *p, word *pEntry)
Definition: vecMem.h:233
static unsigned Vec_MemHashKey ( Vec_Mem_t p,
word pEntry 
)
inlinestatic

Definition at line 318 of file vecMem.h.

319 {
320  static int s_Primes[8] = { 1699, 4177, 5147, 5647, 6343, 7103, 7873, 8147 };
321  int i, nData = 2 * p->nEntrySize;
322  unsigned * pData = (unsigned *)pEntry;
323  unsigned uHash = 0;
324  for ( i = 0; i < nData; i++ )
325  uHash += pData[i] * s_Primes[i & 0x7];
326  return uHash % Vec_IntSize(p->vTable);
327 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int s_Primes[MAX_PRIMES]
Definition: fxuPair.c:30
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int* Vec_MemHashLookup ( Vec_Mem_t p,
word pEntry 
)
static

Definition at line 328 of file vecMem.h.

329 {
330  int * pSpot = Vec_IntEntryP( p->vTable, Vec_MemHashKey(p, pEntry) );
331  for ( ; *pSpot != -1; pSpot = Vec_IntEntryP(p->vNexts, *pSpot) )
332  if ( !memcmp( Vec_MemReadEntry(p, *pSpot), pEntry, sizeof(word) * p->nEntrySize ) ) // equal
333  return pSpot;
334  return pSpot;
335 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static unsigned Vec_MemHashKey(Vec_Mem_t *p, word *pEntry)
Definition: vecMem.h:318
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
int memcmp()
static int * Vec_IntEntryP(Vec_Int_t *p, int i)
Definition: vecInt.h:417
static word * Vec_MemReadEntry(Vec_Mem_t *p, int i)
Definition: vecMem.h:191
static void Vec_MemHashResize ( Vec_Mem_t p)
static

Definition at line 336 of file vecMem.h.

337 {
338  word * pEntry;
339  int i, * pSpot;
340  Vec_IntFill( p->vTable, Abc_PrimeCudd(2 * Vec_IntSize(p->vTable)), -1 );
341  Vec_IntClear( p->vNexts );
342  Vec_MemForEachEntry( p, pEntry, i )
343  {
344  pSpot = Vec_MemHashLookup( p, pEntry );
345  assert( *pSpot == -1 );
346  *pSpot = Vec_IntSize(p->vNexts);
347  Vec_IntPush( p->vNexts, -1 );
348  }
349  assert( p->nEntries == Vec_IntSize(p->vNexts) );
350 }
static int Abc_PrimeCudd(unsigned int p)
Definition: abc_global.h:383
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define Vec_MemForEachEntry(p, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecMem.h:68
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Definition: bblif.c:356
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
#define assert(ex)
Definition: util_old.h:213
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
static int * Vec_MemHashLookup(Vec_Mem_t *p, word *pEntry)
Definition: vecMem.h:328
static double Vec_MemMemory ( Vec_Mem_t p)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 175 of file vecMem.h.

176 {
177  return (double)sizeof(word) * p->nEntrySize * (1 << p->LogPageSze) * (p->iPage + 1) + (double)sizeof(word *) * p->nPageAlloc + (double)sizeof(Vec_Mem_t);
178 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
typedefABC_NAMESPACE_HEADER_START struct Vec_Mem_t_ Vec_Mem_t
INCLUDES ///.
Definition: vecMem.h:50
static int Vec_MemPageNum ( Vec_Mem_t p)
inlinestatic

Definition at line 159 of file vecMem.h.

160 {
161  return p->iPage+1;
162 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_MemPageSize ( Vec_Mem_t p)
inlinestatic

Definition at line 155 of file vecMem.h.

156 {
157  return p->LogPageSze;
158 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_MemPush ( Vec_Mem_t p,
word pEntry 
)
inlinestatic

Definition at line 233 of file vecMem.h.

234 {
235  word * pPlace = Vec_MemGetEntry( p, p->nEntries );
236  memmove( pPlace, pEntry, sizeof(word) * p->nEntrySize );
237 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
char * memmove()
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static word * Vec_MemGetEntry(Vec_Mem_t *p, int i)
Definition: vecMem.h:206
static word* Vec_MemReadEntry ( Vec_Mem_t p,
int  i 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 191 of file vecMem.h.

192 {
193  assert( i >= 0 && i < p->nEntries );
194  return p->ppPages[i >> p->LogPageSze] + p->nEntrySize * (i & p->PageMask);
195 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define assert(ex)
Definition: util_old.h:213
static word* Vec_MemReadEntryLast ( Vec_Mem_t p)
inlinestatic

Definition at line 196 of file vecMem.h.

197 {
198  assert( p->nEntries > 0 );
199  return Vec_MemReadEntry( p, p->nEntries-1 );
200 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define assert(ex)
Definition: util_old.h:213
static word * Vec_MemReadEntry(Vec_Mem_t *p, int i)
Definition: vecMem.h:191
static void Vec_MemSetEntry ( Vec_Mem_t p,
int  i,
word pEntry 
)
inlinestatic

Definition at line 228 of file vecMem.h.

229 {
230  word * pPlace = Vec_MemGetEntry( p, i );
231  memmove( pPlace, pEntry, sizeof(word) * p->nEntrySize );
232 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
char * memmove()
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static word * Vec_MemGetEntry(Vec_Mem_t *p, int i)
Definition: vecMem.h:206
static void Vec_MemShrink ( Vec_Mem_t p,
int  nEntriesNew 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 250 of file vecMem.h.

251 {
252  int i, iPageOld = p->iPage;
253  assert( nEntriesNew <= p->nEntries );
254  p->nEntries = nEntriesNew;
255  p->iPage = (nEntriesNew >> p->LogPageSze);
256  for ( i = p->iPage + 1; i <= iPageOld; i++ )
257  ABC_FREE( p->ppPages[i] );
258 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_FREE(obj)
Definition: abc_global.h:232
#define assert(ex)
Definition: util_old.h:213
static void Vec_MemWriteEntry ( Vec_Mem_t p,
int  i,
word pEntry 
)
inlinestatic

Definition at line 201 of file vecMem.h.

202 {
203  word * pPlace = Vec_MemReadEntry( p, i );
204  memmove( pPlace, pEntry, sizeof(word) * p->nEntrySize );
205 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
char * memmove()
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static word * Vec_MemReadEntry(Vec_Mem_t *p, int i)
Definition: vecMem.h:191