#ifndef _light_hpp_INCLUDED #define _light_hpp_INCLUDED #include "utils/paras.hpp" #include "preprocess.hpp" #include #include #include typedef long long ll; class basesolver; class sharer; extern std::atomic terminated; extern std::mutex mtx; struct thread_inf{ int id, inf; bool operator < ( const thread_inf &other ) const { return inf > other.inf; } }; struct light { public: light(); ~light(); char *filename; paras *opt; preprocess *pre; vec workers; vec sharers; int finalResult; int winner; int maxtime; std::atomic globalEnding; void arg_parse(int argc, char **argv); void init_workers(); void diversity_workers(); void parse_input(); int run(); void share(); int solve(); void terminate_workers(); void print_model(); }; #endif