26 unsigned thread_nr = 0;
27 bool thread_nr_set =
false;
29 if(!val.empty() && isdigit(val[0]) && val.find(
":") != std::string::npos)
31 std::string nr = val.substr(0, val.find(
":"));
34 val.erase(0, nr.size() + 1);
37 if(val.rfind(
":") != std::string::npos)
39 std::string
id = val.substr(0, val.rfind(
":"));
40 std::string uw_string = val.substr(val.rfind(
":") + 1);
59 for(
auto &element : unwindset)
61 std::vector<std::string> unwindset_elements =
64 for(
auto &element : unwindset_elements)
76 thread_loop_map.find(std::pair<irep_idt, unsigned>(loop_id, thread_nr));
96 std::ifstream
file(file_name);
100 throw "cannot open file "+file_name;
102 std::stringstream buffer;
103 buffer <<
file.rdbuf();
105 std::vector<std::string> unwindset_elements =
108 for(
auto &element : unwindset_elements)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void parse_unwind(const std::string &unwind)
optionalt< unsigned > global_limit
void parse_unwindset(const std::list< std::string > &unwindset)
void parse_unwindset_file(const std::string &file_name)
thread_loop_mapt thread_loop_map
optionalt< unsigned > get_limit(const irep_idt &loop, unsigned thread_id) const
void parse_unwindset_one_loop(std::string loop_limit)
nonstd::optional< T > optionalt
unsigned unsafe_string2unsigned(const std::string &str, int base)
void split_string(const std::string &s, char delim, std::vector< std::string > &result, bool strip, bool remove_empty)
std::wstring widen(const char *s)