28 unsigned thread_nr = 0;
29 bool thread_nr_set =
false;
31 if(!val.empty() && isdigit(val[0]) && val.find(
":") != std::string::npos)
33 std::string nr = val.substr(0, val.find(
":"));
36 val.erase(0, nr.size() + 1);
39 if(val.rfind(
":") != std::string::npos)
41 std::string
id = val.substr(0, val.rfind(
":"));
42 std::string uw_string = val.substr(val.rfind(
":") + 1);
61 for(
auto &element : unwindset)
63 std::vector<std::string> unwindset_elements =
66 for(
auto &element : unwindset_elements)
78 thread_loop_map.find(std::pair<irep_idt, unsigned>(loop_id, thread_nr));
98 std::ifstream
file(file_name);
102 throw "cannot open file "+file_name;
104 std::stringstream buffer;
105 buffer <<
file.rdbuf();
107 std::vector<std::string> unwindset_elements =
110 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)