MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / split_lines

Function split_lines

examples/embedding/embedding.cpp:14–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#endif
13
14static std::vector<std::string> split_lines(const std::string & s, const std::string & separator = "\n") {
15 std::vector<std::string> lines;
16 size_t start = 0;
17 size_t end = s.find(separator);
18
19 while (end != std::string::npos) {
20 lines.push_back(s.substr(start, end - start));
21 start = end + separator.length();
22 end = s.find(separator, start);
23 }
24
25 lines.push_back(s.substr(start)); // Add the last part
26
27 return lines;
28}
29
30static void batch_add_seq(llama_batch & batch, const std::vector<int32_t> & tokens, llama_seq_id seq_id) {
31 size_t n_tokens = tokens.size();

Callers 1

mainFunction · 0.85

Calls 3

findMethod · 0.80
lengthMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected