MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ParseResponseToBuf

Method ParseResponseToBuf

serving/processor/serving/message_coding.cc:62–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62Status ProtoBufParser::ParseResponseToBuf(
63 const Call& call, void** output_data, int* output_size,
64 const SignatureInfo* signature_info) {
65 eas::PredictResponse response = util::Tensor2Response(call.request,
66 call.response, signature_info);
67 *output_size = response.ByteSize();
68 *output_data = new char[*output_size];
69 bool success = response.SerializeToArray(*output_data, *output_size);
70 if (!success) {
71 LOG(ERROR) << "Parse reponse to array failed. " << response.DebugString();
72 return Status(errors::Code::INTERNAL, "Serialize response to array failed.");
73 }
74 return Status::OK();
75}
76
77Status ProtoBufParser::ParseBatchRequestFromBuf(
78 const void* input_data[], int* input_size,

Callers 1

PredictMethod · 0.45

Calls 4

Tensor2ResponseFunction · 0.85
ByteSizeMethod · 0.80
StatusClass · 0.50
DebugStringMethod · 0.45

Tested by

no test coverage detected