MCPcopy Create free account
hub / github.com/docling-project/docling-parse / parse_thread_counts

Function parse_thread_counts

app/run_scaling.cpp:134–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132 }
133
134 std::vector<int> parse_thread_counts(const std::string& raw)
135 {
136 std::vector<int> values;
137 std::stringstream ss(raw);
138 std::string token;
139
140 while(std::getline(ss, token, ','))
141 {
142 if(token.empty())
143 {
144 continue;
145 }
146
147 int value = std::stoi(token);
148 if(value <= 0)
149 {
150 throw std::runtime_error("--threads must contain positive integers");
151 }
152 values.push_back(value);
153 }
154
155 if(values.empty())
156 {
157 throw std::runtime_error("--threads must contain at least one value");
158 }
159
160 return values;
161 }
162
163 bool parse_bool(const std::string& raw)
164 {

Callers 1

parse_cliFunction · 0.85

Calls 2

emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected