MCPcopy Create free account
hub / github.com/Tencent/TNN / ParseProtoFile

Function ParseProtoFile

tools/quantization/quantize.cc:48–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void ParseProtoFile(char* proto_buffer, size_t proto_buffer_length) {
49 // remove all the " and \n character
50 size_t fill = 0;
51 for (size_t i = 0; i < proto_buffer_length; ++i) {
52 if (proto_buffer[i] != '\"' && proto_buffer[i] != '\n') {
53 proto_buffer[fill++] = proto_buffer[i];
54 }
55 }
56 proto_buffer[fill] = '\0';
57}
58
59int InitModelConfig(ModelConfig& model_config, std::string proto_file, std::string model_file) {
60 FILE* fp = fopen(proto_file.c_str(), "r");

Callers 1

InitModelConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected