39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
#ifndef _paras_hpp_INCLUDED
|
|
#define _paras_hpp_INCLUDED
|
|
|
|
#include <cstring>
|
|
#include <unordered_map>
|
|
|
|
// name, type, default, low, high, comments
|
|
#define PARAS \
|
|
PARA( mode , int , 0 , 0 , 2 , "SAT=1, UNSAT=2") \
|
|
PARA( reset , int , 0 , 0 , 1 , "Dynamically reseting") \
|
|
PARA( reset_time , int , 10 , 1 , 1e5 , "Reseting base interval (seconds)") \
|
|
PARA( share , int , 0 , 0 , 1 , "Sharing learnt clauses") \
|
|
PARA( share_intv , int , 500000, 0 , 1e9 , "Sharing interval (microseconds)") \
|
|
PARA( share_lits , int , 1500 , 0 , 1e6 , "Sharing lits (per every #share_intv seconds)") \
|
|
PARA( simplify , int , 1 , 0 , 1 , "Use Simplify (only preprocess)") \
|
|
PARA( times , double , 5000 , 0 , 1e8 , "Cutoff time") \
|
|
PARA( threads , int , 32 , 1 , 128 , "Thread number") \
|
|
|
|
|
|
struct paras
|
|
{
|
|
#define PARA(N, T, D, L, H, C) \
|
|
T N = D;
|
|
PARAS
|
|
#undef PARA
|
|
|
|
std::unordered_map<std::string, int> map_int;
|
|
std::unordered_map<std::string, double> map_double;
|
|
|
|
void init_paras ();
|
|
void sync_paras ();
|
|
void print_change ();
|
|
void set_para (char *arg, int val);
|
|
void set_para (char *arg, double val);
|
|
};
|
|
|
|
#define OPT(N) (opt->N)
|
|
|
|
#endif |