MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / parse_csv

Function parse_csv

server/test/bench_laguna_ttft.cpp:34–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32using namespace luce::common;
33
34static std::vector<int> parse_csv(const std::string & s, std::vector<int> dflt) {
35 if (s.empty()) return dflt;
36 std::vector<int> out;
37 size_t start = 0;
38 while (start < s.size()) {
39 size_t comma = s.find(',', start);
40 std::string tok = s.substr(start, comma == std::string::npos ? std::string::npos : comma - start);
41 if (!tok.empty()) out.push_back(std::atoi(tok.c_str()));
42 if (comma == std::string::npos) break;
43 start = comma + 1;
44 }
45 return out;
46}
47
48// Forward step lives in src/laguna_target_graph.cpp::laguna_step(); this
49// bench just times chunked prefill on top of it.

Callers 1

mainFunction · 0.85

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected