cloud-sat/workers/basekissat.hpp

38 lines
1.2 KiB
C++
Raw Normal View History

2022-08-30 15:42:35 +08:00
#include "basesolver.hpp"
2022-09-08 13:54:29 +08:00
#include "clause.hpp"
#include <boost/thread/thread.hpp>
#include <boost/lockfree/spsc_queue.hpp>
2022-08-30 15:42:35 +08:00
struct kissat;
2022-09-15 10:31:41 +08:00
struct cvec;
2022-08-30 15:42:35 +08:00
class basekissat : public basesolver {
public:
void parse_dimacs(char* filename);
void import_original_clause(preprocess *pre);
void diversity(int id);
void terminate();
int solve();
void get_model(vec<int> &model);
2022-08-31 09:16:12 +00:00
int get_reset_data();
void reset();
2022-09-08 13:54:29 +08:00
void export_clauses_to(vec<clause_store *> &clauses);
void import_clauses_from(vec<clause_store *> &clauses);
2022-09-15 10:31:41 +08:00
void broaden_export_limit();
void restrict_export_limit();
2022-08-30 15:42:35 +08:00
basekissat(int id, light *light);
~basekissat();
2022-12-04 23:30:36 +08:00
int x1 = 0, x2 = 0;
2022-08-30 15:42:35 +08:00
kissat* solver;
2022-09-08 13:54:29 +08:00
int good_clause_lbd = 0;
2022-12-04 23:30:36 +08:00
2022-09-08 13:54:29 +08:00
boost::lockfree::spsc_queue<clause_store*, boost::lockfree::capacity<1024000>> import_clause;
boost::lockfree::spsc_queue<clause_store*, boost::lockfree::capacity<1024000>> export_clause;
2022-09-15 10:31:41 +08:00
friend int cbkImportClause(void *, int *, cvec *);
friend int cbkExportClause(void *, int *, cvec *);
2022-12-04 23:30:36 +08:00
friend void cbkWaitSharing(void *);
2022-09-15 10:31:41 +08:00
std::ofstream outimport;
std::ofstream outexport;
std::ofstream outfree;
2022-08-30 15:42:35 +08:00
};