ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
cadical_occs.cpp
Go to the documentation of this file.
1#include "global.h"
2
3#include "internal.hpp"
4
6
7namespace CaDiCaL {
8
9/*------------------------------------------------------------------------*/
10
11// Occurrence lists.
12
14 if (otab.size () < 2 * vsize)
15 otab.resize (2 * vsize, Occs ());
16 LOG ("initialized occurrence lists");
17}
18
22 LOG ("reset occurrence lists");
23}
24
27 for (auto &occ : otab)
28 occ.clear ();
29 LOG ("clear occurrence lists");
30}
31
32/*------------------------------------------------------------------------*/
33
34// One-sided occurrence counter (each literal has its own counter).
35
37 CADICAL_assert (ntab.empty ());
38 if (ntab.size () < 2 * vsize)
39 ntab.resize (2 * vsize, 0);
40 LOG ("initialized two-sided occurrence counters");
41}
42
44 CADICAL_assert (!ntab.empty ());
45 for (auto &nt : ntab)
46 nt = 0;
47 LOG ("clear two-sided occurrence counters");
48}
49
51 CADICAL_assert (!max_var || !ntab.empty ());
53 LOG ("reset two-sided occurrence counters");
54}
55
56} // namespace CaDiCaL
57
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CADICAL_assert(ignore)
Definition global.h:14
#define LOG(...)
vector< Clause * > Occs
Definition occs.hpp:18
void erase_vector(std::vector< T > &v)
Definition util.hpp:90
vector< int64_t > ntab
Definition internal.hpp:239
bool occurring() const
Definition internal.hpp:461
vector< Occs > otab
Definition internal.hpp:236