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

Function parse_double_list

server/src/server/server_main.cpp:56–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55static bool parse_double_list(const char * value, std::vector<double> & out) {
56 out.clear();
57 if (!value || !*value) return false;
58 const char * p = value;
59 while (*p) {
60 char * end = nullptr;
61 double v = std::strtod(p, &end);
62 if (end == p) return false;
63 out.push_back(v);
64 if (*end == '\0') return true;
65 if (*end != ',') return false;
66 p = end + 1;
67 if (!*p) return false;
68 }
69 return !out.empty();
70}
71
72static void print_usage(const char * prog) {
73 std::fprintf(stderr,
74 "Usage: %s <model.gguf> [options]\n"

Callers 1

server_main.cppFile · 0.85

Calls 2

clearMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected