21 lines
396 B
C++
21 lines
396 B
C++
|
#ifndef _clause_hpp_INCLUDED
|
||
|
#define _clause_hpp_INCLUDED
|
||
|
|
||
|
struct clause_store {
|
||
|
int size, lbd;
|
||
|
int *data;
|
||
|
atomic<int> refs;
|
||
|
clause_store(int sz) {
|
||
|
size = sz;
|
||
|
data = (int*) malloc(sizeof(int) * sz);
|
||
|
lbd = 0;
|
||
|
refs = 1;
|
||
|
}
|
||
|
void free_clause() {
|
||
|
int ref = refs.fetch_sub(1);
|
||
|
if (ref <= 1)
|
||
|
free(data);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
#endif
|