MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / format

Function format

subprojects/llama.cpp/src/llama-impl.cpp:86–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86std::string format(const char * fmt, ...) {
87 va_list ap;
88 va_list ap2;
89 va_start(ap, fmt);
90 va_copy(ap2, ap);
91 int size = vsnprintf(NULL, 0, fmt, ap);
92 GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT
93 std::vector<char> buf(size + 1);
94 int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2);
95 GGML_ASSERT(size2 == size);
96 va_end(ap2);
97 va_end(ap);
98 return std::string(buf.data(), size);
99}
100
101std::string llama_format_tensor_shape(const std::vector<int64_t> & ne) {
102 char buf[256];

Callers 15

build.gradle.ktsFile · 0.85
llama_tensor_weightMethod · 0.85
weight_buft_supportedFunction · 0.85
make_cpu_buft_listFunction · 0.85
make_gpu_buft_listFunction · 0.85
load_hparamsMethod · 0.85
load_tensorsMethod · 0.85
buft_supportedFunction · 0.85
select_buftFunction · 0.85
llama_contextMethod · 0.85

Calls 2

stringClass · 0.85
dataMethod · 0.45

Tested by

no test coverage detected