MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / parse_list

Function parse_list

examples/batched-bench/batched-bench.cpp:11–29  ·  view source on GitHub ↗

mutates the input string

Source from the content-addressed store, hash-verified

9
10// mutates the input string
11static std::vector<int> parse_list(char * p) {
12 std::vector<int> ret;
13
14 char * q = p;
15
16 while (*p) {
17 if (*p == ',') {
18 *p = '\0';
19 ret.push_back(std::atoi(q));
20 q = p + 1;
21 }
22
23 ++p;
24 }
25
26 ret.push_back(std::atoi(q));
27
28 return ret;
29}
30
31int main(int argc, char ** argv) {
32 gpt_params params;

Callers 1

mainFunction · 0.85

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected