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

Function dump_vector_float_yaml

common/common.cpp:1170–1181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1168}
1169
1170void dump_vector_float_yaml(FILE * stream, const char * prop_name, const std::vector<float> & data) {
1171 if (data.empty()) {
1172 fprintf(stream, "%s:\n", prop_name);
1173 return;
1174 }
1175
1176 fprintf(stream, "%s: [", prop_name);
1177 for (size_t i = 0; i < data.size() - 1; ++i) {
1178 fprintf(stream, "%e, ", data[i]);
1179 }
1180 fprintf(stream, "%e]\n", data.back());
1181}
1182
1183void dump_vector_int_yaml(FILE * stream, const char * prop_name, const std::vector<int> & data) {
1184 if (data.empty()) {

Callers 2

write_logfileFunction · 0.85

Calls 3

fprintfFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected