Lines 82-88
void TensorResponse::InitPartial(const RecvTensorRespo
Link Here
|
82 |
Status TensorResponse::ParseFrom(Source* source) { |
82 |
Status TensorResponse::ParseFrom(Source* source) { |
83 |
if (!on_host_) { |
83 |
if (!on_host_) { |
84 |
protobuf::io::CodedInputStream input(source->contents()); |
84 |
protobuf::io::CodedInputStream input(source->contents()); |
85 |
input.SetTotalBytesLimit(INT_MAX, INT_MAX); // Unlimited |
85 |
input.SetTotalBytesLimit(INT_MAX); // Unlimited |
86 |
|
86 |
|
87 |
// Pre-parse into local storage, then delegate to device. |
87 |
// Pre-parse into local storage, then delegate to device. |
88 |
if (!meta_.ParseFromCodedStream(&input) || !input.ConsumedEntireMessage()) { |
88 |
if (!meta_.ParseFromCodedStream(&input) || !input.ConsumedEntireMessage()) { |
Lines 218-224
bool TensorResponse::ParseTensorSubmessage(
Link Here
|
218 |
|
218 |
|
219 |
bool TensorResponse::ParseFast(Source* source) { |
219 |
bool TensorResponse::ParseFast(Source* source) { |
220 |
protobuf::io::CodedInputStream input(source->contents()); |
220 |
protobuf::io::CodedInputStream input(source->contents()); |
221 |
input.SetTotalBytesLimit(INT_MAX, INT_MAX); // Unlimited |
221 |
input.SetTotalBytesLimit(INT_MAX); // Unlimited |
222 |
while (true) { |
222 |
while (true) { |
223 |
auto p = input.ReadTagWithCutoff(127); |
223 |
auto p = input.ReadTagWithCutoff(127); |
224 |
int tag = GetTagFieldNumber(p.first); |
224 |
int tag = GetTagFieldNumber(p.first); |