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

Function dump_vector_int_yaml

common/common.cpp:1183–1194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1181}
1182
1183void dump_vector_int_yaml(FILE * stream, const char * prop_name, const std::vector<int> & data) {
1184 if (data.empty()) {
1185 fprintf(stream, "%s:\n", prop_name);
1186 return;
1187 }
1188
1189 fprintf(stream, "%s: [", prop_name);
1190 for (size_t i = 0; i < data.size() - 1; ++i) {
1191 fprintf(stream, "%d, ", data[i]);
1192 }
1193 fprintf(stream, "%d]\n", data.back());
1194}
1195
1196void dump_string_yaml_multiline(FILE * stream, const char * prop_name, const char * data) {
1197 std::string data_str(data == NULL ? "" : data);

Callers 3

write_logfileFunction · 0.85
write_logfileFunction · 0.85

Calls 3

fprintfFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected