ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
Gluco::OccLists< Idx, Vec, Deleted > Class Template Reference

#include <SolverTypes.h>

Public Member Functions

 OccLists (const Deleted &d)
 
void init (const Idx &idx)
 
Vec & operator[] (const Idx &idx)
 
Vec & lookup (const Idx &idx)
 
void cleanAll ()
 
void clean (const Idx &idx)
 
void smudge (const Idx &idx)
 
void clear (bool free=true)
 

Detailed Description

template<class Idx, class Vec, class Deleted>
class Gluco::OccLists< Idx, Vec, Deleted >

Definition at line 284 of file SolverTypes.h.

Constructor & Destructor Documentation

◆ OccLists()

template<class Idx, class Vec, class Deleted>
Gluco::OccLists< Idx, Vec, Deleted >::OccLists ( const Deleted & d)
inline

Definition at line 292 of file SolverTypes.h.

292: deleted(d) {}

Member Function Documentation

◆ clean()

template<class Idx, class Vec, class Deleted>
void Gluco::OccLists< Idx, Vec, Deleted >::clean ( const Idx & idx)

Definition at line 334 of file SolverTypes.h.

335{
336 Vec& vec = occs[toInt(idx)];
337 int i, j;
338 for (i = j = 0; i < vec.size(); i++)
339 if (!deleted(vec[i]))
340 vec[j++] = vec[i];
341 vec.shrink(i - j);
342 dirty[toInt(idx)] = 0;
343}
int toInt(Var v)
Definition SolverTypes.h:74
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanAll()

template<class Idx, class Vec, class Deleted>
void Gluco::OccLists< Idx, Vec, Deleted >::cleanAll ( )

Definition at line 323 of file SolverTypes.h.

324{
325 for (int i = 0; i < dirties.size(); i++)
326 // Dirties may contain duplicates so check here if a variable is already cleaned:
327 if (dirty[toInt(dirties[i])])
328 clean(dirties[i]);
329 dirties.clear();
330}
void clean(const Idx &idx)
Here is the call graph for this function:

◆ clear()

template<class Idx, class Vec, class Deleted>
void Gluco::OccLists< Idx, Vec, Deleted >::clear ( bool free = true)
inline

Definition at line 308 of file SolverTypes.h.

308 {
309 if(free){
310 occs .clear(free);
311 dirty .clear(free);
312 dirties.clear(free);
313 } else {
314 occs .shrink_(occs .size());
315 dirty .shrink_(dirty .size());
316 dirties.shrink_(dirties.size());
317 }
318 }
Here is the call graph for this function:

◆ init()

template<class Idx, class Vec, class Deleted>
void Gluco::OccLists< Idx, Vec, Deleted >::init ( const Idx & idx)
inline

Definition at line 294 of file SolverTypes.h.

294{ occs.growTo(toInt(idx)+1); dirty.growTo(toInt(idx)+1, 0); }
Here is the call graph for this function:

◆ lookup()

template<class Idx, class Vec, class Deleted>
Vec & Gluco::OccLists< Idx, Vec, Deleted >::lookup ( const Idx & idx)
inline

Definition at line 297 of file SolverTypes.h.

297{ if (dirty[toInt(idx)]) clean(idx); return occs[toInt(idx)]; }
Here is the call graph for this function:

◆ operator[]()

template<class Idx, class Vec, class Deleted>
Vec & Gluco::OccLists< Idx, Vec, Deleted >::operator[] ( const Idx & idx)
inline

Definition at line 296 of file SolverTypes.h.

296{ return occs[toInt(idx)]; }
Here is the call graph for this function:

◆ smudge()

template<class Idx, class Vec, class Deleted>
void Gluco::OccLists< Idx, Vec, Deleted >::smudge ( const Idx & idx)
inline

Definition at line 301 of file SolverTypes.h.

301 {
302 if (dirty[toInt(idx)] == 0){
303 dirty[toInt(idx)] = 1;
304 dirties.push(idx);
305 }
306 }
Here is the call graph for this function:

The documentation for this class was generated from the following file: