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

Function DecodeResourceHandleList

tensorflow/core/framework/resource_handle.cc:106–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106bool DecodeResourceHandleList(std::unique_ptr<port::StringListDecoder> d,
107 ResourceHandle* ps, int64 n) {
108 std::vector<uint32> sizes(n);
109 if (!d->ReadSizes(&sizes)) return false;
110
111 ResourceHandleProto proto;
112 for (int i = 0; i < n; ++i) {
113 if (!proto.ParseFromArray(d->Data(sizes[i]), sizes[i])) {
114 return false;
115 }
116 if (!ps[i].FromProto(proto).ok()) {
117 return false;
118 }
119 }
120 return true;
121}
122
123} // namespace tensorflow

Callers 1

DecodeMethod · 0.85

Calls 4

ReadSizesMethod · 0.45
DataMethod · 0.45
okMethod · 0.45
FromProtoMethod · 0.45

Tested by

no test coverage detected