1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/protobuf/saved_object_graph.proto |
3 | |
4 | #include "tensorflow/core/protobuf/saved_object_graph.pb.h" |
5 | |
6 | #include <algorithm> |
7 | |
8 | #include <google/protobuf/stubs/common.h> |
9 | #include <google/protobuf/io/coded_stream.h> |
10 | #include <google/protobuf/extension_set.h> |
11 | #include <google/protobuf/wire_format_lite.h> |
12 | #include <google/protobuf/descriptor.h> |
13 | #include <google/protobuf/generated_message_reflection.h> |
14 | #include <google/protobuf/reflection_ops.h> |
15 | #include <google/protobuf/wire_format.h> |
16 | // @@protoc_insertion_point(includes) |
17 | #include <google/protobuf/port_def.inc> |
18 | extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CapturedTensor_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto; |
21 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FunctionSpec_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
22 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SaveableObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
23 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SavedAsset_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
24 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedBareConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
25 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
26 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SavedConstant_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
27 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
28 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<12> scc_info_SavedObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
29 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedObject_SaveableObjectsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
30 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
31 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SavedResource_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
32 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedUserObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
33 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedVariable_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto; |
34 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto; |
35 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrackableObjectGraph_TrackableObject_ObjectReference_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto; |
36 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrackableObjectGraph_TrackableObject_SlotVariableReference_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto; |
37 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fversions_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_VersionDef_tensorflow_2fcore_2fframework_2fversions_2eproto; |
38 | namespace tensorflow { |
39 | class SavedObjectGraph_ConcreteFunctionsEntry_DoNotUseDefaultTypeInternal { |
40 | public: |
41 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse> _instance; |
42 | } _SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_default_instance_; |
43 | class SavedObjectGraphDefaultTypeInternal { |
44 | public: |
45 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedObjectGraph> _instance; |
46 | } _SavedObjectGraph_default_instance_; |
47 | class SavedObject_SaveableObjectsEntry_DoNotUseDefaultTypeInternal { |
48 | public: |
49 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedObject_SaveableObjectsEntry_DoNotUse> _instance; |
50 | } _SavedObject_SaveableObjectsEntry_DoNotUse_default_instance_; |
51 | class SavedObjectDefaultTypeInternal { |
52 | public: |
53 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedObject> _instance; |
54 | const ::tensorflow::SavedUserObject* user_object_; |
55 | const ::tensorflow::SavedAsset* asset_; |
56 | const ::tensorflow::SavedFunction* function_; |
57 | const ::tensorflow::SavedVariable* variable_; |
58 | const ::tensorflow::SavedBareConcreteFunction* bare_concrete_function_; |
59 | const ::tensorflow::SavedConstant* constant_; |
60 | const ::tensorflow::SavedResource* resource_; |
61 | const ::tensorflow::CapturedTensor* captured_tensor_; |
62 | } _SavedObject_default_instance_; |
63 | class SavedUserObjectDefaultTypeInternal { |
64 | public: |
65 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedUserObject> _instance; |
66 | } _SavedUserObject_default_instance_; |
67 | class SavedAssetDefaultTypeInternal { |
68 | public: |
69 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedAsset> _instance; |
70 | } _SavedAsset_default_instance_; |
71 | class SavedFunctionDefaultTypeInternal { |
72 | public: |
73 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedFunction> _instance; |
74 | } _SavedFunction_default_instance_; |
75 | class CapturedTensorDefaultTypeInternal { |
76 | public: |
77 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CapturedTensor> _instance; |
78 | } _CapturedTensor_default_instance_; |
79 | class SavedConcreteFunctionDefaultTypeInternal { |
80 | public: |
81 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedConcreteFunction> _instance; |
82 | } _SavedConcreteFunction_default_instance_; |
83 | class SavedBareConcreteFunctionDefaultTypeInternal { |
84 | public: |
85 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedBareConcreteFunction> _instance; |
86 | } _SavedBareConcreteFunction_default_instance_; |
87 | class SavedConstantDefaultTypeInternal { |
88 | public: |
89 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedConstant> _instance; |
90 | } _SavedConstant_default_instance_; |
91 | class SavedVariableDefaultTypeInternal { |
92 | public: |
93 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedVariable> _instance; |
94 | } _SavedVariable_default_instance_; |
95 | class FunctionSpecDefaultTypeInternal { |
96 | public: |
97 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<FunctionSpec> _instance; |
98 | } _FunctionSpec_default_instance_; |
99 | class SavedResourceDefaultTypeInternal { |
100 | public: |
101 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SavedResource> _instance; |
102 | } _SavedResource_default_instance_; |
103 | class SaveableObjectDefaultTypeInternal { |
104 | public: |
105 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SaveableObject> _instance; |
106 | } _SaveableObject_default_instance_; |
107 | } // namespace tensorflow |
108 | static void InitDefaultsscc_info_CapturedTensor_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
109 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
110 | |
111 | { |
112 | void* ptr = &::tensorflow::_CapturedTensor_default_instance_; |
113 | new (ptr) ::tensorflow::CapturedTensor(); |
114 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
115 | } |
116 | ::tensorflow::CapturedTensor::InitAsDefaultInstance(); |
117 | } |
118 | |
119 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CapturedTensor_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
120 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_CapturedTensor_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, {}}; |
121 | |
122 | static void InitDefaultsscc_info_FunctionSpec_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
123 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
124 | |
125 | { |
126 | void* ptr = &::tensorflow::_FunctionSpec_default_instance_; |
127 | new (ptr) ::tensorflow::FunctionSpec(); |
128 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
129 | } |
130 | ::tensorflow::FunctionSpec::InitAsDefaultInstance(); |
131 | } |
132 | |
133 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_FunctionSpec_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
134 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_FunctionSpec_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
135 | &scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base,}}; |
136 | |
137 | static void InitDefaultsscc_info_SaveableObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
138 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
139 | |
140 | { |
141 | void* ptr = &::tensorflow::_SaveableObject_default_instance_; |
142 | new (ptr) ::tensorflow::SaveableObject(); |
143 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
144 | } |
145 | ::tensorflow::SaveableObject::InitAsDefaultInstance(); |
146 | } |
147 | |
148 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SaveableObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
149 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SaveableObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, {}}; |
150 | |
151 | static void InitDefaultsscc_info_SavedAsset_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
152 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
153 | |
154 | { |
155 | void* ptr = &::tensorflow::_SavedAsset_default_instance_; |
156 | new (ptr) ::tensorflow::SavedAsset(); |
157 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
158 | } |
159 | ::tensorflow::SavedAsset::InitAsDefaultInstance(); |
160 | } |
161 | |
162 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SavedAsset_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
163 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SavedAsset_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, {}}; |
164 | |
165 | static void InitDefaultsscc_info_SavedBareConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
166 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
167 | |
168 | { |
169 | void* ptr = &::tensorflow::_SavedBareConcreteFunction_default_instance_; |
170 | new (ptr) ::tensorflow::SavedBareConcreteFunction(); |
171 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
172 | } |
173 | ::tensorflow::SavedBareConcreteFunction::InitAsDefaultInstance(); |
174 | } |
175 | |
176 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedBareConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
177 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SavedBareConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
178 | &scc_info_FunctionSpec_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base,}}; |
179 | |
180 | static void InitDefaultsscc_info_SavedConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
181 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
182 | |
183 | { |
184 | void* ptr = &::tensorflow::_SavedConcreteFunction_default_instance_; |
185 | new (ptr) ::tensorflow::SavedConcreteFunction(); |
186 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
187 | } |
188 | ::tensorflow::SavedConcreteFunction::InitAsDefaultInstance(); |
189 | } |
190 | |
191 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
192 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SavedConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
193 | &scc_info_DictValue_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto.base,}}; |
194 | |
195 | static void InitDefaultsscc_info_SavedConstant_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
196 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
197 | |
198 | { |
199 | void* ptr = &::tensorflow::_SavedConstant_default_instance_; |
200 | new (ptr) ::tensorflow::SavedConstant(); |
201 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
202 | } |
203 | ::tensorflow::SavedConstant::InitAsDefaultInstance(); |
204 | } |
205 | |
206 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SavedConstant_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
207 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SavedConstant_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, {}}; |
208 | |
209 | static void InitDefaultsscc_info_SavedFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
210 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
211 | |
212 | { |
213 | void* ptr = &::tensorflow::_SavedFunction_default_instance_; |
214 | new (ptr) ::tensorflow::SavedFunction(); |
215 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
216 | } |
217 | ::tensorflow::SavedFunction::InitAsDefaultInstance(); |
218 | } |
219 | |
220 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
221 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SavedFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
222 | &scc_info_FunctionSpec_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base,}}; |
223 | |
224 | static void InitDefaultsscc_info_SavedObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
225 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
226 | |
227 | { |
228 | void* ptr = &::tensorflow::_SavedObject_default_instance_; |
229 | new (ptr) ::tensorflow::SavedObject(); |
230 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
231 | } |
232 | ::tensorflow::SavedObject::InitAsDefaultInstance(); |
233 | } |
234 | |
235 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<12> scc_info_SavedObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
236 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 12, InitDefaultsscc_info_SavedObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
237 | &scc_info_TrackableObjectGraph_TrackableObject_ObjectReference_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto.base, |
238 | &scc_info_TrackableObjectGraph_TrackableObject_SlotVariableReference_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto.base, |
239 | &scc_info_SavedUserObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
240 | &scc_info_SavedAsset_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
241 | &scc_info_SavedFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
242 | &scc_info_SavedVariable_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
243 | &scc_info_SavedBareConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
244 | &scc_info_SavedConstant_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
245 | &scc_info_SavedResource_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
246 | &scc_info_CapturedTensor_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
247 | &scc_info_SavedObject_SaveableObjectsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
248 | &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}}; |
249 | |
250 | static void InitDefaultsscc_info_SavedObject_SaveableObjectsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
251 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
252 | |
253 | { |
254 | void* ptr = &::tensorflow::_SavedObject_SaveableObjectsEntry_DoNotUse_default_instance_; |
255 | new (ptr) ::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse(); |
256 | } |
257 | ::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse::InitAsDefaultInstance(); |
258 | } |
259 | |
260 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedObject_SaveableObjectsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
261 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SavedObject_SaveableObjectsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
262 | &scc_info_SaveableObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base,}}; |
263 | |
264 | static void InitDefaultsscc_info_SavedObjectGraph_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
265 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
266 | |
267 | { |
268 | void* ptr = &::tensorflow::_SavedObjectGraph_default_instance_; |
269 | new (ptr) ::tensorflow::SavedObjectGraph(); |
270 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
271 | } |
272 | ::tensorflow::SavedObjectGraph::InitAsDefaultInstance(); |
273 | } |
274 | |
275 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_SavedObjectGraph_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
276 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_SavedObjectGraph_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
277 | &scc_info_SavedObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
278 | &scc_info_SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base,}}; |
279 | |
280 | static void InitDefaultsscc_info_SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
281 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
282 | |
283 | { |
284 | void* ptr = &::tensorflow::_SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_default_instance_; |
285 | new (ptr) ::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse(); |
286 | } |
287 | ::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::InitAsDefaultInstance(); |
288 | } |
289 | |
290 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
291 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
292 | &scc_info_SavedConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base,}}; |
293 | |
294 | static void InitDefaultsscc_info_SavedResource_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
295 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
296 | |
297 | { |
298 | void* ptr = &::tensorflow::_SavedResource_default_instance_; |
299 | new (ptr) ::tensorflow::SavedResource(); |
300 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
301 | } |
302 | ::tensorflow::SavedResource::InitAsDefaultInstance(); |
303 | } |
304 | |
305 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SavedResource_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
306 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SavedResource_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, {}}; |
307 | |
308 | static void InitDefaultsscc_info_SavedUserObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
309 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
310 | |
311 | { |
312 | void* ptr = &::tensorflow::_SavedUserObject_default_instance_; |
313 | new (ptr) ::tensorflow::SavedUserObject(); |
314 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
315 | } |
316 | ::tensorflow::SavedUserObject::InitAsDefaultInstance(); |
317 | } |
318 | |
319 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedUserObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
320 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SavedUserObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
321 | &scc_info_VersionDef_tensorflow_2fcore_2fframework_2fversions_2eproto.base,}}; |
322 | |
323 | static void InitDefaultsscc_info_SavedVariable_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto() { |
324 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
325 | |
326 | { |
327 | void* ptr = &::tensorflow::_SavedVariable_default_instance_; |
328 | new (ptr) ::tensorflow::SavedVariable(); |
329 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
330 | } |
331 | ::tensorflow::SavedVariable::InitAsDefaultInstance(); |
332 | } |
333 | |
334 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SavedVariable_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = |
335 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SavedVariable_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto}, { |
336 | &scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto.base,}}; |
337 | |
338 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto[15]; |
339 | static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto[1]; |
340 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = nullptr; |
341 | |
342 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
343 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse, _has_bits_), |
344 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse, _internal_metadata_), |
345 | ~0u, // no _extensions_ |
346 | ~0u, // no _oneof_case_ |
347 | ~0u, // no _weak_field_map_ |
348 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse, key_), |
349 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse, value_), |
350 | 0, |
351 | 1, |
352 | ~0u, // no _has_bits_ |
353 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObjectGraph, _internal_metadata_), |
354 | ~0u, // no _extensions_ |
355 | ~0u, // no _oneof_case_ |
356 | ~0u, // no _weak_field_map_ |
357 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObjectGraph, nodes_), |
358 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObjectGraph, concrete_functions_), |
359 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse, _has_bits_), |
360 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse, _internal_metadata_), |
361 | ~0u, // no _extensions_ |
362 | ~0u, // no _oneof_case_ |
363 | ~0u, // no _weak_field_map_ |
364 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse, key_), |
365 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse, value_), |
366 | 0, |
367 | 1, |
368 | ~0u, // no _has_bits_ |
369 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, _internal_metadata_), |
370 | ~0u, // no _extensions_ |
371 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, _oneof_case_[0]), |
372 | ~0u, // no _weak_field_map_ |
373 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, children_), |
374 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, dependencies_), |
375 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, slot_variables_), |
376 | offsetof(::tensorflow::SavedObjectDefaultTypeInternal, user_object_), |
377 | offsetof(::tensorflow::SavedObjectDefaultTypeInternal, asset_), |
378 | offsetof(::tensorflow::SavedObjectDefaultTypeInternal, function_), |
379 | offsetof(::tensorflow::SavedObjectDefaultTypeInternal, variable_), |
380 | offsetof(::tensorflow::SavedObjectDefaultTypeInternal, bare_concrete_function_), |
381 | offsetof(::tensorflow::SavedObjectDefaultTypeInternal, constant_), |
382 | offsetof(::tensorflow::SavedObjectDefaultTypeInternal, resource_), |
383 | offsetof(::tensorflow::SavedObjectDefaultTypeInternal, captured_tensor_), |
384 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, saveable_objects_), |
385 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, registered_name_), |
386 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, serialized_user_proto_), |
387 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, registered_saver_), |
388 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedObject, kind_), |
389 | ~0u, // no _has_bits_ |
390 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedUserObject, _internal_metadata_), |
391 | ~0u, // no _extensions_ |
392 | ~0u, // no _oneof_case_ |
393 | ~0u, // no _weak_field_map_ |
394 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedUserObject, identifier_), |
395 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedUserObject, version_), |
396 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedUserObject, metadata_), |
397 | ~0u, // no _has_bits_ |
398 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedAsset, _internal_metadata_), |
399 | ~0u, // no _extensions_ |
400 | ~0u, // no _oneof_case_ |
401 | ~0u, // no _weak_field_map_ |
402 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedAsset, asset_file_def_index_), |
403 | ~0u, // no _has_bits_ |
404 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedFunction, _internal_metadata_), |
405 | ~0u, // no _extensions_ |
406 | ~0u, // no _oneof_case_ |
407 | ~0u, // no _weak_field_map_ |
408 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedFunction, concrete_functions_), |
409 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedFunction, function_spec_), |
410 | ~0u, // no _has_bits_ |
411 | PROTOBUF_FIELD_OFFSET(::tensorflow::CapturedTensor, _internal_metadata_), |
412 | ~0u, // no _extensions_ |
413 | ~0u, // no _oneof_case_ |
414 | ~0u, // no _weak_field_map_ |
415 | PROTOBUF_FIELD_OFFSET(::tensorflow::CapturedTensor, name_), |
416 | PROTOBUF_FIELD_OFFSET(::tensorflow::CapturedTensor, concrete_function_), |
417 | ~0u, // no _has_bits_ |
418 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedConcreteFunction, _internal_metadata_), |
419 | ~0u, // no _extensions_ |
420 | ~0u, // no _oneof_case_ |
421 | ~0u, // no _weak_field_map_ |
422 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedConcreteFunction, bound_inputs_), |
423 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedConcreteFunction, canonicalized_input_signature_), |
424 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedConcreteFunction, output_signature_), |
425 | ~0u, // no _has_bits_ |
426 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedBareConcreteFunction, _internal_metadata_), |
427 | ~0u, // no _extensions_ |
428 | ~0u, // no _oneof_case_ |
429 | ~0u, // no _weak_field_map_ |
430 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedBareConcreteFunction, concrete_function_name_), |
431 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedBareConcreteFunction, argument_keywords_), |
432 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedBareConcreteFunction, allowed_positional_arguments_), |
433 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedBareConcreteFunction, function_spec_), |
434 | ~0u, // no _has_bits_ |
435 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedConstant, _internal_metadata_), |
436 | ~0u, // no _extensions_ |
437 | ~0u, // no _oneof_case_ |
438 | ~0u, // no _weak_field_map_ |
439 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedConstant, operation_), |
440 | ~0u, // no _has_bits_ |
441 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedVariable, _internal_metadata_), |
442 | ~0u, // no _extensions_ |
443 | ~0u, // no _oneof_case_ |
444 | ~0u, // no _weak_field_map_ |
445 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedVariable, dtype_), |
446 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedVariable, shape_), |
447 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedVariable, trainable_), |
448 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedVariable, synchronization_), |
449 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedVariable, aggregation_), |
450 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedVariable, name_), |
451 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedVariable, device_), |
452 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedVariable, experimental_distributed_variable_components_), |
453 | ~0u, // no _has_bits_ |
454 | PROTOBUF_FIELD_OFFSET(::tensorflow::FunctionSpec, _internal_metadata_), |
455 | ~0u, // no _extensions_ |
456 | ~0u, // no _oneof_case_ |
457 | ~0u, // no _weak_field_map_ |
458 | PROTOBUF_FIELD_OFFSET(::tensorflow::FunctionSpec, fullargspec_), |
459 | PROTOBUF_FIELD_OFFSET(::tensorflow::FunctionSpec, is_method_), |
460 | PROTOBUF_FIELD_OFFSET(::tensorflow::FunctionSpec, input_signature_), |
461 | PROTOBUF_FIELD_OFFSET(::tensorflow::FunctionSpec, jit_compile_), |
462 | ~0u, // no _has_bits_ |
463 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedResource, _internal_metadata_), |
464 | ~0u, // no _extensions_ |
465 | ~0u, // no _oneof_case_ |
466 | ~0u, // no _weak_field_map_ |
467 | PROTOBUF_FIELD_OFFSET(::tensorflow::SavedResource, device_), |
468 | ~0u, // no _has_bits_ |
469 | PROTOBUF_FIELD_OFFSET(::tensorflow::SaveableObject, _internal_metadata_), |
470 | ~0u, // no _extensions_ |
471 | ~0u, // no _oneof_case_ |
472 | ~0u, // no _weak_field_map_ |
473 | PROTOBUF_FIELD_OFFSET(::tensorflow::SaveableObject, save_function_), |
474 | PROTOBUF_FIELD_OFFSET(::tensorflow::SaveableObject, restore_function_), |
475 | }; |
476 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
477 | { 0, 7, sizeof(::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse)}, |
478 | { 9, -1, sizeof(::tensorflow::SavedObjectGraph)}, |
479 | { 16, 23, sizeof(::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse)}, |
480 | { 25, -1, sizeof(::tensorflow::SavedObject)}, |
481 | { 46, -1, sizeof(::tensorflow::SavedUserObject)}, |
482 | { 54, -1, sizeof(::tensorflow::SavedAsset)}, |
483 | { 60, -1, sizeof(::tensorflow::SavedFunction)}, |
484 | { 67, -1, sizeof(::tensorflow::CapturedTensor)}, |
485 | { 74, -1, sizeof(::tensorflow::SavedConcreteFunction)}, |
486 | { 82, -1, sizeof(::tensorflow::SavedBareConcreteFunction)}, |
487 | { 91, -1, sizeof(::tensorflow::SavedConstant)}, |
488 | { 97, -1, sizeof(::tensorflow::SavedVariable)}, |
489 | { 110, -1, sizeof(::tensorflow::FunctionSpec)}, |
490 | { 119, -1, sizeof(::tensorflow::SavedResource)}, |
491 | { 125, -1, sizeof(::tensorflow::SaveableObject)}, |
492 | }; |
493 | |
494 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
495 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_default_instance_), |
496 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedObjectGraph_default_instance_), |
497 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedObject_SaveableObjectsEntry_DoNotUse_default_instance_), |
498 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedObject_default_instance_), |
499 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedUserObject_default_instance_), |
500 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedAsset_default_instance_), |
501 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedFunction_default_instance_), |
502 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_CapturedTensor_default_instance_), |
503 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedConcreteFunction_default_instance_), |
504 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedBareConcreteFunction_default_instance_), |
505 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedConstant_default_instance_), |
506 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedVariable_default_instance_), |
507 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_FunctionSpec_default_instance_), |
508 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SavedResource_default_instance_), |
509 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SaveableObject_default_instance_), |
510 | }; |
511 | |
512 | const char descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
513 | "\n1tensorflow/core/protobuf/saved_object_" |
514 | "graph.proto\022\ntensorflow\032\031google/protobuf" |
515 | "/any.proto\032,tensorflow/core/framework/te" |
516 | "nsor_shape.proto\032%tensorflow/core/framew" |
517 | "ork/types.proto\032(tensorflow/core/framewo" |
518 | "rk/variable.proto\032(tensorflow/core/frame" |
519 | "work/versions.proto\032%tensorflow/core/pro" |
520 | "tobuf/struct.proto\0325tensorflow/core/prot" |
521 | "obuf/trackable_object_graph.proto\"\350\001\n\020Sa" |
522 | "vedObjectGraph\022&\n\005nodes\030\001 \003(\0132\027.tensorfl" |
523 | "ow.SavedObject\022O\n\022concrete_functions\030\002 \003" |
524 | "(\01323.tensorflow.SavedObjectGraph.Concret" |
525 | "eFunctionsEntry\032[\n\026ConcreteFunctionsEntr" |
526 | "y\022\013\n\003key\030\001 \001(\t\0220\n\005value\030\002 \001(\0132!.tensorfl" |
527 | "ow.SavedConcreteFunction:\0028\001\"\320\007\n\013SavedOb" |
528 | "ject\022R\n\010children\030\001 \003(\[email protected]" |
529 | "kableObjectGraph.TrackableObject.ObjectR" |
530 | "eference\022V\n\014dependencies\030\017 \003(\[email protected]" |
531 | "low.TrackableObjectGraph.TrackableObject" |
532 | ".ObjectReference\022^\n\016slot_variables\030\003 \003(\013" |
533 | "2F.tensorflow.TrackableObjectGraph.Track" |
534 | "ableObject.SlotVariableReference\0222\n\013user" |
535 | "_object\030\004 \001(\0132\033.tensorflow.SavedUserObje" |
536 | "ctH\000\022\'\n\005asset\030\005 \001(\0132\026.tensorflow.SavedAs" |
537 | "setH\000\022-\n\010function\030\006 \001(\0132\031.tensorflow.Sav" |
538 | "edFunctionH\000\022-\n\010variable\030\007 \001(\0132\031.tensorf" |
539 | "low.SavedVariableH\000\022G\n\026bare_concrete_fun" |
540 | "ction\030\010 \001(\0132%.tensorflow.SavedBareConcre" |
541 | "teFunctionH\000\022-\n\010constant\030\t \001(\0132\031.tensorf" |
542 | "low.SavedConstantH\000\022-\n\010resource\030\n \001(\0132\031." |
543 | "tensorflow.SavedResourceH\000\0225\n\017captured_t" |
544 | "ensor\030\014 \001(\0132\032.tensorflow.CapturedTensorH" |
545 | "\000\022F\n\020saveable_objects\030\013 \003(\0132,.tensorflow" |
546 | ".SavedObject.SaveableObjectsEntry\022\027\n\017reg" |
547 | "istered_name\030\r \001(\t\0223\n\025serialized_user_pr" |
548 | "oto\030\016 \001(\0132\024.google.protobuf.Any\022\030\n\020regis" |
549 | "tered_saver\030\020 \001(\t\032R\n\024SaveableObjectsEntr" |
550 | "y\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.tensorfl" |
551 | "ow.SaveableObject:\0028\001B\006\n\004kindJ\004\010\002\020\003R\natt" |
552 | "ributes\"d\n\017SavedUserObject\022\022\n\nidentifier" |
553 | "\030\001 \001(\t\022\'\n\007version\030\002 \001(\0132\026.tensorflow.Ver" |
554 | "sionDef\022\024\n\010metadata\030\003 \001(\tB\002\030\001\"*\n\nSavedAs" |
555 | "set\022\034\n\024asset_file_def_index\030\001 \001(\005\"\\\n\rSav" |
556 | "edFunction\022\032\n\022concrete_functions\030\001 \003(\t\022/" |
557 | "\n\rfunction_spec\030\002 \001(\0132\030.tensorflow.Funct" |
558 | "ionSpec\"9\n\016CapturedTensor\022\014\n\004name\030\001 \001(\t\022" |
559 | "\031\n\021concrete_function\030\002 \001(\t\"\250\001\n\025SavedConc" |
560 | "reteFunction\022\024\n\014bound_inputs\030\002 \003(\005\022B\n\035ca" |
561 | "nonicalized_input_signature\030\003 \001(\0132\033.tens" |
562 | "orflow.StructuredValue\0225\n\020output_signatu" |
563 | "re\030\004 \001(\0132\033.tensorflow.StructuredValue\"\255\001" |
564 | "\n\031SavedBareConcreteFunction\022\036\n\026concrete_" |
565 | "function_name\030\001 \001(\t\022\031\n\021argument_keywords" |
566 | "\030\002 \003(\t\022$\n\034allowed_positional_arguments\030\003" |
567 | " \001(\003\022/\n\rfunction_spec\030\004 \001(\0132\030.tensorflow" |
568 | ".FunctionSpec\"\"\n\rSavedConstant\022\021\n\toperat" |
569 | "ion\030\001 \001(\t\"\327\002\n\rSavedVariable\022#\n\005dtype\030\001 \001" |
570 | "(\0162\024.tensorflow.DataType\022+\n\005shape\030\002 \001(\0132" |
571 | "\034.tensorflow.TensorShapeProto\022\021\n\ttrainab" |
572 | "le\030\003 \001(\010\022<\n\017synchronization\030\004 \001(\0162#.tens" |
573 | "orflow.VariableSynchronization\0224\n\013aggreg" |
574 | "ation\030\005 \001(\0162\037.tensorflow.VariableAggrega" |
575 | "tion\022\014\n\004name\030\006 \001(\t\022\016\n\006device\030\007 \001(\t\022O\n,ex" |
576 | "perimental_distributed_variable_componen" |
577 | "ts\030\010 \003(\0132\031.tensorflow.SavedVariable\"\373\001\n\014" |
578 | "FunctionSpec\0220\n\013fullargspec\030\001 \001(\0132\033.tens" |
579 | "orflow.StructuredValue\022\021\n\tis_method\030\002 \001(" |
580 | "\010\0224\n\017input_signature\030\005 \001(\0132\033.tensorflow." |
581 | "StructuredValue\0228\n\013jit_compile\030\006 \001(\0162#.t" |
582 | "ensorflow.FunctionSpec.JitCompile\"*\n\nJit" |
583 | "Compile\022\013\n\007DEFAULT\020\000\022\006\n\002ON\020\001\022\007\n\003OFF\020\002J\004\010" |
584 | "\003\020\004J\004\010\004\020\005\"\037\n\rSavedResource\022\016\n\006device\030\001 \001" |
585 | "(\t\"A\n\016SaveableObject\022\025\n\rsave_function\030\002 " |
586 | "\001(\005\022\030\n\020restore_function\030\003 \001(\005BZZUgithub." |
587 | "com/tensorflow/tensorflow/tensorflow/go/" |
588 | "core/protobuf/for_core_protos_go_proto\370\001" |
589 | "\001b\006proto3" |
590 | ; |
591 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto_deps[7] = { |
592 | &::descriptor_table_google_2fprotobuf_2fany_2eproto, |
593 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto, |
594 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftypes_2eproto, |
595 | &::descriptor_table_tensorflow_2fcore_2fframework_2fvariable_2eproto, |
596 | &::descriptor_table_tensorflow_2fcore_2fframework_2fversions_2eproto, |
597 | &::descriptor_table_tensorflow_2fcore_2fprotobuf_2fstruct_2eproto, |
598 | &::descriptor_table_tensorflow_2fcore_2fprotobuf_2ftrackable_5fobject_5fgraph_2eproto, |
599 | }; |
600 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto_sccs[15] = { |
601 | &scc_info_CapturedTensor_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
602 | &scc_info_FunctionSpec_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
603 | &scc_info_SaveableObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
604 | &scc_info_SavedAsset_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
605 | &scc_info_SavedBareConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
606 | &scc_info_SavedConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
607 | &scc_info_SavedConstant_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
608 | &scc_info_SavedFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
609 | &scc_info_SavedObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
610 | &scc_info_SavedObject_SaveableObjectsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
611 | &scc_info_SavedObjectGraph_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
612 | &scc_info_SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
613 | &scc_info_SavedResource_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
614 | &scc_info_SavedUserObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
615 | &scc_info_SavedVariable_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base, |
616 | }; |
617 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto_once; |
618 | static bool descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto_initialized = false; |
619 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = { |
620 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto, "tensorflow/core/protobuf/saved_object_graph.proto" , 3049, |
621 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto_once, descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto_deps, 15, 7, |
622 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto::offsets, |
623 | file_level_metadata_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto, 15, file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto, |
624 | }; |
625 | |
626 | // Force running AddDescriptors() at dynamic initialization time. |
627 | static bool dynamic_init_dummy_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto), true); |
628 | namespace tensorflow { |
629 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FunctionSpec_JitCompile_descriptor() { |
630 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto); |
631 | return file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto[0]; |
632 | } |
633 | bool FunctionSpec_JitCompile_IsValid(int value) { |
634 | switch (value) { |
635 | case 0: |
636 | case 1: |
637 | case 2: |
638 | return true; |
639 | default: |
640 | return false; |
641 | } |
642 | } |
643 | |
644 | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
645 | constexpr FunctionSpec_JitCompile FunctionSpec::DEFAULT; |
646 | constexpr FunctionSpec_JitCompile FunctionSpec::ON; |
647 | constexpr FunctionSpec_JitCompile FunctionSpec::OFF; |
648 | constexpr FunctionSpec_JitCompile FunctionSpec::JitCompile_MIN; |
649 | constexpr FunctionSpec_JitCompile FunctionSpec::JitCompile_MAX; |
650 | constexpr int FunctionSpec::JitCompile_ARRAYSIZE; |
651 | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
652 | |
653 | // =================================================================== |
654 | |
655 | SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse() {} |
656 | SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
657 | : SuperType(arena) {} |
658 | void SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::MergeFrom(const SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse& other) { |
659 | MergeFromInternal(other); |
660 | } |
661 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::GetMetadata() const { |
662 | return GetMetadataStatic(); |
663 | } |
664 | void SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::MergeFrom( |
665 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
666 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
667 | } |
668 | |
669 | |
670 | // =================================================================== |
671 | |
672 | void SavedObjectGraph::InitAsDefaultInstance() { |
673 | } |
674 | class SavedObjectGraph::_Internal { |
675 | public: |
676 | }; |
677 | |
678 | SavedObjectGraph::SavedObjectGraph() |
679 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
680 | SharedCtor(); |
681 | // @@protoc_insertion_point(constructor:tensorflow.SavedObjectGraph) |
682 | } |
683 | SavedObjectGraph::SavedObjectGraph(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
684 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
685 | _internal_metadata_(arena), |
686 | nodes_(arena), |
687 | concrete_functions_(arena) { |
688 | SharedCtor(); |
689 | RegisterArenaDtor(arena); |
690 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedObjectGraph) |
691 | } |
692 | SavedObjectGraph::SavedObjectGraph(const SavedObjectGraph& from) |
693 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
694 | _internal_metadata_(nullptr), |
695 | nodes_(from.nodes_) { |
696 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
697 | concrete_functions_.MergeFrom(from.concrete_functions_); |
698 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedObjectGraph) |
699 | } |
700 | |
701 | void SavedObjectGraph::SharedCtor() { |
702 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SavedObjectGraph_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
703 | } |
704 | |
705 | SavedObjectGraph::~SavedObjectGraph() { |
706 | // @@protoc_insertion_point(destructor:tensorflow.SavedObjectGraph) |
707 | SharedDtor(); |
708 | } |
709 | |
710 | void SavedObjectGraph::SharedDtor() { |
711 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
712 | } |
713 | |
714 | void SavedObjectGraph::ArenaDtor(void* object) { |
715 | SavedObjectGraph* _this = reinterpret_cast< SavedObjectGraph* >(object); |
716 | (void)_this; |
717 | } |
718 | void SavedObjectGraph::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
719 | } |
720 | void SavedObjectGraph::SetCachedSize(int size) const { |
721 | _cached_size_.Set(size); |
722 | } |
723 | const SavedObjectGraph& SavedObjectGraph::default_instance() { |
724 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedObjectGraph_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
725 | return *internal_default_instance(); |
726 | } |
727 | |
728 | |
729 | void SavedObjectGraph::Clear() { |
730 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedObjectGraph) |
731 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
732 | // Prevent compiler warnings about cached_has_bits being unused |
733 | (void) cached_has_bits; |
734 | |
735 | nodes_.Clear(); |
736 | concrete_functions_.Clear(); |
737 | _internal_metadata_.Clear(); |
738 | } |
739 | |
740 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
741 | const char* SavedObjectGraph::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
742 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
743 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
744 | while (!ctx->Done(&ptr)) { |
745 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
746 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
747 | CHK_(ptr); |
748 | switch (tag >> 3) { |
749 | // repeated .tensorflow.SavedObject nodes = 1; |
750 | case 1: |
751 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
752 | ptr -= 1; |
753 | do { |
754 | ptr += 1; |
755 | ptr = ctx->ParseMessage(add_nodes(), ptr); |
756 | CHK_(ptr); |
757 | if (!ctx->DataAvailable(ptr)) break; |
758 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
759 | } else goto handle_unusual; |
760 | continue; |
761 | // map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; |
762 | case 2: |
763 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
764 | ptr -= 1; |
765 | do { |
766 | ptr += 1; |
767 | ptr = ctx->ParseMessage(&concrete_functions_, ptr); |
768 | CHK_(ptr); |
769 | if (!ctx->DataAvailable(ptr)) break; |
770 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); |
771 | } else goto handle_unusual; |
772 | continue; |
773 | default: { |
774 | handle_unusual: |
775 | if ((tag & 7) == 4 || tag == 0) { |
776 | ctx->SetLastTag(tag); |
777 | goto success; |
778 | } |
779 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
780 | CHK_(ptr != nullptr); |
781 | continue; |
782 | } |
783 | } // switch |
784 | } // while |
785 | success: |
786 | return ptr; |
787 | failure: |
788 | ptr = nullptr; |
789 | goto success; |
790 | #undef CHK_ |
791 | } |
792 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
793 | bool SavedObjectGraph::MergePartialFromCodedStream( |
794 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
795 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
796 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
797 | // @@protoc_insertion_point(parse_start:tensorflow.SavedObjectGraph) |
798 | for (;;) { |
799 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
800 | tag = p.first; |
801 | if (!p.second) goto handle_unusual; |
802 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
803 | // repeated .tensorflow.SavedObject nodes = 1; |
804 | case 1: { |
805 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
806 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
807 | input, add_nodes())); |
808 | } else { |
809 | goto handle_unusual; |
810 | } |
811 | break; |
812 | } |
813 | |
814 | // map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; |
815 | case 2: { |
816 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
817 | SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
818 | SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse, |
819 | std::string, ::tensorflow::SavedConcreteFunction, |
820 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
821 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
822 | 0 >, |
823 | ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction > > parser(&concrete_functions_); |
824 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
825 | input, &parser)); |
826 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
827 | parser.key().data(), static_cast<int>(parser.key().length()), |
828 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
829 | "tensorflow.SavedObjectGraph.ConcreteFunctionsEntry.key" )); |
830 | } else { |
831 | goto handle_unusual; |
832 | } |
833 | break; |
834 | } |
835 | |
836 | default: { |
837 | handle_unusual: |
838 | if (tag == 0) { |
839 | goto success; |
840 | } |
841 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
842 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
843 | break; |
844 | } |
845 | } |
846 | } |
847 | success: |
848 | // @@protoc_insertion_point(parse_success:tensorflow.SavedObjectGraph) |
849 | return true; |
850 | failure: |
851 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedObjectGraph) |
852 | return false; |
853 | #undef DO_ |
854 | } |
855 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
856 | |
857 | void SavedObjectGraph::SerializeWithCachedSizes( |
858 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
859 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedObjectGraph) |
860 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
861 | (void) cached_has_bits; |
862 | |
863 | // repeated .tensorflow.SavedObject nodes = 1; |
864 | for (unsigned int i = 0, |
865 | n = static_cast<unsigned int>(this->nodes_size()); i < n; i++) { |
866 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
867 | 1, |
868 | this->nodes(static_cast<int>(i)), |
869 | output); |
870 | } |
871 | |
872 | // map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; |
873 | if (!this->concrete_functions().empty()) { |
874 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >::const_pointer |
875 | ConstPtr; |
876 | typedef ConstPtr SortItem; |
877 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
878 | struct Utf8Check { |
879 | static void Check(ConstPtr p) { |
880 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
881 | p->first.data(), static_cast<int>(p->first.length()), |
882 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
883 | "tensorflow.SavedObjectGraph.ConcreteFunctionsEntry.key" ); |
884 | } |
885 | }; |
886 | |
887 | if (output->IsSerializationDeterministic() && |
888 | this->concrete_functions().size() > 1) { |
889 | ::std::unique_ptr<SortItem[]> items( |
890 | new SortItem[this->concrete_functions().size()]); |
891 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >::size_type size_type; |
892 | size_type n = 0; |
893 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >::const_iterator |
894 | it = this->concrete_functions().begin(); |
895 | it != this->concrete_functions().end(); ++it, ++n) { |
896 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
897 | } |
898 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
899 | for (size_type i = 0; i < n; i++) { |
900 | SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::Funcs::SerializeToCodedStream(2, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output); |
901 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
902 | } |
903 | } else { |
904 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >::const_iterator |
905 | it = this->concrete_functions().begin(); |
906 | it != this->concrete_functions().end(); ++it) { |
907 | SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::Funcs::SerializeToCodedStream(2, it->first, it->second, output); |
908 | Utf8Check::Check(&(*it)); |
909 | } |
910 | } |
911 | } |
912 | |
913 | if (_internal_metadata_.have_unknown_fields()) { |
914 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
915 | _internal_metadata_.unknown_fields(), output); |
916 | } |
917 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedObjectGraph) |
918 | } |
919 | |
920 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedObjectGraph::InternalSerializeWithCachedSizesToArray( |
921 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
922 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedObjectGraph) |
923 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
924 | (void) cached_has_bits; |
925 | |
926 | // repeated .tensorflow.SavedObject nodes = 1; |
927 | for (unsigned int i = 0, |
928 | n = static_cast<unsigned int>(this->nodes_size()); i < n; i++) { |
929 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
930 | InternalWriteMessageToArray( |
931 | 1, this->nodes(static_cast<int>(i)), target); |
932 | } |
933 | |
934 | // map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; |
935 | if (!this->concrete_functions().empty()) { |
936 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >::const_pointer |
937 | ConstPtr; |
938 | typedef ConstPtr SortItem; |
939 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
940 | struct Utf8Check { |
941 | static void Check(ConstPtr p) { |
942 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
943 | p->first.data(), static_cast<int>(p->first.length()), |
944 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
945 | "tensorflow.SavedObjectGraph.ConcreteFunctionsEntry.key" ); |
946 | } |
947 | }; |
948 | |
949 | if (false && |
950 | this->concrete_functions().size() > 1) { |
951 | ::std::unique_ptr<SortItem[]> items( |
952 | new SortItem[this->concrete_functions().size()]); |
953 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >::size_type size_type; |
954 | size_type n = 0; |
955 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >::const_iterator |
956 | it = this->concrete_functions().begin(); |
957 | it != this->concrete_functions().end(); ++it, ++n) { |
958 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
959 | } |
960 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
961 | for (size_type i = 0; i < n; i++) { |
962 | target = SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::Funcs::SerializeToArray(2, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target); |
963 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
964 | } |
965 | } else { |
966 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >::const_iterator |
967 | it = this->concrete_functions().begin(); |
968 | it != this->concrete_functions().end(); ++it) { |
969 | target = SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::Funcs::SerializeToArray(2, it->first, it->second, target); |
970 | Utf8Check::Check(&(*it)); |
971 | } |
972 | } |
973 | } |
974 | |
975 | if (_internal_metadata_.have_unknown_fields()) { |
976 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
977 | _internal_metadata_.unknown_fields(), target); |
978 | } |
979 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedObjectGraph) |
980 | return target; |
981 | } |
982 | |
983 | size_t SavedObjectGraph::ByteSizeLong() const { |
984 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedObjectGraph) |
985 | size_t total_size = 0; |
986 | |
987 | if (_internal_metadata_.have_unknown_fields()) { |
988 | total_size += |
989 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
990 | _internal_metadata_.unknown_fields()); |
991 | } |
992 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
993 | // Prevent compiler warnings about cached_has_bits being unused |
994 | (void) cached_has_bits; |
995 | |
996 | // repeated .tensorflow.SavedObject nodes = 1; |
997 | { |
998 | unsigned int count = static_cast<unsigned int>(this->nodes_size()); |
999 | total_size += 1UL * count; |
1000 | for (unsigned int i = 0; i < count; i++) { |
1001 | total_size += |
1002 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1003 | this->nodes(static_cast<int>(i))); |
1004 | } |
1005 | } |
1006 | |
1007 | // map<string, .tensorflow.SavedConcreteFunction> concrete_functions = 2; |
1008 | total_size += 1 * |
1009 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->concrete_functions_size()); |
1010 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SavedConcreteFunction >::const_iterator |
1011 | it = this->concrete_functions().begin(); |
1012 | it != this->concrete_functions().end(); ++it) { |
1013 | total_size += SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
1014 | } |
1015 | |
1016 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1017 | SetCachedSize(cached_size); |
1018 | return total_size; |
1019 | } |
1020 | |
1021 | void SavedObjectGraph::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1022 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedObjectGraph) |
1023 | GOOGLE_DCHECK_NE(&from, this); |
1024 | const SavedObjectGraph* source = |
1025 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedObjectGraph>( |
1026 | &from); |
1027 | if (source == nullptr) { |
1028 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedObjectGraph) |
1029 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1030 | } else { |
1031 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedObjectGraph) |
1032 | MergeFrom(*source); |
1033 | } |
1034 | } |
1035 | |
1036 | void SavedObjectGraph::MergeFrom(const SavedObjectGraph& from) { |
1037 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedObjectGraph) |
1038 | GOOGLE_DCHECK_NE(&from, this); |
1039 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1040 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1041 | (void) cached_has_bits; |
1042 | |
1043 | nodes_.MergeFrom(from.nodes_); |
1044 | concrete_functions_.MergeFrom(from.concrete_functions_); |
1045 | } |
1046 | |
1047 | void SavedObjectGraph::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1048 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedObjectGraph) |
1049 | if (&from == this) return; |
1050 | Clear(); |
1051 | MergeFrom(from); |
1052 | } |
1053 | |
1054 | void SavedObjectGraph::CopyFrom(const SavedObjectGraph& from) { |
1055 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedObjectGraph) |
1056 | if (&from == this) return; |
1057 | Clear(); |
1058 | MergeFrom(from); |
1059 | } |
1060 | |
1061 | bool SavedObjectGraph::IsInitialized() const { |
1062 | return true; |
1063 | } |
1064 | |
1065 | void SavedObjectGraph::InternalSwap(SavedObjectGraph* other) { |
1066 | using std::swap; |
1067 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1068 | CastToBase(&nodes_)->InternalSwap(CastToBase(&other->nodes_)); |
1069 | concrete_functions_.Swap(&other->concrete_functions_); |
1070 | } |
1071 | |
1072 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedObjectGraph::GetMetadata() const { |
1073 | return GetMetadataStatic(); |
1074 | } |
1075 | |
1076 | |
1077 | // =================================================================== |
1078 | |
1079 | SavedObject_SaveableObjectsEntry_DoNotUse::SavedObject_SaveableObjectsEntry_DoNotUse() {} |
1080 | SavedObject_SaveableObjectsEntry_DoNotUse::SavedObject_SaveableObjectsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
1081 | : SuperType(arena) {} |
1082 | void SavedObject_SaveableObjectsEntry_DoNotUse::MergeFrom(const SavedObject_SaveableObjectsEntry_DoNotUse& other) { |
1083 | MergeFromInternal(other); |
1084 | } |
1085 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedObject_SaveableObjectsEntry_DoNotUse::GetMetadata() const { |
1086 | return GetMetadataStatic(); |
1087 | } |
1088 | void SavedObject_SaveableObjectsEntry_DoNotUse::MergeFrom( |
1089 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
1090 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
1091 | } |
1092 | |
1093 | |
1094 | // =================================================================== |
1095 | |
1096 | void SavedObject::InitAsDefaultInstance() { |
1097 | ::tensorflow::_SavedObject_default_instance_.user_object_ = const_cast< ::tensorflow::SavedUserObject*>( |
1098 | ::tensorflow::SavedUserObject::internal_default_instance()); |
1099 | ::tensorflow::_SavedObject_default_instance_.asset_ = const_cast< ::tensorflow::SavedAsset*>( |
1100 | ::tensorflow::SavedAsset::internal_default_instance()); |
1101 | ::tensorflow::_SavedObject_default_instance_.function_ = const_cast< ::tensorflow::SavedFunction*>( |
1102 | ::tensorflow::SavedFunction::internal_default_instance()); |
1103 | ::tensorflow::_SavedObject_default_instance_.variable_ = const_cast< ::tensorflow::SavedVariable*>( |
1104 | ::tensorflow::SavedVariable::internal_default_instance()); |
1105 | ::tensorflow::_SavedObject_default_instance_.bare_concrete_function_ = const_cast< ::tensorflow::SavedBareConcreteFunction*>( |
1106 | ::tensorflow::SavedBareConcreteFunction::internal_default_instance()); |
1107 | ::tensorflow::_SavedObject_default_instance_.constant_ = const_cast< ::tensorflow::SavedConstant*>( |
1108 | ::tensorflow::SavedConstant::internal_default_instance()); |
1109 | ::tensorflow::_SavedObject_default_instance_.resource_ = const_cast< ::tensorflow::SavedResource*>( |
1110 | ::tensorflow::SavedResource::internal_default_instance()); |
1111 | ::tensorflow::_SavedObject_default_instance_.captured_tensor_ = const_cast< ::tensorflow::CapturedTensor*>( |
1112 | ::tensorflow::CapturedTensor::internal_default_instance()); |
1113 | ::tensorflow::_SavedObject_default_instance_._instance.get_mutable()->serialized_user_proto_ = const_cast< PROTOBUF_NAMESPACE_ID::Any*>( |
1114 | PROTOBUF_NAMESPACE_ID::Any::internal_default_instance()); |
1115 | } |
1116 | class SavedObject::_Internal { |
1117 | public: |
1118 | static const ::tensorflow::SavedUserObject& user_object(const SavedObject* msg); |
1119 | static const ::tensorflow::SavedAsset& asset(const SavedObject* msg); |
1120 | static const ::tensorflow::SavedFunction& function(const SavedObject* msg); |
1121 | static const ::tensorflow::SavedVariable& variable(const SavedObject* msg); |
1122 | static const ::tensorflow::SavedBareConcreteFunction& bare_concrete_function(const SavedObject* msg); |
1123 | static const ::tensorflow::SavedConstant& constant(const SavedObject* msg); |
1124 | static const ::tensorflow::SavedResource& resource(const SavedObject* msg); |
1125 | static const ::tensorflow::CapturedTensor& captured_tensor(const SavedObject* msg); |
1126 | static const PROTOBUF_NAMESPACE_ID::Any& serialized_user_proto(const SavedObject* msg); |
1127 | }; |
1128 | |
1129 | const ::tensorflow::SavedUserObject& |
1130 | SavedObject::_Internal::user_object(const SavedObject* msg) { |
1131 | return *msg->kind_.user_object_; |
1132 | } |
1133 | const ::tensorflow::SavedAsset& |
1134 | SavedObject::_Internal::asset(const SavedObject* msg) { |
1135 | return *msg->kind_.asset_; |
1136 | } |
1137 | const ::tensorflow::SavedFunction& |
1138 | SavedObject::_Internal::function(const SavedObject* msg) { |
1139 | return *msg->kind_.function_; |
1140 | } |
1141 | const ::tensorflow::SavedVariable& |
1142 | SavedObject::_Internal::variable(const SavedObject* msg) { |
1143 | return *msg->kind_.variable_; |
1144 | } |
1145 | const ::tensorflow::SavedBareConcreteFunction& |
1146 | SavedObject::_Internal::bare_concrete_function(const SavedObject* msg) { |
1147 | return *msg->kind_.bare_concrete_function_; |
1148 | } |
1149 | const ::tensorflow::SavedConstant& |
1150 | SavedObject::_Internal::constant(const SavedObject* msg) { |
1151 | return *msg->kind_.constant_; |
1152 | } |
1153 | const ::tensorflow::SavedResource& |
1154 | SavedObject::_Internal::resource(const SavedObject* msg) { |
1155 | return *msg->kind_.resource_; |
1156 | } |
1157 | const ::tensorflow::CapturedTensor& |
1158 | SavedObject::_Internal::captured_tensor(const SavedObject* msg) { |
1159 | return *msg->kind_.captured_tensor_; |
1160 | } |
1161 | const PROTOBUF_NAMESPACE_ID::Any& |
1162 | SavedObject::_Internal::serialized_user_proto(const SavedObject* msg) { |
1163 | return *msg->serialized_user_proto_; |
1164 | } |
1165 | void SavedObject::clear_children() { |
1166 | children_.Clear(); |
1167 | } |
1168 | void SavedObject::clear_dependencies() { |
1169 | dependencies_.Clear(); |
1170 | } |
1171 | void SavedObject::clear_slot_variables() { |
1172 | slot_variables_.Clear(); |
1173 | } |
1174 | void SavedObject::set_allocated_user_object(::tensorflow::SavedUserObject* user_object) { |
1175 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
1176 | clear_kind(); |
1177 | if (user_object) { |
1178 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1179 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(user_object); |
1180 | if (message_arena != submessage_arena) { |
1181 | user_object = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1182 | message_arena, user_object, submessage_arena); |
1183 | } |
1184 | set_has_user_object(); |
1185 | kind_.user_object_ = user_object; |
1186 | } |
1187 | // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.user_object) |
1188 | } |
1189 | void SavedObject::set_allocated_asset(::tensorflow::SavedAsset* asset) { |
1190 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
1191 | clear_kind(); |
1192 | if (asset) { |
1193 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1194 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(asset); |
1195 | if (message_arena != submessage_arena) { |
1196 | asset = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1197 | message_arena, asset, submessage_arena); |
1198 | } |
1199 | set_has_asset(); |
1200 | kind_.asset_ = asset; |
1201 | } |
1202 | // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.asset) |
1203 | } |
1204 | void SavedObject::set_allocated_function(::tensorflow::SavedFunction* function) { |
1205 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
1206 | clear_kind(); |
1207 | if (function) { |
1208 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1209 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(function); |
1210 | if (message_arena != submessage_arena) { |
1211 | function = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1212 | message_arena, function, submessage_arena); |
1213 | } |
1214 | set_has_function(); |
1215 | kind_.function_ = function; |
1216 | } |
1217 | // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.function) |
1218 | } |
1219 | void SavedObject::set_allocated_variable(::tensorflow::SavedVariable* variable) { |
1220 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
1221 | clear_kind(); |
1222 | if (variable) { |
1223 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1224 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(variable); |
1225 | if (message_arena != submessage_arena) { |
1226 | variable = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1227 | message_arena, variable, submessage_arena); |
1228 | } |
1229 | set_has_variable(); |
1230 | kind_.variable_ = variable; |
1231 | } |
1232 | // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.variable) |
1233 | } |
1234 | void SavedObject::set_allocated_bare_concrete_function(::tensorflow::SavedBareConcreteFunction* bare_concrete_function) { |
1235 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
1236 | clear_kind(); |
1237 | if (bare_concrete_function) { |
1238 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1239 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(bare_concrete_function); |
1240 | if (message_arena != submessage_arena) { |
1241 | bare_concrete_function = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1242 | message_arena, bare_concrete_function, submessage_arena); |
1243 | } |
1244 | set_has_bare_concrete_function(); |
1245 | kind_.bare_concrete_function_ = bare_concrete_function; |
1246 | } |
1247 | // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.bare_concrete_function) |
1248 | } |
1249 | void SavedObject::set_allocated_constant(::tensorflow::SavedConstant* constant) { |
1250 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
1251 | clear_kind(); |
1252 | if (constant) { |
1253 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1254 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(constant); |
1255 | if (message_arena != submessage_arena) { |
1256 | constant = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1257 | message_arena, constant, submessage_arena); |
1258 | } |
1259 | set_has_constant(); |
1260 | kind_.constant_ = constant; |
1261 | } |
1262 | // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.constant) |
1263 | } |
1264 | void SavedObject::set_allocated_resource(::tensorflow::SavedResource* resource) { |
1265 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
1266 | clear_kind(); |
1267 | if (resource) { |
1268 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1269 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(resource); |
1270 | if (message_arena != submessage_arena) { |
1271 | resource = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1272 | message_arena, resource, submessage_arena); |
1273 | } |
1274 | set_has_resource(); |
1275 | kind_.resource_ = resource; |
1276 | } |
1277 | // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.resource) |
1278 | } |
1279 | void SavedObject::set_allocated_captured_tensor(::tensorflow::CapturedTensor* captured_tensor) { |
1280 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
1281 | clear_kind(); |
1282 | if (captured_tensor) { |
1283 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1284 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(captured_tensor); |
1285 | if (message_arena != submessage_arena) { |
1286 | captured_tensor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1287 | message_arena, captured_tensor, submessage_arena); |
1288 | } |
1289 | set_has_captured_tensor(); |
1290 | kind_.captured_tensor_ = captured_tensor; |
1291 | } |
1292 | // @@protoc_insertion_point(field_set_allocated:tensorflow.SavedObject.captured_tensor) |
1293 | } |
1294 | void SavedObject::unsafe_arena_set_allocated_serialized_user_proto( |
1295 | PROTOBUF_NAMESPACE_ID::Any* serialized_user_proto) { |
1296 | if (GetArenaNoVirtual() == nullptr) { |
1297 | delete serialized_user_proto_; |
1298 | } |
1299 | serialized_user_proto_ = serialized_user_proto; |
1300 | if (serialized_user_proto) { |
1301 | |
1302 | } else { |
1303 | |
1304 | } |
1305 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedObject.serialized_user_proto) |
1306 | } |
1307 | void SavedObject::clear_serialized_user_proto() { |
1308 | if (GetArenaNoVirtual() == nullptr && serialized_user_proto_ != nullptr) { |
1309 | delete serialized_user_proto_; |
1310 | } |
1311 | serialized_user_proto_ = nullptr; |
1312 | } |
1313 | SavedObject::SavedObject() |
1314 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1315 | SharedCtor(); |
1316 | // @@protoc_insertion_point(constructor:tensorflow.SavedObject) |
1317 | } |
1318 | SavedObject::SavedObject(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
1319 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1320 | _internal_metadata_(arena), |
1321 | children_(arena), |
1322 | slot_variables_(arena), |
1323 | saveable_objects_(arena), |
1324 | dependencies_(arena) { |
1325 | SharedCtor(); |
1326 | RegisterArenaDtor(arena); |
1327 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedObject) |
1328 | } |
1329 | SavedObject::SavedObject(const SavedObject& from) |
1330 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1331 | _internal_metadata_(nullptr), |
1332 | children_(from.children_), |
1333 | slot_variables_(from.slot_variables_), |
1334 | dependencies_(from.dependencies_) { |
1335 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1336 | saveable_objects_.MergeFrom(from.saveable_objects_); |
1337 | registered_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1338 | if (!from.registered_name().empty()) { |
1339 | registered_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.registered_name(), |
1340 | GetArenaNoVirtual()); |
1341 | } |
1342 | registered_saver_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1343 | if (!from.registered_saver().empty()) { |
1344 | registered_saver_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.registered_saver(), |
1345 | GetArenaNoVirtual()); |
1346 | } |
1347 | if (from.has_serialized_user_proto()) { |
1348 | serialized_user_proto_ = new PROTOBUF_NAMESPACE_ID::Any(*from.serialized_user_proto_); |
1349 | } else { |
1350 | serialized_user_proto_ = nullptr; |
1351 | } |
1352 | clear_has_kind(); |
1353 | switch (from.kind_case()) { |
1354 | case kUserObject: { |
1355 | mutable_user_object()->::tensorflow::SavedUserObject::MergeFrom(from.user_object()); |
1356 | break; |
1357 | } |
1358 | case kAsset: { |
1359 | mutable_asset()->::tensorflow::SavedAsset::MergeFrom(from.asset()); |
1360 | break; |
1361 | } |
1362 | case kFunction: { |
1363 | mutable_function()->::tensorflow::SavedFunction::MergeFrom(from.function()); |
1364 | break; |
1365 | } |
1366 | case kVariable: { |
1367 | mutable_variable()->::tensorflow::SavedVariable::MergeFrom(from.variable()); |
1368 | break; |
1369 | } |
1370 | case kBareConcreteFunction: { |
1371 | mutable_bare_concrete_function()->::tensorflow::SavedBareConcreteFunction::MergeFrom(from.bare_concrete_function()); |
1372 | break; |
1373 | } |
1374 | case kConstant: { |
1375 | mutable_constant()->::tensorflow::SavedConstant::MergeFrom(from.constant()); |
1376 | break; |
1377 | } |
1378 | case kResource: { |
1379 | mutable_resource()->::tensorflow::SavedResource::MergeFrom(from.resource()); |
1380 | break; |
1381 | } |
1382 | case kCapturedTensor: { |
1383 | mutable_captured_tensor()->::tensorflow::CapturedTensor::MergeFrom(from.captured_tensor()); |
1384 | break; |
1385 | } |
1386 | case KIND_NOT_SET: { |
1387 | break; |
1388 | } |
1389 | } |
1390 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedObject) |
1391 | } |
1392 | |
1393 | void SavedObject::SharedCtor() { |
1394 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SavedObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
1395 | registered_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1396 | registered_saver_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1397 | serialized_user_proto_ = nullptr; |
1398 | clear_has_kind(); |
1399 | } |
1400 | |
1401 | SavedObject::~SavedObject() { |
1402 | // @@protoc_insertion_point(destructor:tensorflow.SavedObject) |
1403 | SharedDtor(); |
1404 | } |
1405 | |
1406 | void SavedObject::SharedDtor() { |
1407 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
1408 | registered_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1409 | registered_saver_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1410 | if (this != internal_default_instance()) delete serialized_user_proto_; |
1411 | if (has_kind()) { |
1412 | clear_kind(); |
1413 | } |
1414 | } |
1415 | |
1416 | void SavedObject::ArenaDtor(void* object) { |
1417 | SavedObject* _this = reinterpret_cast< SavedObject* >(object); |
1418 | (void)_this; |
1419 | } |
1420 | void SavedObject::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
1421 | } |
1422 | void SavedObject::SetCachedSize(int size) const { |
1423 | _cached_size_.Set(size); |
1424 | } |
1425 | const SavedObject& SavedObject::default_instance() { |
1426 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
1427 | return *internal_default_instance(); |
1428 | } |
1429 | |
1430 | |
1431 | void SavedObject::clear_kind() { |
1432 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.SavedObject) |
1433 | switch (kind_case()) { |
1434 | case kUserObject: { |
1435 | if (GetArenaNoVirtual() == nullptr) { |
1436 | delete kind_.user_object_; |
1437 | } |
1438 | break; |
1439 | } |
1440 | case kAsset: { |
1441 | if (GetArenaNoVirtual() == nullptr) { |
1442 | delete kind_.asset_; |
1443 | } |
1444 | break; |
1445 | } |
1446 | case kFunction: { |
1447 | if (GetArenaNoVirtual() == nullptr) { |
1448 | delete kind_.function_; |
1449 | } |
1450 | break; |
1451 | } |
1452 | case kVariable: { |
1453 | if (GetArenaNoVirtual() == nullptr) { |
1454 | delete kind_.variable_; |
1455 | } |
1456 | break; |
1457 | } |
1458 | case kBareConcreteFunction: { |
1459 | if (GetArenaNoVirtual() == nullptr) { |
1460 | delete kind_.bare_concrete_function_; |
1461 | } |
1462 | break; |
1463 | } |
1464 | case kConstant: { |
1465 | if (GetArenaNoVirtual() == nullptr) { |
1466 | delete kind_.constant_; |
1467 | } |
1468 | break; |
1469 | } |
1470 | case kResource: { |
1471 | if (GetArenaNoVirtual() == nullptr) { |
1472 | delete kind_.resource_; |
1473 | } |
1474 | break; |
1475 | } |
1476 | case kCapturedTensor: { |
1477 | if (GetArenaNoVirtual() == nullptr) { |
1478 | delete kind_.captured_tensor_; |
1479 | } |
1480 | break; |
1481 | } |
1482 | case KIND_NOT_SET: { |
1483 | break; |
1484 | } |
1485 | } |
1486 | _oneof_case_[0] = KIND_NOT_SET; |
1487 | } |
1488 | |
1489 | |
1490 | void SavedObject::Clear() { |
1491 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedObject) |
1492 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1493 | // Prevent compiler warnings about cached_has_bits being unused |
1494 | (void) cached_has_bits; |
1495 | |
1496 | children_.Clear(); |
1497 | slot_variables_.Clear(); |
1498 | saveable_objects_.Clear(); |
1499 | dependencies_.Clear(); |
1500 | registered_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
1501 | registered_saver_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
1502 | if (GetArenaNoVirtual() == nullptr && serialized_user_proto_ != nullptr) { |
1503 | delete serialized_user_proto_; |
1504 | } |
1505 | serialized_user_proto_ = nullptr; |
1506 | clear_kind(); |
1507 | _internal_metadata_.Clear(); |
1508 | } |
1509 | |
1510 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1511 | const char* SavedObject::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1512 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1513 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
1514 | while (!ctx->Done(&ptr)) { |
1515 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1516 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1517 | CHK_(ptr); |
1518 | switch (tag >> 3) { |
1519 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; |
1520 | case 1: |
1521 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1522 | ptr -= 1; |
1523 | do { |
1524 | ptr += 1; |
1525 | ptr = ctx->ParseMessage(add_children(), ptr); |
1526 | CHK_(ptr); |
1527 | if (!ctx->DataAvailable(ptr)) break; |
1528 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
1529 | } else goto handle_unusual; |
1530 | continue; |
1531 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; |
1532 | case 3: |
1533 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
1534 | ptr -= 1; |
1535 | do { |
1536 | ptr += 1; |
1537 | ptr = ctx->ParseMessage(add_slot_variables(), ptr); |
1538 | CHK_(ptr); |
1539 | if (!ctx->DataAvailable(ptr)) break; |
1540 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); |
1541 | } else goto handle_unusual; |
1542 | continue; |
1543 | // .tensorflow.SavedUserObject user_object = 4; |
1544 | case 4: |
1545 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
1546 | ptr = ctx->ParseMessage(mutable_user_object(), ptr); |
1547 | CHK_(ptr); |
1548 | } else goto handle_unusual; |
1549 | continue; |
1550 | // .tensorflow.SavedAsset asset = 5; |
1551 | case 5: |
1552 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
1553 | ptr = ctx->ParseMessage(mutable_asset(), ptr); |
1554 | CHK_(ptr); |
1555 | } else goto handle_unusual; |
1556 | continue; |
1557 | // .tensorflow.SavedFunction function = 6; |
1558 | case 6: |
1559 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
1560 | ptr = ctx->ParseMessage(mutable_function(), ptr); |
1561 | CHK_(ptr); |
1562 | } else goto handle_unusual; |
1563 | continue; |
1564 | // .tensorflow.SavedVariable variable = 7; |
1565 | case 7: |
1566 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
1567 | ptr = ctx->ParseMessage(mutable_variable(), ptr); |
1568 | CHK_(ptr); |
1569 | } else goto handle_unusual; |
1570 | continue; |
1571 | // .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; |
1572 | case 8: |
1573 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { |
1574 | ptr = ctx->ParseMessage(mutable_bare_concrete_function(), ptr); |
1575 | CHK_(ptr); |
1576 | } else goto handle_unusual; |
1577 | continue; |
1578 | // .tensorflow.SavedConstant constant = 9; |
1579 | case 9: |
1580 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { |
1581 | ptr = ctx->ParseMessage(mutable_constant(), ptr); |
1582 | CHK_(ptr); |
1583 | } else goto handle_unusual; |
1584 | continue; |
1585 | // .tensorflow.SavedResource resource = 10; |
1586 | case 10: |
1587 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { |
1588 | ptr = ctx->ParseMessage(mutable_resource(), ptr); |
1589 | CHK_(ptr); |
1590 | } else goto handle_unusual; |
1591 | continue; |
1592 | // map<string, .tensorflow.SaveableObject> saveable_objects = 11; |
1593 | case 11: |
1594 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) { |
1595 | ptr -= 1; |
1596 | do { |
1597 | ptr += 1; |
1598 | ptr = ctx->ParseMessage(&saveable_objects_, ptr); |
1599 | CHK_(ptr); |
1600 | if (!ctx->DataAvailable(ptr)) break; |
1601 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 90); |
1602 | } else goto handle_unusual; |
1603 | continue; |
1604 | // .tensorflow.CapturedTensor captured_tensor = 12; |
1605 | case 12: |
1606 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { |
1607 | ptr = ctx->ParseMessage(mutable_captured_tensor(), ptr); |
1608 | CHK_(ptr); |
1609 | } else goto handle_unusual; |
1610 | continue; |
1611 | // string registered_name = 13; |
1612 | case 13: |
1613 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { |
1614 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_registered_name(), ptr, ctx, "tensorflow.SavedObject.registered_name" ); |
1615 | CHK_(ptr); |
1616 | } else goto handle_unusual; |
1617 | continue; |
1618 | // .google.protobuf.Any serialized_user_proto = 14; |
1619 | case 14: |
1620 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) { |
1621 | ptr = ctx->ParseMessage(mutable_serialized_user_proto(), ptr); |
1622 | CHK_(ptr); |
1623 | } else goto handle_unusual; |
1624 | continue; |
1625 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference dependencies = 15; |
1626 | case 15: |
1627 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) { |
1628 | ptr -= 1; |
1629 | do { |
1630 | ptr += 1; |
1631 | ptr = ctx->ParseMessage(add_dependencies(), ptr); |
1632 | CHK_(ptr); |
1633 | if (!ctx->DataAvailable(ptr)) break; |
1634 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 122); |
1635 | } else goto handle_unusual; |
1636 | continue; |
1637 | // string registered_saver = 16; |
1638 | case 16: |
1639 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 130)) { |
1640 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_registered_saver(), ptr, ctx, "tensorflow.SavedObject.registered_saver" ); |
1641 | CHK_(ptr); |
1642 | } else goto handle_unusual; |
1643 | continue; |
1644 | default: { |
1645 | handle_unusual: |
1646 | if ((tag & 7) == 4 || tag == 0) { |
1647 | ctx->SetLastTag(tag); |
1648 | goto success; |
1649 | } |
1650 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1651 | CHK_(ptr != nullptr); |
1652 | continue; |
1653 | } |
1654 | } // switch |
1655 | } // while |
1656 | success: |
1657 | return ptr; |
1658 | failure: |
1659 | ptr = nullptr; |
1660 | goto success; |
1661 | #undef CHK_ |
1662 | } |
1663 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1664 | bool SavedObject::MergePartialFromCodedStream( |
1665 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1666 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1667 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1668 | // @@protoc_insertion_point(parse_start:tensorflow.SavedObject) |
1669 | for (;;) { |
1670 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); |
1671 | tag = p.first; |
1672 | if (!p.second) goto handle_unusual; |
1673 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1674 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; |
1675 | case 1: { |
1676 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1677 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1678 | input, add_children())); |
1679 | } else { |
1680 | goto handle_unusual; |
1681 | } |
1682 | break; |
1683 | } |
1684 | |
1685 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; |
1686 | case 3: { |
1687 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
1688 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1689 | input, add_slot_variables())); |
1690 | } else { |
1691 | goto handle_unusual; |
1692 | } |
1693 | break; |
1694 | } |
1695 | |
1696 | // .tensorflow.SavedUserObject user_object = 4; |
1697 | case 4: { |
1698 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
1699 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1700 | input, mutable_user_object())); |
1701 | } else { |
1702 | goto handle_unusual; |
1703 | } |
1704 | break; |
1705 | } |
1706 | |
1707 | // .tensorflow.SavedAsset asset = 5; |
1708 | case 5: { |
1709 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
1710 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1711 | input, mutable_asset())); |
1712 | } else { |
1713 | goto handle_unusual; |
1714 | } |
1715 | break; |
1716 | } |
1717 | |
1718 | // .tensorflow.SavedFunction function = 6; |
1719 | case 6: { |
1720 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { |
1721 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1722 | input, mutable_function())); |
1723 | } else { |
1724 | goto handle_unusual; |
1725 | } |
1726 | break; |
1727 | } |
1728 | |
1729 | // .tensorflow.SavedVariable variable = 7; |
1730 | case 7: { |
1731 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
1732 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1733 | input, mutable_variable())); |
1734 | } else { |
1735 | goto handle_unusual; |
1736 | } |
1737 | break; |
1738 | } |
1739 | |
1740 | // .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; |
1741 | case 8: { |
1742 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { |
1743 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1744 | input, mutable_bare_concrete_function())); |
1745 | } else { |
1746 | goto handle_unusual; |
1747 | } |
1748 | break; |
1749 | } |
1750 | |
1751 | // .tensorflow.SavedConstant constant = 9; |
1752 | case 9: { |
1753 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) { |
1754 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1755 | input, mutable_constant())); |
1756 | } else { |
1757 | goto handle_unusual; |
1758 | } |
1759 | break; |
1760 | } |
1761 | |
1762 | // .tensorflow.SavedResource resource = 10; |
1763 | case 10: { |
1764 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { |
1765 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1766 | input, mutable_resource())); |
1767 | } else { |
1768 | goto handle_unusual; |
1769 | } |
1770 | break; |
1771 | } |
1772 | |
1773 | // map<string, .tensorflow.SaveableObject> saveable_objects = 11; |
1774 | case 11: { |
1775 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { |
1776 | SavedObject_SaveableObjectsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
1777 | SavedObject_SaveableObjectsEntry_DoNotUse, |
1778 | std::string, ::tensorflow::SaveableObject, |
1779 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
1780 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
1781 | 0 >, |
1782 | ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject > > parser(&saveable_objects_); |
1783 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
1784 | input, &parser)); |
1785 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1786 | parser.key().data(), static_cast<int>(parser.key().length()), |
1787 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1788 | "tensorflow.SavedObject.SaveableObjectsEntry.key" )); |
1789 | } else { |
1790 | goto handle_unusual; |
1791 | } |
1792 | break; |
1793 | } |
1794 | |
1795 | // .tensorflow.CapturedTensor captured_tensor = 12; |
1796 | case 12: { |
1797 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (98 & 0xFF)) { |
1798 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1799 | input, mutable_captured_tensor())); |
1800 | } else { |
1801 | goto handle_unusual; |
1802 | } |
1803 | break; |
1804 | } |
1805 | |
1806 | // string registered_name = 13; |
1807 | case 13: { |
1808 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (106 & 0xFF)) { |
1809 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1810 | input, this->mutable_registered_name())); |
1811 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1812 | this->registered_name().data(), static_cast<int>(this->registered_name().length()), |
1813 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1814 | "tensorflow.SavedObject.registered_name" )); |
1815 | } else { |
1816 | goto handle_unusual; |
1817 | } |
1818 | break; |
1819 | } |
1820 | |
1821 | // .google.protobuf.Any serialized_user_proto = 14; |
1822 | case 14: { |
1823 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (114 & 0xFF)) { |
1824 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1825 | input, mutable_serialized_user_proto())); |
1826 | } else { |
1827 | goto handle_unusual; |
1828 | } |
1829 | break; |
1830 | } |
1831 | |
1832 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference dependencies = 15; |
1833 | case 15: { |
1834 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) { |
1835 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1836 | input, add_dependencies())); |
1837 | } else { |
1838 | goto handle_unusual; |
1839 | } |
1840 | break; |
1841 | } |
1842 | |
1843 | // string registered_saver = 16; |
1844 | case 16: { |
1845 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (130 & 0xFF)) { |
1846 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1847 | input, this->mutable_registered_saver())); |
1848 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1849 | this->registered_saver().data(), static_cast<int>(this->registered_saver().length()), |
1850 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1851 | "tensorflow.SavedObject.registered_saver" )); |
1852 | } else { |
1853 | goto handle_unusual; |
1854 | } |
1855 | break; |
1856 | } |
1857 | |
1858 | default: { |
1859 | handle_unusual: |
1860 | if (tag == 0) { |
1861 | goto success; |
1862 | } |
1863 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1864 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1865 | break; |
1866 | } |
1867 | } |
1868 | } |
1869 | success: |
1870 | // @@protoc_insertion_point(parse_success:tensorflow.SavedObject) |
1871 | return true; |
1872 | failure: |
1873 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedObject) |
1874 | return false; |
1875 | #undef DO_ |
1876 | } |
1877 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1878 | |
1879 | void SavedObject::SerializeWithCachedSizes( |
1880 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1881 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedObject) |
1882 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1883 | (void) cached_has_bits; |
1884 | |
1885 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; |
1886 | for (unsigned int i = 0, |
1887 | n = static_cast<unsigned int>(this->children_size()); i < n; i++) { |
1888 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1889 | 1, |
1890 | this->children(static_cast<int>(i)), |
1891 | output); |
1892 | } |
1893 | |
1894 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; |
1895 | for (unsigned int i = 0, |
1896 | n = static_cast<unsigned int>(this->slot_variables_size()); i < n; i++) { |
1897 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1898 | 3, |
1899 | this->slot_variables(static_cast<int>(i)), |
1900 | output); |
1901 | } |
1902 | |
1903 | // .tensorflow.SavedUserObject user_object = 4; |
1904 | if (has_user_object()) { |
1905 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1906 | 4, _Internal::user_object(this), output); |
1907 | } |
1908 | |
1909 | // .tensorflow.SavedAsset asset = 5; |
1910 | if (has_asset()) { |
1911 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1912 | 5, _Internal::asset(this), output); |
1913 | } |
1914 | |
1915 | // .tensorflow.SavedFunction function = 6; |
1916 | if (has_function()) { |
1917 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1918 | 6, _Internal::function(this), output); |
1919 | } |
1920 | |
1921 | // .tensorflow.SavedVariable variable = 7; |
1922 | if (has_variable()) { |
1923 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1924 | 7, _Internal::variable(this), output); |
1925 | } |
1926 | |
1927 | // .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; |
1928 | if (has_bare_concrete_function()) { |
1929 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1930 | 8, _Internal::bare_concrete_function(this), output); |
1931 | } |
1932 | |
1933 | // .tensorflow.SavedConstant constant = 9; |
1934 | if (has_constant()) { |
1935 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1936 | 9, _Internal::constant(this), output); |
1937 | } |
1938 | |
1939 | // .tensorflow.SavedResource resource = 10; |
1940 | if (has_resource()) { |
1941 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1942 | 10, _Internal::resource(this), output); |
1943 | } |
1944 | |
1945 | // map<string, .tensorflow.SaveableObject> saveable_objects = 11; |
1946 | if (!this->saveable_objects().empty()) { |
1947 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >::const_pointer |
1948 | ConstPtr; |
1949 | typedef ConstPtr SortItem; |
1950 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
1951 | struct Utf8Check { |
1952 | static void Check(ConstPtr p) { |
1953 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1954 | p->first.data(), static_cast<int>(p->first.length()), |
1955 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1956 | "tensorflow.SavedObject.SaveableObjectsEntry.key" ); |
1957 | } |
1958 | }; |
1959 | |
1960 | if (output->IsSerializationDeterministic() && |
1961 | this->saveable_objects().size() > 1) { |
1962 | ::std::unique_ptr<SortItem[]> items( |
1963 | new SortItem[this->saveable_objects().size()]); |
1964 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >::size_type size_type; |
1965 | size_type n = 0; |
1966 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >::const_iterator |
1967 | it = this->saveable_objects().begin(); |
1968 | it != this->saveable_objects().end(); ++it, ++n) { |
1969 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
1970 | } |
1971 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
1972 | for (size_type i = 0; i < n; i++) { |
1973 | SavedObject_SaveableObjectsEntry_DoNotUse::Funcs::SerializeToCodedStream(11, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output); |
1974 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
1975 | } |
1976 | } else { |
1977 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >::const_iterator |
1978 | it = this->saveable_objects().begin(); |
1979 | it != this->saveable_objects().end(); ++it) { |
1980 | SavedObject_SaveableObjectsEntry_DoNotUse::Funcs::SerializeToCodedStream(11, it->first, it->second, output); |
1981 | Utf8Check::Check(&(*it)); |
1982 | } |
1983 | } |
1984 | } |
1985 | |
1986 | // .tensorflow.CapturedTensor captured_tensor = 12; |
1987 | if (has_captured_tensor()) { |
1988 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1989 | 12, _Internal::captured_tensor(this), output); |
1990 | } |
1991 | |
1992 | // string registered_name = 13; |
1993 | if (this->registered_name().size() > 0) { |
1994 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1995 | this->registered_name().data(), static_cast<int>(this->registered_name().length()), |
1996 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1997 | "tensorflow.SavedObject.registered_name" ); |
1998 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1999 | 13, this->registered_name(), output); |
2000 | } |
2001 | |
2002 | // .google.protobuf.Any serialized_user_proto = 14; |
2003 | if (this->has_serialized_user_proto()) { |
2004 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
2005 | 14, _Internal::serialized_user_proto(this), output); |
2006 | } |
2007 | |
2008 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference dependencies = 15; |
2009 | for (unsigned int i = 0, |
2010 | n = static_cast<unsigned int>(this->dependencies_size()); i < n; i++) { |
2011 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
2012 | 15, |
2013 | this->dependencies(static_cast<int>(i)), |
2014 | output); |
2015 | } |
2016 | |
2017 | // string registered_saver = 16; |
2018 | if (this->registered_saver().size() > 0) { |
2019 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2020 | this->registered_saver().data(), static_cast<int>(this->registered_saver().length()), |
2021 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2022 | "tensorflow.SavedObject.registered_saver" ); |
2023 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
2024 | 16, this->registered_saver(), output); |
2025 | } |
2026 | |
2027 | if (_internal_metadata_.have_unknown_fields()) { |
2028 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2029 | _internal_metadata_.unknown_fields(), output); |
2030 | } |
2031 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedObject) |
2032 | } |
2033 | |
2034 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedObject::InternalSerializeWithCachedSizesToArray( |
2035 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2036 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedObject) |
2037 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2038 | (void) cached_has_bits; |
2039 | |
2040 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; |
2041 | for (unsigned int i = 0, |
2042 | n = static_cast<unsigned int>(this->children_size()); i < n; i++) { |
2043 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2044 | InternalWriteMessageToArray( |
2045 | 1, this->children(static_cast<int>(i)), target); |
2046 | } |
2047 | |
2048 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; |
2049 | for (unsigned int i = 0, |
2050 | n = static_cast<unsigned int>(this->slot_variables_size()); i < n; i++) { |
2051 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2052 | InternalWriteMessageToArray( |
2053 | 3, this->slot_variables(static_cast<int>(i)), target); |
2054 | } |
2055 | |
2056 | // .tensorflow.SavedUserObject user_object = 4; |
2057 | if (has_user_object()) { |
2058 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2059 | InternalWriteMessageToArray( |
2060 | 4, _Internal::user_object(this), target); |
2061 | } |
2062 | |
2063 | // .tensorflow.SavedAsset asset = 5; |
2064 | if (has_asset()) { |
2065 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2066 | InternalWriteMessageToArray( |
2067 | 5, _Internal::asset(this), target); |
2068 | } |
2069 | |
2070 | // .tensorflow.SavedFunction function = 6; |
2071 | if (has_function()) { |
2072 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2073 | InternalWriteMessageToArray( |
2074 | 6, _Internal::function(this), target); |
2075 | } |
2076 | |
2077 | // .tensorflow.SavedVariable variable = 7; |
2078 | if (has_variable()) { |
2079 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2080 | InternalWriteMessageToArray( |
2081 | 7, _Internal::variable(this), target); |
2082 | } |
2083 | |
2084 | // .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; |
2085 | if (has_bare_concrete_function()) { |
2086 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2087 | InternalWriteMessageToArray( |
2088 | 8, _Internal::bare_concrete_function(this), target); |
2089 | } |
2090 | |
2091 | // .tensorflow.SavedConstant constant = 9; |
2092 | if (has_constant()) { |
2093 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2094 | InternalWriteMessageToArray( |
2095 | 9, _Internal::constant(this), target); |
2096 | } |
2097 | |
2098 | // .tensorflow.SavedResource resource = 10; |
2099 | if (has_resource()) { |
2100 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2101 | InternalWriteMessageToArray( |
2102 | 10, _Internal::resource(this), target); |
2103 | } |
2104 | |
2105 | // map<string, .tensorflow.SaveableObject> saveable_objects = 11; |
2106 | if (!this->saveable_objects().empty()) { |
2107 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >::const_pointer |
2108 | ConstPtr; |
2109 | typedef ConstPtr SortItem; |
2110 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
2111 | struct Utf8Check { |
2112 | static void Check(ConstPtr p) { |
2113 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2114 | p->first.data(), static_cast<int>(p->first.length()), |
2115 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2116 | "tensorflow.SavedObject.SaveableObjectsEntry.key" ); |
2117 | } |
2118 | }; |
2119 | |
2120 | if (false && |
2121 | this->saveable_objects().size() > 1) { |
2122 | ::std::unique_ptr<SortItem[]> items( |
2123 | new SortItem[this->saveable_objects().size()]); |
2124 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >::size_type size_type; |
2125 | size_type n = 0; |
2126 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >::const_iterator |
2127 | it = this->saveable_objects().begin(); |
2128 | it != this->saveable_objects().end(); ++it, ++n) { |
2129 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
2130 | } |
2131 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
2132 | for (size_type i = 0; i < n; i++) { |
2133 | target = SavedObject_SaveableObjectsEntry_DoNotUse::Funcs::SerializeToArray(11, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target); |
2134 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
2135 | } |
2136 | } else { |
2137 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >::const_iterator |
2138 | it = this->saveable_objects().begin(); |
2139 | it != this->saveable_objects().end(); ++it) { |
2140 | target = SavedObject_SaveableObjectsEntry_DoNotUse::Funcs::SerializeToArray(11, it->first, it->second, target); |
2141 | Utf8Check::Check(&(*it)); |
2142 | } |
2143 | } |
2144 | } |
2145 | |
2146 | // .tensorflow.CapturedTensor captured_tensor = 12; |
2147 | if (has_captured_tensor()) { |
2148 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2149 | InternalWriteMessageToArray( |
2150 | 12, _Internal::captured_tensor(this), target); |
2151 | } |
2152 | |
2153 | // string registered_name = 13; |
2154 | if (this->registered_name().size() > 0) { |
2155 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2156 | this->registered_name().data(), static_cast<int>(this->registered_name().length()), |
2157 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2158 | "tensorflow.SavedObject.registered_name" ); |
2159 | target = |
2160 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
2161 | 13, this->registered_name(), target); |
2162 | } |
2163 | |
2164 | // .google.protobuf.Any serialized_user_proto = 14; |
2165 | if (this->has_serialized_user_proto()) { |
2166 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2167 | InternalWriteMessageToArray( |
2168 | 14, _Internal::serialized_user_proto(this), target); |
2169 | } |
2170 | |
2171 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference dependencies = 15; |
2172 | for (unsigned int i = 0, |
2173 | n = static_cast<unsigned int>(this->dependencies_size()); i < n; i++) { |
2174 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2175 | InternalWriteMessageToArray( |
2176 | 15, this->dependencies(static_cast<int>(i)), target); |
2177 | } |
2178 | |
2179 | // string registered_saver = 16; |
2180 | if (this->registered_saver().size() > 0) { |
2181 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2182 | this->registered_saver().data(), static_cast<int>(this->registered_saver().length()), |
2183 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2184 | "tensorflow.SavedObject.registered_saver" ); |
2185 | target = |
2186 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
2187 | 16, this->registered_saver(), target); |
2188 | } |
2189 | |
2190 | if (_internal_metadata_.have_unknown_fields()) { |
2191 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2192 | _internal_metadata_.unknown_fields(), target); |
2193 | } |
2194 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedObject) |
2195 | return target; |
2196 | } |
2197 | |
2198 | size_t SavedObject::ByteSizeLong() const { |
2199 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedObject) |
2200 | size_t total_size = 0; |
2201 | |
2202 | if (_internal_metadata_.have_unknown_fields()) { |
2203 | total_size += |
2204 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2205 | _internal_metadata_.unknown_fields()); |
2206 | } |
2207 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2208 | // Prevent compiler warnings about cached_has_bits being unused |
2209 | (void) cached_has_bits; |
2210 | |
2211 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference children = 1; |
2212 | { |
2213 | unsigned int count = static_cast<unsigned int>(this->children_size()); |
2214 | total_size += 1UL * count; |
2215 | for (unsigned int i = 0; i < count; i++) { |
2216 | total_size += |
2217 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2218 | this->children(static_cast<int>(i))); |
2219 | } |
2220 | } |
2221 | |
2222 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.SlotVariableReference slot_variables = 3; |
2223 | { |
2224 | unsigned int count = static_cast<unsigned int>(this->slot_variables_size()); |
2225 | total_size += 1UL * count; |
2226 | for (unsigned int i = 0; i < count; i++) { |
2227 | total_size += |
2228 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2229 | this->slot_variables(static_cast<int>(i))); |
2230 | } |
2231 | } |
2232 | |
2233 | // map<string, .tensorflow.SaveableObject> saveable_objects = 11; |
2234 | total_size += 1 * |
2235 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->saveable_objects_size()); |
2236 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SaveableObject >::const_iterator |
2237 | it = this->saveable_objects().begin(); |
2238 | it != this->saveable_objects().end(); ++it) { |
2239 | total_size += SavedObject_SaveableObjectsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
2240 | } |
2241 | |
2242 | // repeated .tensorflow.TrackableObjectGraph.TrackableObject.ObjectReference dependencies = 15; |
2243 | { |
2244 | unsigned int count = static_cast<unsigned int>(this->dependencies_size()); |
2245 | total_size += 1UL * count; |
2246 | for (unsigned int i = 0; i < count; i++) { |
2247 | total_size += |
2248 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2249 | this->dependencies(static_cast<int>(i))); |
2250 | } |
2251 | } |
2252 | |
2253 | // string registered_name = 13; |
2254 | if (this->registered_name().size() > 0) { |
2255 | total_size += 1 + |
2256 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
2257 | this->registered_name()); |
2258 | } |
2259 | |
2260 | // string registered_saver = 16; |
2261 | if (this->registered_saver().size() > 0) { |
2262 | total_size += 2 + |
2263 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
2264 | this->registered_saver()); |
2265 | } |
2266 | |
2267 | // .google.protobuf.Any serialized_user_proto = 14; |
2268 | if (this->has_serialized_user_proto()) { |
2269 | total_size += 1 + |
2270 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2271 | *serialized_user_proto_); |
2272 | } |
2273 | |
2274 | switch (kind_case()) { |
2275 | // .tensorflow.SavedUserObject user_object = 4; |
2276 | case kUserObject: { |
2277 | total_size += 1 + |
2278 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2279 | *kind_.user_object_); |
2280 | break; |
2281 | } |
2282 | // .tensorflow.SavedAsset asset = 5; |
2283 | case kAsset: { |
2284 | total_size += 1 + |
2285 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2286 | *kind_.asset_); |
2287 | break; |
2288 | } |
2289 | // .tensorflow.SavedFunction function = 6; |
2290 | case kFunction: { |
2291 | total_size += 1 + |
2292 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2293 | *kind_.function_); |
2294 | break; |
2295 | } |
2296 | // .tensorflow.SavedVariable variable = 7; |
2297 | case kVariable: { |
2298 | total_size += 1 + |
2299 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2300 | *kind_.variable_); |
2301 | break; |
2302 | } |
2303 | // .tensorflow.SavedBareConcreteFunction bare_concrete_function = 8; |
2304 | case kBareConcreteFunction: { |
2305 | total_size += 1 + |
2306 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2307 | *kind_.bare_concrete_function_); |
2308 | break; |
2309 | } |
2310 | // .tensorflow.SavedConstant constant = 9; |
2311 | case kConstant: { |
2312 | total_size += 1 + |
2313 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2314 | *kind_.constant_); |
2315 | break; |
2316 | } |
2317 | // .tensorflow.SavedResource resource = 10; |
2318 | case kResource: { |
2319 | total_size += 1 + |
2320 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2321 | *kind_.resource_); |
2322 | break; |
2323 | } |
2324 | // .tensorflow.CapturedTensor captured_tensor = 12; |
2325 | case kCapturedTensor: { |
2326 | total_size += 1 + |
2327 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2328 | *kind_.captured_tensor_); |
2329 | break; |
2330 | } |
2331 | case KIND_NOT_SET: { |
2332 | break; |
2333 | } |
2334 | } |
2335 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2336 | SetCachedSize(cached_size); |
2337 | return total_size; |
2338 | } |
2339 | |
2340 | void SavedObject::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2341 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedObject) |
2342 | GOOGLE_DCHECK_NE(&from, this); |
2343 | const SavedObject* source = |
2344 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedObject>( |
2345 | &from); |
2346 | if (source == nullptr) { |
2347 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedObject) |
2348 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2349 | } else { |
2350 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedObject) |
2351 | MergeFrom(*source); |
2352 | } |
2353 | } |
2354 | |
2355 | void SavedObject::MergeFrom(const SavedObject& from) { |
2356 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedObject) |
2357 | GOOGLE_DCHECK_NE(&from, this); |
2358 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2359 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2360 | (void) cached_has_bits; |
2361 | |
2362 | children_.MergeFrom(from.children_); |
2363 | slot_variables_.MergeFrom(from.slot_variables_); |
2364 | saveable_objects_.MergeFrom(from.saveable_objects_); |
2365 | dependencies_.MergeFrom(from.dependencies_); |
2366 | if (from.registered_name().size() > 0) { |
2367 | set_registered_name(from.registered_name()); |
2368 | } |
2369 | if (from.registered_saver().size() > 0) { |
2370 | set_registered_saver(from.registered_saver()); |
2371 | } |
2372 | if (from.has_serialized_user_proto()) { |
2373 | mutable_serialized_user_proto()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from.serialized_user_proto()); |
2374 | } |
2375 | switch (from.kind_case()) { |
2376 | case kUserObject: { |
2377 | mutable_user_object()->::tensorflow::SavedUserObject::MergeFrom(from.user_object()); |
2378 | break; |
2379 | } |
2380 | case kAsset: { |
2381 | mutable_asset()->::tensorflow::SavedAsset::MergeFrom(from.asset()); |
2382 | break; |
2383 | } |
2384 | case kFunction: { |
2385 | mutable_function()->::tensorflow::SavedFunction::MergeFrom(from.function()); |
2386 | break; |
2387 | } |
2388 | case kVariable: { |
2389 | mutable_variable()->::tensorflow::SavedVariable::MergeFrom(from.variable()); |
2390 | break; |
2391 | } |
2392 | case kBareConcreteFunction: { |
2393 | mutable_bare_concrete_function()->::tensorflow::SavedBareConcreteFunction::MergeFrom(from.bare_concrete_function()); |
2394 | break; |
2395 | } |
2396 | case kConstant: { |
2397 | mutable_constant()->::tensorflow::SavedConstant::MergeFrom(from.constant()); |
2398 | break; |
2399 | } |
2400 | case kResource: { |
2401 | mutable_resource()->::tensorflow::SavedResource::MergeFrom(from.resource()); |
2402 | break; |
2403 | } |
2404 | case kCapturedTensor: { |
2405 | mutable_captured_tensor()->::tensorflow::CapturedTensor::MergeFrom(from.captured_tensor()); |
2406 | break; |
2407 | } |
2408 | case KIND_NOT_SET: { |
2409 | break; |
2410 | } |
2411 | } |
2412 | } |
2413 | |
2414 | void SavedObject::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2415 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedObject) |
2416 | if (&from == this) return; |
2417 | Clear(); |
2418 | MergeFrom(from); |
2419 | } |
2420 | |
2421 | void SavedObject::CopyFrom(const SavedObject& from) { |
2422 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedObject) |
2423 | if (&from == this) return; |
2424 | Clear(); |
2425 | MergeFrom(from); |
2426 | } |
2427 | |
2428 | bool SavedObject::IsInitialized() const { |
2429 | return true; |
2430 | } |
2431 | |
2432 | void SavedObject::InternalSwap(SavedObject* other) { |
2433 | using std::swap; |
2434 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2435 | CastToBase(&children_)->InternalSwap(CastToBase(&other->children_)); |
2436 | CastToBase(&slot_variables_)->InternalSwap(CastToBase(&other->slot_variables_)); |
2437 | saveable_objects_.Swap(&other->saveable_objects_); |
2438 | CastToBase(&dependencies_)->InternalSwap(CastToBase(&other->dependencies_)); |
2439 | registered_name_.Swap(&other->registered_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2440 | GetArenaNoVirtual()); |
2441 | registered_saver_.Swap(&other->registered_saver_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2442 | GetArenaNoVirtual()); |
2443 | swap(serialized_user_proto_, other->serialized_user_proto_); |
2444 | swap(kind_, other->kind_); |
2445 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
2446 | } |
2447 | |
2448 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedObject::GetMetadata() const { |
2449 | return GetMetadataStatic(); |
2450 | } |
2451 | |
2452 | |
2453 | // =================================================================== |
2454 | |
2455 | void SavedUserObject::InitAsDefaultInstance() { |
2456 | ::tensorflow::_SavedUserObject_default_instance_._instance.get_mutable()->version_ = const_cast< ::tensorflow::VersionDef*>( |
2457 | ::tensorflow::VersionDef::internal_default_instance()); |
2458 | } |
2459 | class SavedUserObject::_Internal { |
2460 | public: |
2461 | static const ::tensorflow::VersionDef& version(const SavedUserObject* msg); |
2462 | }; |
2463 | |
2464 | const ::tensorflow::VersionDef& |
2465 | SavedUserObject::_Internal::version(const SavedUserObject* msg) { |
2466 | return *msg->version_; |
2467 | } |
2468 | void SavedUserObject::unsafe_arena_set_allocated_version( |
2469 | ::tensorflow::VersionDef* version) { |
2470 | if (GetArenaNoVirtual() == nullptr) { |
2471 | delete version_; |
2472 | } |
2473 | version_ = version; |
2474 | if (version) { |
2475 | |
2476 | } else { |
2477 | |
2478 | } |
2479 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedUserObject.version) |
2480 | } |
2481 | void SavedUserObject::clear_version() { |
2482 | if (GetArenaNoVirtual() == nullptr && version_ != nullptr) { |
2483 | delete version_; |
2484 | } |
2485 | version_ = nullptr; |
2486 | } |
2487 | SavedUserObject::SavedUserObject() |
2488 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2489 | SharedCtor(); |
2490 | // @@protoc_insertion_point(constructor:tensorflow.SavedUserObject) |
2491 | } |
2492 | SavedUserObject::SavedUserObject(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
2493 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2494 | _internal_metadata_(arena) { |
2495 | SharedCtor(); |
2496 | RegisterArenaDtor(arena); |
2497 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedUserObject) |
2498 | } |
2499 | SavedUserObject::SavedUserObject(const SavedUserObject& from) |
2500 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2501 | _internal_metadata_(nullptr) { |
2502 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2503 | identifier_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2504 | if (!from.identifier().empty()) { |
2505 | identifier_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.identifier(), |
2506 | GetArenaNoVirtual()); |
2507 | } |
2508 | metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2509 | if (!from.metadata().empty()) { |
2510 | metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.metadata(), |
2511 | GetArenaNoVirtual()); |
2512 | } |
2513 | if (from.has_version()) { |
2514 | version_ = new ::tensorflow::VersionDef(*from.version_); |
2515 | } else { |
2516 | version_ = nullptr; |
2517 | } |
2518 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedUserObject) |
2519 | } |
2520 | |
2521 | void SavedUserObject::SharedCtor() { |
2522 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SavedUserObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
2523 | identifier_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2524 | metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2525 | version_ = nullptr; |
2526 | } |
2527 | |
2528 | SavedUserObject::~SavedUserObject() { |
2529 | // @@protoc_insertion_point(destructor:tensorflow.SavedUserObject) |
2530 | SharedDtor(); |
2531 | } |
2532 | |
2533 | void SavedUserObject::SharedDtor() { |
2534 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
2535 | identifier_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2536 | metadata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2537 | if (this != internal_default_instance()) delete version_; |
2538 | } |
2539 | |
2540 | void SavedUserObject::ArenaDtor(void* object) { |
2541 | SavedUserObject* _this = reinterpret_cast< SavedUserObject* >(object); |
2542 | (void)_this; |
2543 | } |
2544 | void SavedUserObject::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
2545 | } |
2546 | void SavedUserObject::SetCachedSize(int size) const { |
2547 | _cached_size_.Set(size); |
2548 | } |
2549 | const SavedUserObject& SavedUserObject::default_instance() { |
2550 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedUserObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
2551 | return *internal_default_instance(); |
2552 | } |
2553 | |
2554 | |
2555 | void SavedUserObject::Clear() { |
2556 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedUserObject) |
2557 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2558 | // Prevent compiler warnings about cached_has_bits being unused |
2559 | (void) cached_has_bits; |
2560 | |
2561 | identifier_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
2562 | metadata_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
2563 | if (GetArenaNoVirtual() == nullptr && version_ != nullptr) { |
2564 | delete version_; |
2565 | } |
2566 | version_ = nullptr; |
2567 | _internal_metadata_.Clear(); |
2568 | } |
2569 | |
2570 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2571 | const char* SavedUserObject::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2572 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2573 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
2574 | while (!ctx->Done(&ptr)) { |
2575 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2576 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2577 | CHK_(ptr); |
2578 | switch (tag >> 3) { |
2579 | // string identifier = 1; |
2580 | case 1: |
2581 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
2582 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_identifier(), ptr, ctx, "tensorflow.SavedUserObject.identifier" ); |
2583 | CHK_(ptr); |
2584 | } else goto handle_unusual; |
2585 | continue; |
2586 | // .tensorflow.VersionDef version = 2; |
2587 | case 2: |
2588 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
2589 | ptr = ctx->ParseMessage(mutable_version(), ptr); |
2590 | CHK_(ptr); |
2591 | } else goto handle_unusual; |
2592 | continue; |
2593 | // string metadata = 3 [deprecated = true]; |
2594 | case 3: |
2595 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
2596 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_metadata(), ptr, ctx, "tensorflow.SavedUserObject.metadata" ); |
2597 | CHK_(ptr); |
2598 | } else goto handle_unusual; |
2599 | continue; |
2600 | default: { |
2601 | handle_unusual: |
2602 | if ((tag & 7) == 4 || tag == 0) { |
2603 | ctx->SetLastTag(tag); |
2604 | goto success; |
2605 | } |
2606 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2607 | CHK_(ptr != nullptr); |
2608 | continue; |
2609 | } |
2610 | } // switch |
2611 | } // while |
2612 | success: |
2613 | return ptr; |
2614 | failure: |
2615 | ptr = nullptr; |
2616 | goto success; |
2617 | #undef CHK_ |
2618 | } |
2619 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2620 | bool SavedUserObject::MergePartialFromCodedStream( |
2621 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2622 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2623 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2624 | // @@protoc_insertion_point(parse_start:tensorflow.SavedUserObject) |
2625 | for (;;) { |
2626 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2627 | tag = p.first; |
2628 | if (!p.second) goto handle_unusual; |
2629 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2630 | // string identifier = 1; |
2631 | case 1: { |
2632 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
2633 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
2634 | input, this->mutable_identifier())); |
2635 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2636 | this->identifier().data(), static_cast<int>(this->identifier().length()), |
2637 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
2638 | "tensorflow.SavedUserObject.identifier" )); |
2639 | } else { |
2640 | goto handle_unusual; |
2641 | } |
2642 | break; |
2643 | } |
2644 | |
2645 | // .tensorflow.VersionDef version = 2; |
2646 | case 2: { |
2647 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
2648 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
2649 | input, mutable_version())); |
2650 | } else { |
2651 | goto handle_unusual; |
2652 | } |
2653 | break; |
2654 | } |
2655 | |
2656 | // string metadata = 3 [deprecated = true]; |
2657 | case 3: { |
2658 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
2659 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
2660 | input, this->mutable_metadata())); |
2661 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2662 | this->metadata().data(), static_cast<int>(this->metadata().length()), |
2663 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
2664 | "tensorflow.SavedUserObject.metadata" )); |
2665 | } else { |
2666 | goto handle_unusual; |
2667 | } |
2668 | break; |
2669 | } |
2670 | |
2671 | default: { |
2672 | handle_unusual: |
2673 | if (tag == 0) { |
2674 | goto success; |
2675 | } |
2676 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2677 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2678 | break; |
2679 | } |
2680 | } |
2681 | } |
2682 | success: |
2683 | // @@protoc_insertion_point(parse_success:tensorflow.SavedUserObject) |
2684 | return true; |
2685 | failure: |
2686 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedUserObject) |
2687 | return false; |
2688 | #undef DO_ |
2689 | } |
2690 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2691 | |
2692 | void SavedUserObject::SerializeWithCachedSizes( |
2693 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2694 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedUserObject) |
2695 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2696 | (void) cached_has_bits; |
2697 | |
2698 | // string identifier = 1; |
2699 | if (this->identifier().size() > 0) { |
2700 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2701 | this->identifier().data(), static_cast<int>(this->identifier().length()), |
2702 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2703 | "tensorflow.SavedUserObject.identifier" ); |
2704 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
2705 | 1, this->identifier(), output); |
2706 | } |
2707 | |
2708 | // .tensorflow.VersionDef version = 2; |
2709 | if (this->has_version()) { |
2710 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
2711 | 2, _Internal::version(this), output); |
2712 | } |
2713 | |
2714 | // string metadata = 3 [deprecated = true]; |
2715 | if (this->metadata().size() > 0) { |
2716 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2717 | this->metadata().data(), static_cast<int>(this->metadata().length()), |
2718 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2719 | "tensorflow.SavedUserObject.metadata" ); |
2720 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
2721 | 3, this->metadata(), output); |
2722 | } |
2723 | |
2724 | if (_internal_metadata_.have_unknown_fields()) { |
2725 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2726 | _internal_metadata_.unknown_fields(), output); |
2727 | } |
2728 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedUserObject) |
2729 | } |
2730 | |
2731 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedUserObject::InternalSerializeWithCachedSizesToArray( |
2732 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2733 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedUserObject) |
2734 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2735 | (void) cached_has_bits; |
2736 | |
2737 | // string identifier = 1; |
2738 | if (this->identifier().size() > 0) { |
2739 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2740 | this->identifier().data(), static_cast<int>(this->identifier().length()), |
2741 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2742 | "tensorflow.SavedUserObject.identifier" ); |
2743 | target = |
2744 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
2745 | 1, this->identifier(), target); |
2746 | } |
2747 | |
2748 | // .tensorflow.VersionDef version = 2; |
2749 | if (this->has_version()) { |
2750 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2751 | InternalWriteMessageToArray( |
2752 | 2, _Internal::version(this), target); |
2753 | } |
2754 | |
2755 | // string metadata = 3 [deprecated = true]; |
2756 | if (this->metadata().size() > 0) { |
2757 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2758 | this->metadata().data(), static_cast<int>(this->metadata().length()), |
2759 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2760 | "tensorflow.SavedUserObject.metadata" ); |
2761 | target = |
2762 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
2763 | 3, this->metadata(), target); |
2764 | } |
2765 | |
2766 | if (_internal_metadata_.have_unknown_fields()) { |
2767 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2768 | _internal_metadata_.unknown_fields(), target); |
2769 | } |
2770 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedUserObject) |
2771 | return target; |
2772 | } |
2773 | |
2774 | size_t SavedUserObject::ByteSizeLong() const { |
2775 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedUserObject) |
2776 | size_t total_size = 0; |
2777 | |
2778 | if (_internal_metadata_.have_unknown_fields()) { |
2779 | total_size += |
2780 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2781 | _internal_metadata_.unknown_fields()); |
2782 | } |
2783 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2784 | // Prevent compiler warnings about cached_has_bits being unused |
2785 | (void) cached_has_bits; |
2786 | |
2787 | // string identifier = 1; |
2788 | if (this->identifier().size() > 0) { |
2789 | total_size += 1 + |
2790 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
2791 | this->identifier()); |
2792 | } |
2793 | |
2794 | // string metadata = 3 [deprecated = true]; |
2795 | if (this->metadata().size() > 0) { |
2796 | total_size += 1 + |
2797 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
2798 | this->metadata()); |
2799 | } |
2800 | |
2801 | // .tensorflow.VersionDef version = 2; |
2802 | if (this->has_version()) { |
2803 | total_size += 1 + |
2804 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2805 | *version_); |
2806 | } |
2807 | |
2808 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2809 | SetCachedSize(cached_size); |
2810 | return total_size; |
2811 | } |
2812 | |
2813 | void SavedUserObject::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2814 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedUserObject) |
2815 | GOOGLE_DCHECK_NE(&from, this); |
2816 | const SavedUserObject* source = |
2817 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedUserObject>( |
2818 | &from); |
2819 | if (source == nullptr) { |
2820 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedUserObject) |
2821 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2822 | } else { |
2823 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedUserObject) |
2824 | MergeFrom(*source); |
2825 | } |
2826 | } |
2827 | |
2828 | void SavedUserObject::MergeFrom(const SavedUserObject& from) { |
2829 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedUserObject) |
2830 | GOOGLE_DCHECK_NE(&from, this); |
2831 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2832 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2833 | (void) cached_has_bits; |
2834 | |
2835 | if (from.identifier().size() > 0) { |
2836 | set_identifier(from.identifier()); |
2837 | } |
2838 | if (from.metadata().size() > 0) { |
2839 | set_metadata(from.metadata()); |
2840 | } |
2841 | if (from.has_version()) { |
2842 | mutable_version()->::tensorflow::VersionDef::MergeFrom(from.version()); |
2843 | } |
2844 | } |
2845 | |
2846 | void SavedUserObject::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2847 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedUserObject) |
2848 | if (&from == this) return; |
2849 | Clear(); |
2850 | MergeFrom(from); |
2851 | } |
2852 | |
2853 | void SavedUserObject::CopyFrom(const SavedUserObject& from) { |
2854 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedUserObject) |
2855 | if (&from == this) return; |
2856 | Clear(); |
2857 | MergeFrom(from); |
2858 | } |
2859 | |
2860 | bool SavedUserObject::IsInitialized() const { |
2861 | return true; |
2862 | } |
2863 | |
2864 | void SavedUserObject::InternalSwap(SavedUserObject* other) { |
2865 | using std::swap; |
2866 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2867 | identifier_.Swap(&other->identifier_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2868 | GetArenaNoVirtual()); |
2869 | metadata_.Swap(&other->metadata_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2870 | GetArenaNoVirtual()); |
2871 | swap(version_, other->version_); |
2872 | } |
2873 | |
2874 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedUserObject::GetMetadata() const { |
2875 | return GetMetadataStatic(); |
2876 | } |
2877 | |
2878 | |
2879 | // =================================================================== |
2880 | |
2881 | void SavedAsset::InitAsDefaultInstance() { |
2882 | } |
2883 | class SavedAsset::_Internal { |
2884 | public: |
2885 | }; |
2886 | |
2887 | SavedAsset::SavedAsset() |
2888 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2889 | SharedCtor(); |
2890 | // @@protoc_insertion_point(constructor:tensorflow.SavedAsset) |
2891 | } |
2892 | SavedAsset::SavedAsset(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
2893 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2894 | _internal_metadata_(arena) { |
2895 | SharedCtor(); |
2896 | RegisterArenaDtor(arena); |
2897 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedAsset) |
2898 | } |
2899 | SavedAsset::SavedAsset(const SavedAsset& from) |
2900 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2901 | _internal_metadata_(nullptr) { |
2902 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2903 | asset_file_def_index_ = from.asset_file_def_index_; |
2904 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedAsset) |
2905 | } |
2906 | |
2907 | void SavedAsset::SharedCtor() { |
2908 | asset_file_def_index_ = 0; |
2909 | } |
2910 | |
2911 | SavedAsset::~SavedAsset() { |
2912 | // @@protoc_insertion_point(destructor:tensorflow.SavedAsset) |
2913 | SharedDtor(); |
2914 | } |
2915 | |
2916 | void SavedAsset::SharedDtor() { |
2917 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
2918 | } |
2919 | |
2920 | void SavedAsset::ArenaDtor(void* object) { |
2921 | SavedAsset* _this = reinterpret_cast< SavedAsset* >(object); |
2922 | (void)_this; |
2923 | } |
2924 | void SavedAsset::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
2925 | } |
2926 | void SavedAsset::SetCachedSize(int size) const { |
2927 | _cached_size_.Set(size); |
2928 | } |
2929 | const SavedAsset& SavedAsset::default_instance() { |
2930 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedAsset_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
2931 | return *internal_default_instance(); |
2932 | } |
2933 | |
2934 | |
2935 | void SavedAsset::Clear() { |
2936 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedAsset) |
2937 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2938 | // Prevent compiler warnings about cached_has_bits being unused |
2939 | (void) cached_has_bits; |
2940 | |
2941 | asset_file_def_index_ = 0; |
2942 | _internal_metadata_.Clear(); |
2943 | } |
2944 | |
2945 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2946 | const char* SavedAsset::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2947 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2948 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
2949 | while (!ctx->Done(&ptr)) { |
2950 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2951 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2952 | CHK_(ptr); |
2953 | switch (tag >> 3) { |
2954 | // int32 asset_file_def_index = 1; |
2955 | case 1: |
2956 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
2957 | asset_file_def_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2958 | CHK_(ptr); |
2959 | } else goto handle_unusual; |
2960 | continue; |
2961 | default: { |
2962 | handle_unusual: |
2963 | if ((tag & 7) == 4 || tag == 0) { |
2964 | ctx->SetLastTag(tag); |
2965 | goto success; |
2966 | } |
2967 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2968 | CHK_(ptr != nullptr); |
2969 | continue; |
2970 | } |
2971 | } // switch |
2972 | } // while |
2973 | success: |
2974 | return ptr; |
2975 | failure: |
2976 | ptr = nullptr; |
2977 | goto success; |
2978 | #undef CHK_ |
2979 | } |
2980 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2981 | bool SavedAsset::MergePartialFromCodedStream( |
2982 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2983 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2984 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2985 | // @@protoc_insertion_point(parse_start:tensorflow.SavedAsset) |
2986 | for (;;) { |
2987 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2988 | tag = p.first; |
2989 | if (!p.second) goto handle_unusual; |
2990 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2991 | // int32 asset_file_def_index = 1; |
2992 | case 1: { |
2993 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
2994 | |
2995 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2996 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
2997 | input, &asset_file_def_index_))); |
2998 | } else { |
2999 | goto handle_unusual; |
3000 | } |
3001 | break; |
3002 | } |
3003 | |
3004 | default: { |
3005 | handle_unusual: |
3006 | if (tag == 0) { |
3007 | goto success; |
3008 | } |
3009 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3010 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3011 | break; |
3012 | } |
3013 | } |
3014 | } |
3015 | success: |
3016 | // @@protoc_insertion_point(parse_success:tensorflow.SavedAsset) |
3017 | return true; |
3018 | failure: |
3019 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedAsset) |
3020 | return false; |
3021 | #undef DO_ |
3022 | } |
3023 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3024 | |
3025 | void SavedAsset::SerializeWithCachedSizes( |
3026 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3027 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedAsset) |
3028 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3029 | (void) cached_has_bits; |
3030 | |
3031 | // int32 asset_file_def_index = 1; |
3032 | if (this->asset_file_def_index() != 0) { |
3033 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->asset_file_def_index(), output); |
3034 | } |
3035 | |
3036 | if (_internal_metadata_.have_unknown_fields()) { |
3037 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3038 | _internal_metadata_.unknown_fields(), output); |
3039 | } |
3040 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedAsset) |
3041 | } |
3042 | |
3043 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedAsset::InternalSerializeWithCachedSizesToArray( |
3044 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3045 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedAsset) |
3046 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3047 | (void) cached_has_bits; |
3048 | |
3049 | // int32 asset_file_def_index = 1; |
3050 | if (this->asset_file_def_index() != 0) { |
3051 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->asset_file_def_index(), target); |
3052 | } |
3053 | |
3054 | if (_internal_metadata_.have_unknown_fields()) { |
3055 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3056 | _internal_metadata_.unknown_fields(), target); |
3057 | } |
3058 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedAsset) |
3059 | return target; |
3060 | } |
3061 | |
3062 | size_t SavedAsset::ByteSizeLong() const { |
3063 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedAsset) |
3064 | size_t total_size = 0; |
3065 | |
3066 | if (_internal_metadata_.have_unknown_fields()) { |
3067 | total_size += |
3068 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3069 | _internal_metadata_.unknown_fields()); |
3070 | } |
3071 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3072 | // Prevent compiler warnings about cached_has_bits being unused |
3073 | (void) cached_has_bits; |
3074 | |
3075 | // int32 asset_file_def_index = 1; |
3076 | if (this->asset_file_def_index() != 0) { |
3077 | total_size += 1 + |
3078 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
3079 | this->asset_file_def_index()); |
3080 | } |
3081 | |
3082 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3083 | SetCachedSize(cached_size); |
3084 | return total_size; |
3085 | } |
3086 | |
3087 | void SavedAsset::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3088 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedAsset) |
3089 | GOOGLE_DCHECK_NE(&from, this); |
3090 | const SavedAsset* source = |
3091 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedAsset>( |
3092 | &from); |
3093 | if (source == nullptr) { |
3094 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedAsset) |
3095 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3096 | } else { |
3097 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedAsset) |
3098 | MergeFrom(*source); |
3099 | } |
3100 | } |
3101 | |
3102 | void SavedAsset::MergeFrom(const SavedAsset& from) { |
3103 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedAsset) |
3104 | GOOGLE_DCHECK_NE(&from, this); |
3105 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3106 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3107 | (void) cached_has_bits; |
3108 | |
3109 | if (from.asset_file_def_index() != 0) { |
3110 | set_asset_file_def_index(from.asset_file_def_index()); |
3111 | } |
3112 | } |
3113 | |
3114 | void SavedAsset::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3115 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedAsset) |
3116 | if (&from == this) return; |
3117 | Clear(); |
3118 | MergeFrom(from); |
3119 | } |
3120 | |
3121 | void SavedAsset::CopyFrom(const SavedAsset& from) { |
3122 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedAsset) |
3123 | if (&from == this) return; |
3124 | Clear(); |
3125 | MergeFrom(from); |
3126 | } |
3127 | |
3128 | bool SavedAsset::IsInitialized() const { |
3129 | return true; |
3130 | } |
3131 | |
3132 | void SavedAsset::InternalSwap(SavedAsset* other) { |
3133 | using std::swap; |
3134 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3135 | swap(asset_file_def_index_, other->asset_file_def_index_); |
3136 | } |
3137 | |
3138 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedAsset::GetMetadata() const { |
3139 | return GetMetadataStatic(); |
3140 | } |
3141 | |
3142 | |
3143 | // =================================================================== |
3144 | |
3145 | void SavedFunction::InitAsDefaultInstance() { |
3146 | ::tensorflow::_SavedFunction_default_instance_._instance.get_mutable()->function_spec_ = const_cast< ::tensorflow::FunctionSpec*>( |
3147 | ::tensorflow::FunctionSpec::internal_default_instance()); |
3148 | } |
3149 | class SavedFunction::_Internal { |
3150 | public: |
3151 | static const ::tensorflow::FunctionSpec& function_spec(const SavedFunction* msg); |
3152 | }; |
3153 | |
3154 | const ::tensorflow::FunctionSpec& |
3155 | SavedFunction::_Internal::function_spec(const SavedFunction* msg) { |
3156 | return *msg->function_spec_; |
3157 | } |
3158 | void SavedFunction::unsafe_arena_set_allocated_function_spec( |
3159 | ::tensorflow::FunctionSpec* function_spec) { |
3160 | if (GetArenaNoVirtual() == nullptr) { |
3161 | delete function_spec_; |
3162 | } |
3163 | function_spec_ = function_spec; |
3164 | if (function_spec) { |
3165 | |
3166 | } else { |
3167 | |
3168 | } |
3169 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedFunction.function_spec) |
3170 | } |
3171 | SavedFunction::SavedFunction() |
3172 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3173 | SharedCtor(); |
3174 | // @@protoc_insertion_point(constructor:tensorflow.SavedFunction) |
3175 | } |
3176 | SavedFunction::SavedFunction(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3177 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3178 | _internal_metadata_(arena), |
3179 | concrete_functions_(arena) { |
3180 | SharedCtor(); |
3181 | RegisterArenaDtor(arena); |
3182 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedFunction) |
3183 | } |
3184 | SavedFunction::SavedFunction(const SavedFunction& from) |
3185 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3186 | _internal_metadata_(nullptr), |
3187 | concrete_functions_(from.concrete_functions_) { |
3188 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3189 | if (from.has_function_spec()) { |
3190 | function_spec_ = new ::tensorflow::FunctionSpec(*from.function_spec_); |
3191 | } else { |
3192 | function_spec_ = nullptr; |
3193 | } |
3194 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedFunction) |
3195 | } |
3196 | |
3197 | void SavedFunction::SharedCtor() { |
3198 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SavedFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
3199 | function_spec_ = nullptr; |
3200 | } |
3201 | |
3202 | SavedFunction::~SavedFunction() { |
3203 | // @@protoc_insertion_point(destructor:tensorflow.SavedFunction) |
3204 | SharedDtor(); |
3205 | } |
3206 | |
3207 | void SavedFunction::SharedDtor() { |
3208 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
3209 | if (this != internal_default_instance()) delete function_spec_; |
3210 | } |
3211 | |
3212 | void SavedFunction::ArenaDtor(void* object) { |
3213 | SavedFunction* _this = reinterpret_cast< SavedFunction* >(object); |
3214 | (void)_this; |
3215 | } |
3216 | void SavedFunction::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
3217 | } |
3218 | void SavedFunction::SetCachedSize(int size) const { |
3219 | _cached_size_.Set(size); |
3220 | } |
3221 | const SavedFunction& SavedFunction::default_instance() { |
3222 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
3223 | return *internal_default_instance(); |
3224 | } |
3225 | |
3226 | |
3227 | void SavedFunction::Clear() { |
3228 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedFunction) |
3229 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3230 | // Prevent compiler warnings about cached_has_bits being unused |
3231 | (void) cached_has_bits; |
3232 | |
3233 | concrete_functions_.Clear(); |
3234 | if (GetArenaNoVirtual() == nullptr && function_spec_ != nullptr) { |
3235 | delete function_spec_; |
3236 | } |
3237 | function_spec_ = nullptr; |
3238 | _internal_metadata_.Clear(); |
3239 | } |
3240 | |
3241 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3242 | const char* SavedFunction::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3243 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3244 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
3245 | while (!ctx->Done(&ptr)) { |
3246 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3247 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3248 | CHK_(ptr); |
3249 | switch (tag >> 3) { |
3250 | // repeated string concrete_functions = 1; |
3251 | case 1: |
3252 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
3253 | ptr -= 1; |
3254 | do { |
3255 | ptr += 1; |
3256 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_concrete_functions(), ptr, ctx, "tensorflow.SavedFunction.concrete_functions" ); |
3257 | CHK_(ptr); |
3258 | if (!ctx->DataAvailable(ptr)) break; |
3259 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
3260 | } else goto handle_unusual; |
3261 | continue; |
3262 | // .tensorflow.FunctionSpec function_spec = 2; |
3263 | case 2: |
3264 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
3265 | ptr = ctx->ParseMessage(mutable_function_spec(), ptr); |
3266 | CHK_(ptr); |
3267 | } else goto handle_unusual; |
3268 | continue; |
3269 | default: { |
3270 | handle_unusual: |
3271 | if ((tag & 7) == 4 || tag == 0) { |
3272 | ctx->SetLastTag(tag); |
3273 | goto success; |
3274 | } |
3275 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3276 | CHK_(ptr != nullptr); |
3277 | continue; |
3278 | } |
3279 | } // switch |
3280 | } // while |
3281 | success: |
3282 | return ptr; |
3283 | failure: |
3284 | ptr = nullptr; |
3285 | goto success; |
3286 | #undef CHK_ |
3287 | } |
3288 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3289 | bool SavedFunction::MergePartialFromCodedStream( |
3290 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3291 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3292 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3293 | // @@protoc_insertion_point(parse_start:tensorflow.SavedFunction) |
3294 | for (;;) { |
3295 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3296 | tag = p.first; |
3297 | if (!p.second) goto handle_unusual; |
3298 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3299 | // repeated string concrete_functions = 1; |
3300 | case 1: { |
3301 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
3302 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3303 | input, this->add_concrete_functions())); |
3304 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3305 | this->concrete_functions(this->concrete_functions_size() - 1).data(), |
3306 | static_cast<int>(this->concrete_functions(this->concrete_functions_size() - 1).length()), |
3307 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3308 | "tensorflow.SavedFunction.concrete_functions" )); |
3309 | } else { |
3310 | goto handle_unusual; |
3311 | } |
3312 | break; |
3313 | } |
3314 | |
3315 | // .tensorflow.FunctionSpec function_spec = 2; |
3316 | case 2: { |
3317 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
3318 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3319 | input, mutable_function_spec())); |
3320 | } else { |
3321 | goto handle_unusual; |
3322 | } |
3323 | break; |
3324 | } |
3325 | |
3326 | default: { |
3327 | handle_unusual: |
3328 | if (tag == 0) { |
3329 | goto success; |
3330 | } |
3331 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3332 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3333 | break; |
3334 | } |
3335 | } |
3336 | } |
3337 | success: |
3338 | // @@protoc_insertion_point(parse_success:tensorflow.SavedFunction) |
3339 | return true; |
3340 | failure: |
3341 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedFunction) |
3342 | return false; |
3343 | #undef DO_ |
3344 | } |
3345 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3346 | |
3347 | void SavedFunction::SerializeWithCachedSizes( |
3348 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3349 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedFunction) |
3350 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3351 | (void) cached_has_bits; |
3352 | |
3353 | // repeated string concrete_functions = 1; |
3354 | for (int i = 0, n = this->concrete_functions_size(); i < n; i++) { |
3355 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3356 | this->concrete_functions(i).data(), static_cast<int>(this->concrete_functions(i).length()), |
3357 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3358 | "tensorflow.SavedFunction.concrete_functions" ); |
3359 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
3360 | 1, this->concrete_functions(i), output); |
3361 | } |
3362 | |
3363 | // .tensorflow.FunctionSpec function_spec = 2; |
3364 | if (this->has_function_spec()) { |
3365 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3366 | 2, _Internal::function_spec(this), output); |
3367 | } |
3368 | |
3369 | if (_internal_metadata_.have_unknown_fields()) { |
3370 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3371 | _internal_metadata_.unknown_fields(), output); |
3372 | } |
3373 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedFunction) |
3374 | } |
3375 | |
3376 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedFunction::InternalSerializeWithCachedSizesToArray( |
3377 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3378 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedFunction) |
3379 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3380 | (void) cached_has_bits; |
3381 | |
3382 | // repeated string concrete_functions = 1; |
3383 | for (int i = 0, n = this->concrete_functions_size(); i < n; i++) { |
3384 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3385 | this->concrete_functions(i).data(), static_cast<int>(this->concrete_functions(i).length()), |
3386 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3387 | "tensorflow.SavedFunction.concrete_functions" ); |
3388 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3389 | WriteStringToArray(1, this->concrete_functions(i), target); |
3390 | } |
3391 | |
3392 | // .tensorflow.FunctionSpec function_spec = 2; |
3393 | if (this->has_function_spec()) { |
3394 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3395 | InternalWriteMessageToArray( |
3396 | 2, _Internal::function_spec(this), target); |
3397 | } |
3398 | |
3399 | if (_internal_metadata_.have_unknown_fields()) { |
3400 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3401 | _internal_metadata_.unknown_fields(), target); |
3402 | } |
3403 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedFunction) |
3404 | return target; |
3405 | } |
3406 | |
3407 | size_t SavedFunction::ByteSizeLong() const { |
3408 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedFunction) |
3409 | size_t total_size = 0; |
3410 | |
3411 | if (_internal_metadata_.have_unknown_fields()) { |
3412 | total_size += |
3413 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3414 | _internal_metadata_.unknown_fields()); |
3415 | } |
3416 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3417 | // Prevent compiler warnings about cached_has_bits being unused |
3418 | (void) cached_has_bits; |
3419 | |
3420 | // repeated string concrete_functions = 1; |
3421 | total_size += 1 * |
3422 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->concrete_functions_size()); |
3423 | for (int i = 0, n = this->concrete_functions_size(); i < n; i++) { |
3424 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
3425 | this->concrete_functions(i)); |
3426 | } |
3427 | |
3428 | // .tensorflow.FunctionSpec function_spec = 2; |
3429 | if (this->has_function_spec()) { |
3430 | total_size += 1 + |
3431 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3432 | *function_spec_); |
3433 | } |
3434 | |
3435 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3436 | SetCachedSize(cached_size); |
3437 | return total_size; |
3438 | } |
3439 | |
3440 | void SavedFunction::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3441 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedFunction) |
3442 | GOOGLE_DCHECK_NE(&from, this); |
3443 | const SavedFunction* source = |
3444 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedFunction>( |
3445 | &from); |
3446 | if (source == nullptr) { |
3447 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedFunction) |
3448 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3449 | } else { |
3450 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedFunction) |
3451 | MergeFrom(*source); |
3452 | } |
3453 | } |
3454 | |
3455 | void SavedFunction::MergeFrom(const SavedFunction& from) { |
3456 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedFunction) |
3457 | GOOGLE_DCHECK_NE(&from, this); |
3458 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3459 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3460 | (void) cached_has_bits; |
3461 | |
3462 | concrete_functions_.MergeFrom(from.concrete_functions_); |
3463 | if (from.has_function_spec()) { |
3464 | mutable_function_spec()->::tensorflow::FunctionSpec::MergeFrom(from.function_spec()); |
3465 | } |
3466 | } |
3467 | |
3468 | void SavedFunction::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3469 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedFunction) |
3470 | if (&from == this) return; |
3471 | Clear(); |
3472 | MergeFrom(from); |
3473 | } |
3474 | |
3475 | void SavedFunction::CopyFrom(const SavedFunction& from) { |
3476 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedFunction) |
3477 | if (&from == this) return; |
3478 | Clear(); |
3479 | MergeFrom(from); |
3480 | } |
3481 | |
3482 | bool SavedFunction::IsInitialized() const { |
3483 | return true; |
3484 | } |
3485 | |
3486 | void SavedFunction::InternalSwap(SavedFunction* other) { |
3487 | using std::swap; |
3488 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3489 | concrete_functions_.InternalSwap(CastToBase(&other->concrete_functions_)); |
3490 | swap(function_spec_, other->function_spec_); |
3491 | } |
3492 | |
3493 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedFunction::GetMetadata() const { |
3494 | return GetMetadataStatic(); |
3495 | } |
3496 | |
3497 | |
3498 | // =================================================================== |
3499 | |
3500 | void CapturedTensor::InitAsDefaultInstance() { |
3501 | } |
3502 | class CapturedTensor::_Internal { |
3503 | public: |
3504 | }; |
3505 | |
3506 | CapturedTensor::CapturedTensor() |
3507 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3508 | SharedCtor(); |
3509 | // @@protoc_insertion_point(constructor:tensorflow.CapturedTensor) |
3510 | } |
3511 | CapturedTensor::CapturedTensor(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3512 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3513 | _internal_metadata_(arena) { |
3514 | SharedCtor(); |
3515 | RegisterArenaDtor(arena); |
3516 | // @@protoc_insertion_point(arena_constructor:tensorflow.CapturedTensor) |
3517 | } |
3518 | CapturedTensor::CapturedTensor(const CapturedTensor& from) |
3519 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3520 | _internal_metadata_(nullptr) { |
3521 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3522 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3523 | if (!from.name().empty()) { |
3524 | name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), |
3525 | GetArenaNoVirtual()); |
3526 | } |
3527 | concrete_function_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3528 | if (!from.concrete_function().empty()) { |
3529 | concrete_function_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.concrete_function(), |
3530 | GetArenaNoVirtual()); |
3531 | } |
3532 | // @@protoc_insertion_point(copy_constructor:tensorflow.CapturedTensor) |
3533 | } |
3534 | |
3535 | void CapturedTensor::SharedCtor() { |
3536 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CapturedTensor_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
3537 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3538 | concrete_function_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3539 | } |
3540 | |
3541 | CapturedTensor::~CapturedTensor() { |
3542 | // @@protoc_insertion_point(destructor:tensorflow.CapturedTensor) |
3543 | SharedDtor(); |
3544 | } |
3545 | |
3546 | void CapturedTensor::SharedDtor() { |
3547 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
3548 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3549 | concrete_function_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3550 | } |
3551 | |
3552 | void CapturedTensor::ArenaDtor(void* object) { |
3553 | CapturedTensor* _this = reinterpret_cast< CapturedTensor* >(object); |
3554 | (void)_this; |
3555 | } |
3556 | void CapturedTensor::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
3557 | } |
3558 | void CapturedTensor::SetCachedSize(int size) const { |
3559 | _cached_size_.Set(size); |
3560 | } |
3561 | const CapturedTensor& CapturedTensor::default_instance() { |
3562 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CapturedTensor_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
3563 | return *internal_default_instance(); |
3564 | } |
3565 | |
3566 | |
3567 | void CapturedTensor::Clear() { |
3568 | // @@protoc_insertion_point(message_clear_start:tensorflow.CapturedTensor) |
3569 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3570 | // Prevent compiler warnings about cached_has_bits being unused |
3571 | (void) cached_has_bits; |
3572 | |
3573 | name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
3574 | concrete_function_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
3575 | _internal_metadata_.Clear(); |
3576 | } |
3577 | |
3578 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3579 | const char* CapturedTensor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3580 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3581 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
3582 | while (!ctx->Done(&ptr)) { |
3583 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3584 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3585 | CHK_(ptr); |
3586 | switch (tag >> 3) { |
3587 | // string name = 1; |
3588 | case 1: |
3589 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
3590 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.CapturedTensor.name" ); |
3591 | CHK_(ptr); |
3592 | } else goto handle_unusual; |
3593 | continue; |
3594 | // string concrete_function = 2; |
3595 | case 2: |
3596 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
3597 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_concrete_function(), ptr, ctx, "tensorflow.CapturedTensor.concrete_function" ); |
3598 | CHK_(ptr); |
3599 | } else goto handle_unusual; |
3600 | continue; |
3601 | default: { |
3602 | handle_unusual: |
3603 | if ((tag & 7) == 4 || tag == 0) { |
3604 | ctx->SetLastTag(tag); |
3605 | goto success; |
3606 | } |
3607 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3608 | CHK_(ptr != nullptr); |
3609 | continue; |
3610 | } |
3611 | } // switch |
3612 | } // while |
3613 | success: |
3614 | return ptr; |
3615 | failure: |
3616 | ptr = nullptr; |
3617 | goto success; |
3618 | #undef CHK_ |
3619 | } |
3620 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3621 | bool CapturedTensor::MergePartialFromCodedStream( |
3622 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3623 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3624 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3625 | // @@protoc_insertion_point(parse_start:tensorflow.CapturedTensor) |
3626 | for (;;) { |
3627 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3628 | tag = p.first; |
3629 | if (!p.second) goto handle_unusual; |
3630 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3631 | // string name = 1; |
3632 | case 1: { |
3633 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
3634 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3635 | input, this->mutable_name())); |
3636 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3637 | this->name().data(), static_cast<int>(this->name().length()), |
3638 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3639 | "tensorflow.CapturedTensor.name" )); |
3640 | } else { |
3641 | goto handle_unusual; |
3642 | } |
3643 | break; |
3644 | } |
3645 | |
3646 | // string concrete_function = 2; |
3647 | case 2: { |
3648 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
3649 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3650 | input, this->mutable_concrete_function())); |
3651 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3652 | this->concrete_function().data(), static_cast<int>(this->concrete_function().length()), |
3653 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3654 | "tensorflow.CapturedTensor.concrete_function" )); |
3655 | } else { |
3656 | goto handle_unusual; |
3657 | } |
3658 | break; |
3659 | } |
3660 | |
3661 | default: { |
3662 | handle_unusual: |
3663 | if (tag == 0) { |
3664 | goto success; |
3665 | } |
3666 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3667 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3668 | break; |
3669 | } |
3670 | } |
3671 | } |
3672 | success: |
3673 | // @@protoc_insertion_point(parse_success:tensorflow.CapturedTensor) |
3674 | return true; |
3675 | failure: |
3676 | // @@protoc_insertion_point(parse_failure:tensorflow.CapturedTensor) |
3677 | return false; |
3678 | #undef DO_ |
3679 | } |
3680 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3681 | |
3682 | void CapturedTensor::SerializeWithCachedSizes( |
3683 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3684 | // @@protoc_insertion_point(serialize_start:tensorflow.CapturedTensor) |
3685 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3686 | (void) cached_has_bits; |
3687 | |
3688 | // string name = 1; |
3689 | if (this->name().size() > 0) { |
3690 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3691 | this->name().data(), static_cast<int>(this->name().length()), |
3692 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3693 | "tensorflow.CapturedTensor.name" ); |
3694 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
3695 | 1, this->name(), output); |
3696 | } |
3697 | |
3698 | // string concrete_function = 2; |
3699 | if (this->concrete_function().size() > 0) { |
3700 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3701 | this->concrete_function().data(), static_cast<int>(this->concrete_function().length()), |
3702 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3703 | "tensorflow.CapturedTensor.concrete_function" ); |
3704 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
3705 | 2, this->concrete_function(), output); |
3706 | } |
3707 | |
3708 | if (_internal_metadata_.have_unknown_fields()) { |
3709 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3710 | _internal_metadata_.unknown_fields(), output); |
3711 | } |
3712 | // @@protoc_insertion_point(serialize_end:tensorflow.CapturedTensor) |
3713 | } |
3714 | |
3715 | ::PROTOBUF_NAMESPACE_ID::uint8* CapturedTensor::InternalSerializeWithCachedSizesToArray( |
3716 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3717 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CapturedTensor) |
3718 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3719 | (void) cached_has_bits; |
3720 | |
3721 | // string name = 1; |
3722 | if (this->name().size() > 0) { |
3723 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3724 | this->name().data(), static_cast<int>(this->name().length()), |
3725 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3726 | "tensorflow.CapturedTensor.name" ); |
3727 | target = |
3728 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
3729 | 1, this->name(), target); |
3730 | } |
3731 | |
3732 | // string concrete_function = 2; |
3733 | if (this->concrete_function().size() > 0) { |
3734 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3735 | this->concrete_function().data(), static_cast<int>(this->concrete_function().length()), |
3736 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3737 | "tensorflow.CapturedTensor.concrete_function" ); |
3738 | target = |
3739 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
3740 | 2, this->concrete_function(), target); |
3741 | } |
3742 | |
3743 | if (_internal_metadata_.have_unknown_fields()) { |
3744 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3745 | _internal_metadata_.unknown_fields(), target); |
3746 | } |
3747 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CapturedTensor) |
3748 | return target; |
3749 | } |
3750 | |
3751 | size_t CapturedTensor::ByteSizeLong() const { |
3752 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.CapturedTensor) |
3753 | size_t total_size = 0; |
3754 | |
3755 | if (_internal_metadata_.have_unknown_fields()) { |
3756 | total_size += |
3757 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3758 | _internal_metadata_.unknown_fields()); |
3759 | } |
3760 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3761 | // Prevent compiler warnings about cached_has_bits being unused |
3762 | (void) cached_has_bits; |
3763 | |
3764 | // string name = 1; |
3765 | if (this->name().size() > 0) { |
3766 | total_size += 1 + |
3767 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
3768 | this->name()); |
3769 | } |
3770 | |
3771 | // string concrete_function = 2; |
3772 | if (this->concrete_function().size() > 0) { |
3773 | total_size += 1 + |
3774 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
3775 | this->concrete_function()); |
3776 | } |
3777 | |
3778 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3779 | SetCachedSize(cached_size); |
3780 | return total_size; |
3781 | } |
3782 | |
3783 | void CapturedTensor::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3784 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CapturedTensor) |
3785 | GOOGLE_DCHECK_NE(&from, this); |
3786 | const CapturedTensor* source = |
3787 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CapturedTensor>( |
3788 | &from); |
3789 | if (source == nullptr) { |
3790 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CapturedTensor) |
3791 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3792 | } else { |
3793 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CapturedTensor) |
3794 | MergeFrom(*source); |
3795 | } |
3796 | } |
3797 | |
3798 | void CapturedTensor::MergeFrom(const CapturedTensor& from) { |
3799 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CapturedTensor) |
3800 | GOOGLE_DCHECK_NE(&from, this); |
3801 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3802 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3803 | (void) cached_has_bits; |
3804 | |
3805 | if (from.name().size() > 0) { |
3806 | set_name(from.name()); |
3807 | } |
3808 | if (from.concrete_function().size() > 0) { |
3809 | set_concrete_function(from.concrete_function()); |
3810 | } |
3811 | } |
3812 | |
3813 | void CapturedTensor::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3814 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CapturedTensor) |
3815 | if (&from == this) return; |
3816 | Clear(); |
3817 | MergeFrom(from); |
3818 | } |
3819 | |
3820 | void CapturedTensor::CopyFrom(const CapturedTensor& from) { |
3821 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CapturedTensor) |
3822 | if (&from == this) return; |
3823 | Clear(); |
3824 | MergeFrom(from); |
3825 | } |
3826 | |
3827 | bool CapturedTensor::IsInitialized() const { |
3828 | return true; |
3829 | } |
3830 | |
3831 | void CapturedTensor::InternalSwap(CapturedTensor* other) { |
3832 | using std::swap; |
3833 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3834 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
3835 | GetArenaNoVirtual()); |
3836 | concrete_function_.Swap(&other->concrete_function_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
3837 | GetArenaNoVirtual()); |
3838 | } |
3839 | |
3840 | ::PROTOBUF_NAMESPACE_ID::Metadata CapturedTensor::GetMetadata() const { |
3841 | return GetMetadataStatic(); |
3842 | } |
3843 | |
3844 | |
3845 | // =================================================================== |
3846 | |
3847 | void SavedConcreteFunction::InitAsDefaultInstance() { |
3848 | ::tensorflow::_SavedConcreteFunction_default_instance_._instance.get_mutable()->canonicalized_input_signature_ = const_cast< ::tensorflow::StructuredValue*>( |
3849 | ::tensorflow::StructuredValue::internal_default_instance()); |
3850 | ::tensorflow::_SavedConcreteFunction_default_instance_._instance.get_mutable()->output_signature_ = const_cast< ::tensorflow::StructuredValue*>( |
3851 | ::tensorflow::StructuredValue::internal_default_instance()); |
3852 | } |
3853 | class SavedConcreteFunction::_Internal { |
3854 | public: |
3855 | static const ::tensorflow::StructuredValue& canonicalized_input_signature(const SavedConcreteFunction* msg); |
3856 | static const ::tensorflow::StructuredValue& output_signature(const SavedConcreteFunction* msg); |
3857 | }; |
3858 | |
3859 | const ::tensorflow::StructuredValue& |
3860 | SavedConcreteFunction::_Internal::canonicalized_input_signature(const SavedConcreteFunction* msg) { |
3861 | return *msg->canonicalized_input_signature_; |
3862 | } |
3863 | const ::tensorflow::StructuredValue& |
3864 | SavedConcreteFunction::_Internal::output_signature(const SavedConcreteFunction* msg) { |
3865 | return *msg->output_signature_; |
3866 | } |
3867 | void SavedConcreteFunction::unsafe_arena_set_allocated_canonicalized_input_signature( |
3868 | ::tensorflow::StructuredValue* canonicalized_input_signature) { |
3869 | if (GetArenaNoVirtual() == nullptr) { |
3870 | delete canonicalized_input_signature_; |
3871 | } |
3872 | canonicalized_input_signature_ = canonicalized_input_signature; |
3873 | if (canonicalized_input_signature) { |
3874 | |
3875 | } else { |
3876 | |
3877 | } |
3878 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedConcreteFunction.canonicalized_input_signature) |
3879 | } |
3880 | void SavedConcreteFunction::clear_canonicalized_input_signature() { |
3881 | if (GetArenaNoVirtual() == nullptr && canonicalized_input_signature_ != nullptr) { |
3882 | delete canonicalized_input_signature_; |
3883 | } |
3884 | canonicalized_input_signature_ = nullptr; |
3885 | } |
3886 | void SavedConcreteFunction::unsafe_arena_set_allocated_output_signature( |
3887 | ::tensorflow::StructuredValue* output_signature) { |
3888 | if (GetArenaNoVirtual() == nullptr) { |
3889 | delete output_signature_; |
3890 | } |
3891 | output_signature_ = output_signature; |
3892 | if (output_signature) { |
3893 | |
3894 | } else { |
3895 | |
3896 | } |
3897 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedConcreteFunction.output_signature) |
3898 | } |
3899 | void SavedConcreteFunction::clear_output_signature() { |
3900 | if (GetArenaNoVirtual() == nullptr && output_signature_ != nullptr) { |
3901 | delete output_signature_; |
3902 | } |
3903 | output_signature_ = nullptr; |
3904 | } |
3905 | SavedConcreteFunction::SavedConcreteFunction() |
3906 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3907 | SharedCtor(); |
3908 | // @@protoc_insertion_point(constructor:tensorflow.SavedConcreteFunction) |
3909 | } |
3910 | SavedConcreteFunction::SavedConcreteFunction(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3911 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3912 | _internal_metadata_(arena), |
3913 | bound_inputs_(arena) { |
3914 | SharedCtor(); |
3915 | RegisterArenaDtor(arena); |
3916 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedConcreteFunction) |
3917 | } |
3918 | SavedConcreteFunction::SavedConcreteFunction(const SavedConcreteFunction& from) |
3919 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3920 | _internal_metadata_(nullptr), |
3921 | bound_inputs_(from.bound_inputs_) { |
3922 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3923 | if (from.has_canonicalized_input_signature()) { |
3924 | canonicalized_input_signature_ = new ::tensorflow::StructuredValue(*from.canonicalized_input_signature_); |
3925 | } else { |
3926 | canonicalized_input_signature_ = nullptr; |
3927 | } |
3928 | if (from.has_output_signature()) { |
3929 | output_signature_ = new ::tensorflow::StructuredValue(*from.output_signature_); |
3930 | } else { |
3931 | output_signature_ = nullptr; |
3932 | } |
3933 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedConcreteFunction) |
3934 | } |
3935 | |
3936 | void SavedConcreteFunction::SharedCtor() { |
3937 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SavedConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
3938 | ::memset(&canonicalized_input_signature_, 0, static_cast<size_t>( |
3939 | reinterpret_cast<char*>(&output_signature_) - |
3940 | reinterpret_cast<char*>(&canonicalized_input_signature_)) + sizeof(output_signature_)); |
3941 | } |
3942 | |
3943 | SavedConcreteFunction::~SavedConcreteFunction() { |
3944 | // @@protoc_insertion_point(destructor:tensorflow.SavedConcreteFunction) |
3945 | SharedDtor(); |
3946 | } |
3947 | |
3948 | void SavedConcreteFunction::SharedDtor() { |
3949 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
3950 | if (this != internal_default_instance()) delete canonicalized_input_signature_; |
3951 | if (this != internal_default_instance()) delete output_signature_; |
3952 | } |
3953 | |
3954 | void SavedConcreteFunction::ArenaDtor(void* object) { |
3955 | SavedConcreteFunction* _this = reinterpret_cast< SavedConcreteFunction* >(object); |
3956 | (void)_this; |
3957 | } |
3958 | void SavedConcreteFunction::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
3959 | } |
3960 | void SavedConcreteFunction::SetCachedSize(int size) const { |
3961 | _cached_size_.Set(size); |
3962 | } |
3963 | const SavedConcreteFunction& SavedConcreteFunction::default_instance() { |
3964 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
3965 | return *internal_default_instance(); |
3966 | } |
3967 | |
3968 | |
3969 | void SavedConcreteFunction::Clear() { |
3970 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedConcreteFunction) |
3971 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3972 | // Prevent compiler warnings about cached_has_bits being unused |
3973 | (void) cached_has_bits; |
3974 | |
3975 | bound_inputs_.Clear(); |
3976 | if (GetArenaNoVirtual() == nullptr && canonicalized_input_signature_ != nullptr) { |
3977 | delete canonicalized_input_signature_; |
3978 | } |
3979 | canonicalized_input_signature_ = nullptr; |
3980 | if (GetArenaNoVirtual() == nullptr && output_signature_ != nullptr) { |
3981 | delete output_signature_; |
3982 | } |
3983 | output_signature_ = nullptr; |
3984 | _internal_metadata_.Clear(); |
3985 | } |
3986 | |
3987 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3988 | const char* SavedConcreteFunction::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3989 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3990 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
3991 | while (!ctx->Done(&ptr)) { |
3992 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3993 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3994 | CHK_(ptr); |
3995 | switch (tag >> 3) { |
3996 | // repeated int32 bound_inputs = 2; |
3997 | case 2: |
3998 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
3999 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_bound_inputs(), ptr, ctx); |
4000 | CHK_(ptr); |
4001 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { |
4002 | add_bound_inputs(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
4003 | CHK_(ptr); |
4004 | } else goto handle_unusual; |
4005 | continue; |
4006 | // .tensorflow.StructuredValue canonicalized_input_signature = 3; |
4007 | case 3: |
4008 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
4009 | ptr = ctx->ParseMessage(mutable_canonicalized_input_signature(), ptr); |
4010 | CHK_(ptr); |
4011 | } else goto handle_unusual; |
4012 | continue; |
4013 | // .tensorflow.StructuredValue output_signature = 4; |
4014 | case 4: |
4015 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
4016 | ptr = ctx->ParseMessage(mutable_output_signature(), ptr); |
4017 | CHK_(ptr); |
4018 | } else goto handle_unusual; |
4019 | continue; |
4020 | default: { |
4021 | handle_unusual: |
4022 | if ((tag & 7) == 4 || tag == 0) { |
4023 | ctx->SetLastTag(tag); |
4024 | goto success; |
4025 | } |
4026 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
4027 | CHK_(ptr != nullptr); |
4028 | continue; |
4029 | } |
4030 | } // switch |
4031 | } // while |
4032 | success: |
4033 | return ptr; |
4034 | failure: |
4035 | ptr = nullptr; |
4036 | goto success; |
4037 | #undef CHK_ |
4038 | } |
4039 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4040 | bool SavedConcreteFunction::MergePartialFromCodedStream( |
4041 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
4042 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
4043 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
4044 | // @@protoc_insertion_point(parse_start:tensorflow.SavedConcreteFunction) |
4045 | for (;;) { |
4046 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
4047 | tag = p.first; |
4048 | if (!p.second) goto handle_unusual; |
4049 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
4050 | // repeated int32 bound_inputs = 2; |
4051 | case 2: { |
4052 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
4053 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
4054 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
4055 | input, this->mutable_bound_inputs()))); |
4056 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
4057 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
4058 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
4059 | 1, 18u, input, this->mutable_bound_inputs()))); |
4060 | } else { |
4061 | goto handle_unusual; |
4062 | } |
4063 | break; |
4064 | } |
4065 | |
4066 | // .tensorflow.StructuredValue canonicalized_input_signature = 3; |
4067 | case 3: { |
4068 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
4069 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
4070 | input, mutable_canonicalized_input_signature())); |
4071 | } else { |
4072 | goto handle_unusual; |
4073 | } |
4074 | break; |
4075 | } |
4076 | |
4077 | // .tensorflow.StructuredValue output_signature = 4; |
4078 | case 4: { |
4079 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
4080 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
4081 | input, mutable_output_signature())); |
4082 | } else { |
4083 | goto handle_unusual; |
4084 | } |
4085 | break; |
4086 | } |
4087 | |
4088 | default: { |
4089 | handle_unusual: |
4090 | if (tag == 0) { |
4091 | goto success; |
4092 | } |
4093 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
4094 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
4095 | break; |
4096 | } |
4097 | } |
4098 | } |
4099 | success: |
4100 | // @@protoc_insertion_point(parse_success:tensorflow.SavedConcreteFunction) |
4101 | return true; |
4102 | failure: |
4103 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedConcreteFunction) |
4104 | return false; |
4105 | #undef DO_ |
4106 | } |
4107 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4108 | |
4109 | void SavedConcreteFunction::SerializeWithCachedSizes( |
4110 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
4111 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedConcreteFunction) |
4112 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4113 | (void) cached_has_bits; |
4114 | |
4115 | // repeated int32 bound_inputs = 2; |
4116 | if (this->bound_inputs_size() > 0) { |
4117 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
4118 | output->WriteVarint32(_bound_inputs_cached_byte_size_.load( |
4119 | std::memory_order_relaxed)); |
4120 | } |
4121 | for (int i = 0, n = this->bound_inputs_size(); i < n; i++) { |
4122 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( |
4123 | this->bound_inputs(i), output); |
4124 | } |
4125 | |
4126 | // .tensorflow.StructuredValue canonicalized_input_signature = 3; |
4127 | if (this->has_canonicalized_input_signature()) { |
4128 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
4129 | 3, _Internal::canonicalized_input_signature(this), output); |
4130 | } |
4131 | |
4132 | // .tensorflow.StructuredValue output_signature = 4; |
4133 | if (this->has_output_signature()) { |
4134 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
4135 | 4, _Internal::output_signature(this), output); |
4136 | } |
4137 | |
4138 | if (_internal_metadata_.have_unknown_fields()) { |
4139 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
4140 | _internal_metadata_.unknown_fields(), output); |
4141 | } |
4142 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedConcreteFunction) |
4143 | } |
4144 | |
4145 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedConcreteFunction::InternalSerializeWithCachedSizesToArray( |
4146 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
4147 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedConcreteFunction) |
4148 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4149 | (void) cached_has_bits; |
4150 | |
4151 | // repeated int32 bound_inputs = 2; |
4152 | if (this->bound_inputs_size() > 0) { |
4153 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
4154 | 2, |
4155 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
4156 | target); |
4157 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
4158 | _bound_inputs_cached_byte_size_.load(std::memory_order_relaxed), |
4159 | target); |
4160 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4161 | WriteInt32NoTagToArray(this->bound_inputs_, target); |
4162 | } |
4163 | |
4164 | // .tensorflow.StructuredValue canonicalized_input_signature = 3; |
4165 | if (this->has_canonicalized_input_signature()) { |
4166 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4167 | InternalWriteMessageToArray( |
4168 | 3, _Internal::canonicalized_input_signature(this), target); |
4169 | } |
4170 | |
4171 | // .tensorflow.StructuredValue output_signature = 4; |
4172 | if (this->has_output_signature()) { |
4173 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4174 | InternalWriteMessageToArray( |
4175 | 4, _Internal::output_signature(this), target); |
4176 | } |
4177 | |
4178 | if (_internal_metadata_.have_unknown_fields()) { |
4179 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
4180 | _internal_metadata_.unknown_fields(), target); |
4181 | } |
4182 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedConcreteFunction) |
4183 | return target; |
4184 | } |
4185 | |
4186 | size_t SavedConcreteFunction::ByteSizeLong() const { |
4187 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedConcreteFunction) |
4188 | size_t total_size = 0; |
4189 | |
4190 | if (_internal_metadata_.have_unknown_fields()) { |
4191 | total_size += |
4192 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
4193 | _internal_metadata_.unknown_fields()); |
4194 | } |
4195 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4196 | // Prevent compiler warnings about cached_has_bits being unused |
4197 | (void) cached_has_bits; |
4198 | |
4199 | // repeated int32 bound_inputs = 2; |
4200 | { |
4201 | size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4202 | Int32Size(this->bound_inputs_); |
4203 | if (data_size > 0) { |
4204 | total_size += 1 + |
4205 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
4206 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
4207 | } |
4208 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
4209 | _bound_inputs_cached_byte_size_.store(cached_size, |
4210 | std::memory_order_relaxed); |
4211 | total_size += data_size; |
4212 | } |
4213 | |
4214 | // .tensorflow.StructuredValue canonicalized_input_signature = 3; |
4215 | if (this->has_canonicalized_input_signature()) { |
4216 | total_size += 1 + |
4217 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
4218 | *canonicalized_input_signature_); |
4219 | } |
4220 | |
4221 | // .tensorflow.StructuredValue output_signature = 4; |
4222 | if (this->has_output_signature()) { |
4223 | total_size += 1 + |
4224 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
4225 | *output_signature_); |
4226 | } |
4227 | |
4228 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
4229 | SetCachedSize(cached_size); |
4230 | return total_size; |
4231 | } |
4232 | |
4233 | void SavedConcreteFunction::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4234 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedConcreteFunction) |
4235 | GOOGLE_DCHECK_NE(&from, this); |
4236 | const SavedConcreteFunction* source = |
4237 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedConcreteFunction>( |
4238 | &from); |
4239 | if (source == nullptr) { |
4240 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedConcreteFunction) |
4241 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
4242 | } else { |
4243 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedConcreteFunction) |
4244 | MergeFrom(*source); |
4245 | } |
4246 | } |
4247 | |
4248 | void SavedConcreteFunction::MergeFrom(const SavedConcreteFunction& from) { |
4249 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedConcreteFunction) |
4250 | GOOGLE_DCHECK_NE(&from, this); |
4251 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
4252 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4253 | (void) cached_has_bits; |
4254 | |
4255 | bound_inputs_.MergeFrom(from.bound_inputs_); |
4256 | if (from.has_canonicalized_input_signature()) { |
4257 | mutable_canonicalized_input_signature()->::tensorflow::StructuredValue::MergeFrom(from.canonicalized_input_signature()); |
4258 | } |
4259 | if (from.has_output_signature()) { |
4260 | mutable_output_signature()->::tensorflow::StructuredValue::MergeFrom(from.output_signature()); |
4261 | } |
4262 | } |
4263 | |
4264 | void SavedConcreteFunction::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4265 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedConcreteFunction) |
4266 | if (&from == this) return; |
4267 | Clear(); |
4268 | MergeFrom(from); |
4269 | } |
4270 | |
4271 | void SavedConcreteFunction::CopyFrom(const SavedConcreteFunction& from) { |
4272 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedConcreteFunction) |
4273 | if (&from == this) return; |
4274 | Clear(); |
4275 | MergeFrom(from); |
4276 | } |
4277 | |
4278 | bool SavedConcreteFunction::IsInitialized() const { |
4279 | return true; |
4280 | } |
4281 | |
4282 | void SavedConcreteFunction::InternalSwap(SavedConcreteFunction* other) { |
4283 | using std::swap; |
4284 | _internal_metadata_.Swap(&other->_internal_metadata_); |
4285 | bound_inputs_.InternalSwap(&other->bound_inputs_); |
4286 | swap(canonicalized_input_signature_, other->canonicalized_input_signature_); |
4287 | swap(output_signature_, other->output_signature_); |
4288 | } |
4289 | |
4290 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedConcreteFunction::GetMetadata() const { |
4291 | return GetMetadataStatic(); |
4292 | } |
4293 | |
4294 | |
4295 | // =================================================================== |
4296 | |
4297 | void SavedBareConcreteFunction::InitAsDefaultInstance() { |
4298 | ::tensorflow::_SavedBareConcreteFunction_default_instance_._instance.get_mutable()->function_spec_ = const_cast< ::tensorflow::FunctionSpec*>( |
4299 | ::tensorflow::FunctionSpec::internal_default_instance()); |
4300 | } |
4301 | class SavedBareConcreteFunction::_Internal { |
4302 | public: |
4303 | static const ::tensorflow::FunctionSpec& function_spec(const SavedBareConcreteFunction* msg); |
4304 | }; |
4305 | |
4306 | const ::tensorflow::FunctionSpec& |
4307 | SavedBareConcreteFunction::_Internal::function_spec(const SavedBareConcreteFunction* msg) { |
4308 | return *msg->function_spec_; |
4309 | } |
4310 | void SavedBareConcreteFunction::unsafe_arena_set_allocated_function_spec( |
4311 | ::tensorflow::FunctionSpec* function_spec) { |
4312 | if (GetArenaNoVirtual() == nullptr) { |
4313 | delete function_spec_; |
4314 | } |
4315 | function_spec_ = function_spec; |
4316 | if (function_spec) { |
4317 | |
4318 | } else { |
4319 | |
4320 | } |
4321 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedBareConcreteFunction.function_spec) |
4322 | } |
4323 | SavedBareConcreteFunction::SavedBareConcreteFunction() |
4324 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
4325 | SharedCtor(); |
4326 | // @@protoc_insertion_point(constructor:tensorflow.SavedBareConcreteFunction) |
4327 | } |
4328 | SavedBareConcreteFunction::SavedBareConcreteFunction(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
4329 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
4330 | _internal_metadata_(arena), |
4331 | argument_keywords_(arena) { |
4332 | SharedCtor(); |
4333 | RegisterArenaDtor(arena); |
4334 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedBareConcreteFunction) |
4335 | } |
4336 | SavedBareConcreteFunction::SavedBareConcreteFunction(const SavedBareConcreteFunction& from) |
4337 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
4338 | _internal_metadata_(nullptr), |
4339 | argument_keywords_(from.argument_keywords_) { |
4340 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
4341 | concrete_function_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4342 | if (!from.concrete_function_name().empty()) { |
4343 | concrete_function_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.concrete_function_name(), |
4344 | GetArenaNoVirtual()); |
4345 | } |
4346 | if (from.has_function_spec()) { |
4347 | function_spec_ = new ::tensorflow::FunctionSpec(*from.function_spec_); |
4348 | } else { |
4349 | function_spec_ = nullptr; |
4350 | } |
4351 | allowed_positional_arguments_ = from.allowed_positional_arguments_; |
4352 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedBareConcreteFunction) |
4353 | } |
4354 | |
4355 | void SavedBareConcreteFunction::SharedCtor() { |
4356 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SavedBareConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
4357 | concrete_function_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4358 | ::memset(&function_spec_, 0, static_cast<size_t>( |
4359 | reinterpret_cast<char*>(&allowed_positional_arguments_) - |
4360 | reinterpret_cast<char*>(&function_spec_)) + sizeof(allowed_positional_arguments_)); |
4361 | } |
4362 | |
4363 | SavedBareConcreteFunction::~SavedBareConcreteFunction() { |
4364 | // @@protoc_insertion_point(destructor:tensorflow.SavedBareConcreteFunction) |
4365 | SharedDtor(); |
4366 | } |
4367 | |
4368 | void SavedBareConcreteFunction::SharedDtor() { |
4369 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
4370 | concrete_function_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4371 | if (this != internal_default_instance()) delete function_spec_; |
4372 | } |
4373 | |
4374 | void SavedBareConcreteFunction::ArenaDtor(void* object) { |
4375 | SavedBareConcreteFunction* _this = reinterpret_cast< SavedBareConcreteFunction* >(object); |
4376 | (void)_this; |
4377 | } |
4378 | void SavedBareConcreteFunction::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
4379 | } |
4380 | void SavedBareConcreteFunction::SetCachedSize(int size) const { |
4381 | _cached_size_.Set(size); |
4382 | } |
4383 | const SavedBareConcreteFunction& SavedBareConcreteFunction::default_instance() { |
4384 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedBareConcreteFunction_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
4385 | return *internal_default_instance(); |
4386 | } |
4387 | |
4388 | |
4389 | void SavedBareConcreteFunction::Clear() { |
4390 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedBareConcreteFunction) |
4391 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4392 | // Prevent compiler warnings about cached_has_bits being unused |
4393 | (void) cached_has_bits; |
4394 | |
4395 | argument_keywords_.Clear(); |
4396 | concrete_function_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
4397 | if (GetArenaNoVirtual() == nullptr && function_spec_ != nullptr) { |
4398 | delete function_spec_; |
4399 | } |
4400 | function_spec_ = nullptr; |
4401 | allowed_positional_arguments_ = PROTOBUF_LONGLONG(0); |
4402 | _internal_metadata_.Clear(); |
4403 | } |
4404 | |
4405 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4406 | const char* SavedBareConcreteFunction::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
4407 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
4408 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
4409 | while (!ctx->Done(&ptr)) { |
4410 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
4411 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
4412 | CHK_(ptr); |
4413 | switch (tag >> 3) { |
4414 | // string concrete_function_name = 1; |
4415 | case 1: |
4416 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
4417 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_concrete_function_name(), ptr, ctx, "tensorflow.SavedBareConcreteFunction.concrete_function_name" ); |
4418 | CHK_(ptr); |
4419 | } else goto handle_unusual; |
4420 | continue; |
4421 | // repeated string argument_keywords = 2; |
4422 | case 2: |
4423 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
4424 | ptr -= 1; |
4425 | do { |
4426 | ptr += 1; |
4427 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_argument_keywords(), ptr, ctx, "tensorflow.SavedBareConcreteFunction.argument_keywords" ); |
4428 | CHK_(ptr); |
4429 | if (!ctx->DataAvailable(ptr)) break; |
4430 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); |
4431 | } else goto handle_unusual; |
4432 | continue; |
4433 | // int64 allowed_positional_arguments = 3; |
4434 | case 3: |
4435 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
4436 | allowed_positional_arguments_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
4437 | CHK_(ptr); |
4438 | } else goto handle_unusual; |
4439 | continue; |
4440 | // .tensorflow.FunctionSpec function_spec = 4; |
4441 | case 4: |
4442 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
4443 | ptr = ctx->ParseMessage(mutable_function_spec(), ptr); |
4444 | CHK_(ptr); |
4445 | } else goto handle_unusual; |
4446 | continue; |
4447 | default: { |
4448 | handle_unusual: |
4449 | if ((tag & 7) == 4 || tag == 0) { |
4450 | ctx->SetLastTag(tag); |
4451 | goto success; |
4452 | } |
4453 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
4454 | CHK_(ptr != nullptr); |
4455 | continue; |
4456 | } |
4457 | } // switch |
4458 | } // while |
4459 | success: |
4460 | return ptr; |
4461 | failure: |
4462 | ptr = nullptr; |
4463 | goto success; |
4464 | #undef CHK_ |
4465 | } |
4466 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4467 | bool SavedBareConcreteFunction::MergePartialFromCodedStream( |
4468 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
4469 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
4470 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
4471 | // @@protoc_insertion_point(parse_start:tensorflow.SavedBareConcreteFunction) |
4472 | for (;;) { |
4473 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
4474 | tag = p.first; |
4475 | if (!p.second) goto handle_unusual; |
4476 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
4477 | // string concrete_function_name = 1; |
4478 | case 1: { |
4479 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
4480 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
4481 | input, this->mutable_concrete_function_name())); |
4482 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4483 | this->concrete_function_name().data(), static_cast<int>(this->concrete_function_name().length()), |
4484 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
4485 | "tensorflow.SavedBareConcreteFunction.concrete_function_name" )); |
4486 | } else { |
4487 | goto handle_unusual; |
4488 | } |
4489 | break; |
4490 | } |
4491 | |
4492 | // repeated string argument_keywords = 2; |
4493 | case 2: { |
4494 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
4495 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
4496 | input, this->add_argument_keywords())); |
4497 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4498 | this->argument_keywords(this->argument_keywords_size() - 1).data(), |
4499 | static_cast<int>(this->argument_keywords(this->argument_keywords_size() - 1).length()), |
4500 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
4501 | "tensorflow.SavedBareConcreteFunction.argument_keywords" )); |
4502 | } else { |
4503 | goto handle_unusual; |
4504 | } |
4505 | break; |
4506 | } |
4507 | |
4508 | // int64 allowed_positional_arguments = 3; |
4509 | case 3: { |
4510 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
4511 | |
4512 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
4513 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
4514 | input, &allowed_positional_arguments_))); |
4515 | } else { |
4516 | goto handle_unusual; |
4517 | } |
4518 | break; |
4519 | } |
4520 | |
4521 | // .tensorflow.FunctionSpec function_spec = 4; |
4522 | case 4: { |
4523 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
4524 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
4525 | input, mutable_function_spec())); |
4526 | } else { |
4527 | goto handle_unusual; |
4528 | } |
4529 | break; |
4530 | } |
4531 | |
4532 | default: { |
4533 | handle_unusual: |
4534 | if (tag == 0) { |
4535 | goto success; |
4536 | } |
4537 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
4538 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
4539 | break; |
4540 | } |
4541 | } |
4542 | } |
4543 | success: |
4544 | // @@protoc_insertion_point(parse_success:tensorflow.SavedBareConcreteFunction) |
4545 | return true; |
4546 | failure: |
4547 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedBareConcreteFunction) |
4548 | return false; |
4549 | #undef DO_ |
4550 | } |
4551 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4552 | |
4553 | void SavedBareConcreteFunction::SerializeWithCachedSizes( |
4554 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
4555 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedBareConcreteFunction) |
4556 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4557 | (void) cached_has_bits; |
4558 | |
4559 | // string concrete_function_name = 1; |
4560 | if (this->concrete_function_name().size() > 0) { |
4561 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4562 | this->concrete_function_name().data(), static_cast<int>(this->concrete_function_name().length()), |
4563 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4564 | "tensorflow.SavedBareConcreteFunction.concrete_function_name" ); |
4565 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
4566 | 1, this->concrete_function_name(), output); |
4567 | } |
4568 | |
4569 | // repeated string argument_keywords = 2; |
4570 | for (int i = 0, n = this->argument_keywords_size(); i < n; i++) { |
4571 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4572 | this->argument_keywords(i).data(), static_cast<int>(this->argument_keywords(i).length()), |
4573 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4574 | "tensorflow.SavedBareConcreteFunction.argument_keywords" ); |
4575 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
4576 | 2, this->argument_keywords(i), output); |
4577 | } |
4578 | |
4579 | // int64 allowed_positional_arguments = 3; |
4580 | if (this->allowed_positional_arguments() != 0) { |
4581 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->allowed_positional_arguments(), output); |
4582 | } |
4583 | |
4584 | // .tensorflow.FunctionSpec function_spec = 4; |
4585 | if (this->has_function_spec()) { |
4586 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
4587 | 4, _Internal::function_spec(this), output); |
4588 | } |
4589 | |
4590 | if (_internal_metadata_.have_unknown_fields()) { |
4591 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
4592 | _internal_metadata_.unknown_fields(), output); |
4593 | } |
4594 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedBareConcreteFunction) |
4595 | } |
4596 | |
4597 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedBareConcreteFunction::InternalSerializeWithCachedSizesToArray( |
4598 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
4599 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedBareConcreteFunction) |
4600 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4601 | (void) cached_has_bits; |
4602 | |
4603 | // string concrete_function_name = 1; |
4604 | if (this->concrete_function_name().size() > 0) { |
4605 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4606 | this->concrete_function_name().data(), static_cast<int>(this->concrete_function_name().length()), |
4607 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4608 | "tensorflow.SavedBareConcreteFunction.concrete_function_name" ); |
4609 | target = |
4610 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
4611 | 1, this->concrete_function_name(), target); |
4612 | } |
4613 | |
4614 | // repeated string argument_keywords = 2; |
4615 | for (int i = 0, n = this->argument_keywords_size(); i < n; i++) { |
4616 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4617 | this->argument_keywords(i).data(), static_cast<int>(this->argument_keywords(i).length()), |
4618 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4619 | "tensorflow.SavedBareConcreteFunction.argument_keywords" ); |
4620 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4621 | WriteStringToArray(2, this->argument_keywords(i), target); |
4622 | } |
4623 | |
4624 | // int64 allowed_positional_arguments = 3; |
4625 | if (this->allowed_positional_arguments() != 0) { |
4626 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->allowed_positional_arguments(), target); |
4627 | } |
4628 | |
4629 | // .tensorflow.FunctionSpec function_spec = 4; |
4630 | if (this->has_function_spec()) { |
4631 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4632 | InternalWriteMessageToArray( |
4633 | 4, _Internal::function_spec(this), target); |
4634 | } |
4635 | |
4636 | if (_internal_metadata_.have_unknown_fields()) { |
4637 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
4638 | _internal_metadata_.unknown_fields(), target); |
4639 | } |
4640 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedBareConcreteFunction) |
4641 | return target; |
4642 | } |
4643 | |
4644 | size_t SavedBareConcreteFunction::ByteSizeLong() const { |
4645 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedBareConcreteFunction) |
4646 | size_t total_size = 0; |
4647 | |
4648 | if (_internal_metadata_.have_unknown_fields()) { |
4649 | total_size += |
4650 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
4651 | _internal_metadata_.unknown_fields()); |
4652 | } |
4653 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4654 | // Prevent compiler warnings about cached_has_bits being unused |
4655 | (void) cached_has_bits; |
4656 | |
4657 | // repeated string argument_keywords = 2; |
4658 | total_size += 1 * |
4659 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->argument_keywords_size()); |
4660 | for (int i = 0, n = this->argument_keywords_size(); i < n; i++) { |
4661 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4662 | this->argument_keywords(i)); |
4663 | } |
4664 | |
4665 | // string concrete_function_name = 1; |
4666 | if (this->concrete_function_name().size() > 0) { |
4667 | total_size += 1 + |
4668 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4669 | this->concrete_function_name()); |
4670 | } |
4671 | |
4672 | // .tensorflow.FunctionSpec function_spec = 4; |
4673 | if (this->has_function_spec()) { |
4674 | total_size += 1 + |
4675 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
4676 | *function_spec_); |
4677 | } |
4678 | |
4679 | // int64 allowed_positional_arguments = 3; |
4680 | if (this->allowed_positional_arguments() != 0) { |
4681 | total_size += 1 + |
4682 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
4683 | this->allowed_positional_arguments()); |
4684 | } |
4685 | |
4686 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
4687 | SetCachedSize(cached_size); |
4688 | return total_size; |
4689 | } |
4690 | |
4691 | void SavedBareConcreteFunction::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4692 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedBareConcreteFunction) |
4693 | GOOGLE_DCHECK_NE(&from, this); |
4694 | const SavedBareConcreteFunction* source = |
4695 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedBareConcreteFunction>( |
4696 | &from); |
4697 | if (source == nullptr) { |
4698 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedBareConcreteFunction) |
4699 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
4700 | } else { |
4701 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedBareConcreteFunction) |
4702 | MergeFrom(*source); |
4703 | } |
4704 | } |
4705 | |
4706 | void SavedBareConcreteFunction::MergeFrom(const SavedBareConcreteFunction& from) { |
4707 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedBareConcreteFunction) |
4708 | GOOGLE_DCHECK_NE(&from, this); |
4709 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
4710 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4711 | (void) cached_has_bits; |
4712 | |
4713 | argument_keywords_.MergeFrom(from.argument_keywords_); |
4714 | if (from.concrete_function_name().size() > 0) { |
4715 | set_concrete_function_name(from.concrete_function_name()); |
4716 | } |
4717 | if (from.has_function_spec()) { |
4718 | mutable_function_spec()->::tensorflow::FunctionSpec::MergeFrom(from.function_spec()); |
4719 | } |
4720 | if (from.allowed_positional_arguments() != 0) { |
4721 | set_allowed_positional_arguments(from.allowed_positional_arguments()); |
4722 | } |
4723 | } |
4724 | |
4725 | void SavedBareConcreteFunction::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4726 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedBareConcreteFunction) |
4727 | if (&from == this) return; |
4728 | Clear(); |
4729 | MergeFrom(from); |
4730 | } |
4731 | |
4732 | void SavedBareConcreteFunction::CopyFrom(const SavedBareConcreteFunction& from) { |
4733 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedBareConcreteFunction) |
4734 | if (&from == this) return; |
4735 | Clear(); |
4736 | MergeFrom(from); |
4737 | } |
4738 | |
4739 | bool SavedBareConcreteFunction::IsInitialized() const { |
4740 | return true; |
4741 | } |
4742 | |
4743 | void SavedBareConcreteFunction::InternalSwap(SavedBareConcreteFunction* other) { |
4744 | using std::swap; |
4745 | _internal_metadata_.Swap(&other->_internal_metadata_); |
4746 | argument_keywords_.InternalSwap(CastToBase(&other->argument_keywords_)); |
4747 | concrete_function_name_.Swap(&other->concrete_function_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
4748 | GetArenaNoVirtual()); |
4749 | swap(function_spec_, other->function_spec_); |
4750 | swap(allowed_positional_arguments_, other->allowed_positional_arguments_); |
4751 | } |
4752 | |
4753 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedBareConcreteFunction::GetMetadata() const { |
4754 | return GetMetadataStatic(); |
4755 | } |
4756 | |
4757 | |
4758 | // =================================================================== |
4759 | |
4760 | void SavedConstant::InitAsDefaultInstance() { |
4761 | } |
4762 | class SavedConstant::_Internal { |
4763 | public: |
4764 | }; |
4765 | |
4766 | SavedConstant::SavedConstant() |
4767 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
4768 | SharedCtor(); |
4769 | // @@protoc_insertion_point(constructor:tensorflow.SavedConstant) |
4770 | } |
4771 | SavedConstant::SavedConstant(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
4772 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
4773 | _internal_metadata_(arena) { |
4774 | SharedCtor(); |
4775 | RegisterArenaDtor(arena); |
4776 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedConstant) |
4777 | } |
4778 | SavedConstant::SavedConstant(const SavedConstant& from) |
4779 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
4780 | _internal_metadata_(nullptr) { |
4781 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
4782 | operation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4783 | if (!from.operation().empty()) { |
4784 | operation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.operation(), |
4785 | GetArenaNoVirtual()); |
4786 | } |
4787 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedConstant) |
4788 | } |
4789 | |
4790 | void SavedConstant::SharedCtor() { |
4791 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SavedConstant_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
4792 | operation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4793 | } |
4794 | |
4795 | SavedConstant::~SavedConstant() { |
4796 | // @@protoc_insertion_point(destructor:tensorflow.SavedConstant) |
4797 | SharedDtor(); |
4798 | } |
4799 | |
4800 | void SavedConstant::SharedDtor() { |
4801 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
4802 | operation_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
4803 | } |
4804 | |
4805 | void SavedConstant::ArenaDtor(void* object) { |
4806 | SavedConstant* _this = reinterpret_cast< SavedConstant* >(object); |
4807 | (void)_this; |
4808 | } |
4809 | void SavedConstant::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
4810 | } |
4811 | void SavedConstant::SetCachedSize(int size) const { |
4812 | _cached_size_.Set(size); |
4813 | } |
4814 | const SavedConstant& SavedConstant::default_instance() { |
4815 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedConstant_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
4816 | return *internal_default_instance(); |
4817 | } |
4818 | |
4819 | |
4820 | void SavedConstant::Clear() { |
4821 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedConstant) |
4822 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4823 | // Prevent compiler warnings about cached_has_bits being unused |
4824 | (void) cached_has_bits; |
4825 | |
4826 | operation_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
4827 | _internal_metadata_.Clear(); |
4828 | } |
4829 | |
4830 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4831 | const char* SavedConstant::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
4832 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
4833 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
4834 | while (!ctx->Done(&ptr)) { |
4835 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
4836 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
4837 | CHK_(ptr); |
4838 | switch (tag >> 3) { |
4839 | // string operation = 1; |
4840 | case 1: |
4841 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
4842 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_operation(), ptr, ctx, "tensorflow.SavedConstant.operation" ); |
4843 | CHK_(ptr); |
4844 | } else goto handle_unusual; |
4845 | continue; |
4846 | default: { |
4847 | handle_unusual: |
4848 | if ((tag & 7) == 4 || tag == 0) { |
4849 | ctx->SetLastTag(tag); |
4850 | goto success; |
4851 | } |
4852 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
4853 | CHK_(ptr != nullptr); |
4854 | continue; |
4855 | } |
4856 | } // switch |
4857 | } // while |
4858 | success: |
4859 | return ptr; |
4860 | failure: |
4861 | ptr = nullptr; |
4862 | goto success; |
4863 | #undef CHK_ |
4864 | } |
4865 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4866 | bool SavedConstant::MergePartialFromCodedStream( |
4867 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
4868 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
4869 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
4870 | // @@protoc_insertion_point(parse_start:tensorflow.SavedConstant) |
4871 | for (;;) { |
4872 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
4873 | tag = p.first; |
4874 | if (!p.second) goto handle_unusual; |
4875 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
4876 | // string operation = 1; |
4877 | case 1: { |
4878 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
4879 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
4880 | input, this->mutable_operation())); |
4881 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4882 | this->operation().data(), static_cast<int>(this->operation().length()), |
4883 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
4884 | "tensorflow.SavedConstant.operation" )); |
4885 | } else { |
4886 | goto handle_unusual; |
4887 | } |
4888 | break; |
4889 | } |
4890 | |
4891 | default: { |
4892 | handle_unusual: |
4893 | if (tag == 0) { |
4894 | goto success; |
4895 | } |
4896 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
4897 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
4898 | break; |
4899 | } |
4900 | } |
4901 | } |
4902 | success: |
4903 | // @@protoc_insertion_point(parse_success:tensorflow.SavedConstant) |
4904 | return true; |
4905 | failure: |
4906 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedConstant) |
4907 | return false; |
4908 | #undef DO_ |
4909 | } |
4910 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4911 | |
4912 | void SavedConstant::SerializeWithCachedSizes( |
4913 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
4914 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedConstant) |
4915 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4916 | (void) cached_has_bits; |
4917 | |
4918 | // string operation = 1; |
4919 | if (this->operation().size() > 0) { |
4920 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4921 | this->operation().data(), static_cast<int>(this->operation().length()), |
4922 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4923 | "tensorflow.SavedConstant.operation" ); |
4924 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
4925 | 1, this->operation(), output); |
4926 | } |
4927 | |
4928 | if (_internal_metadata_.have_unknown_fields()) { |
4929 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
4930 | _internal_metadata_.unknown_fields(), output); |
4931 | } |
4932 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedConstant) |
4933 | } |
4934 | |
4935 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedConstant::InternalSerializeWithCachedSizesToArray( |
4936 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
4937 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedConstant) |
4938 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4939 | (void) cached_has_bits; |
4940 | |
4941 | // string operation = 1; |
4942 | if (this->operation().size() > 0) { |
4943 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4944 | this->operation().data(), static_cast<int>(this->operation().length()), |
4945 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4946 | "tensorflow.SavedConstant.operation" ); |
4947 | target = |
4948 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
4949 | 1, this->operation(), target); |
4950 | } |
4951 | |
4952 | if (_internal_metadata_.have_unknown_fields()) { |
4953 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
4954 | _internal_metadata_.unknown_fields(), target); |
4955 | } |
4956 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedConstant) |
4957 | return target; |
4958 | } |
4959 | |
4960 | size_t SavedConstant::ByteSizeLong() const { |
4961 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedConstant) |
4962 | size_t total_size = 0; |
4963 | |
4964 | if (_internal_metadata_.have_unknown_fields()) { |
4965 | total_size += |
4966 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
4967 | _internal_metadata_.unknown_fields()); |
4968 | } |
4969 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4970 | // Prevent compiler warnings about cached_has_bits being unused |
4971 | (void) cached_has_bits; |
4972 | |
4973 | // string operation = 1; |
4974 | if (this->operation().size() > 0) { |
4975 | total_size += 1 + |
4976 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4977 | this->operation()); |
4978 | } |
4979 | |
4980 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
4981 | SetCachedSize(cached_size); |
4982 | return total_size; |
4983 | } |
4984 | |
4985 | void SavedConstant::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4986 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedConstant) |
4987 | GOOGLE_DCHECK_NE(&from, this); |
4988 | const SavedConstant* source = |
4989 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedConstant>( |
4990 | &from); |
4991 | if (source == nullptr) { |
4992 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedConstant) |
4993 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
4994 | } else { |
4995 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedConstant) |
4996 | MergeFrom(*source); |
4997 | } |
4998 | } |
4999 | |
5000 | void SavedConstant::MergeFrom(const SavedConstant& from) { |
5001 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedConstant) |
5002 | GOOGLE_DCHECK_NE(&from, this); |
5003 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
5004 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5005 | (void) cached_has_bits; |
5006 | |
5007 | if (from.operation().size() > 0) { |
5008 | set_operation(from.operation()); |
5009 | } |
5010 | } |
5011 | |
5012 | void SavedConstant::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
5013 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedConstant) |
5014 | if (&from == this) return; |
5015 | Clear(); |
5016 | MergeFrom(from); |
5017 | } |
5018 | |
5019 | void SavedConstant::CopyFrom(const SavedConstant& from) { |
5020 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedConstant) |
5021 | if (&from == this) return; |
5022 | Clear(); |
5023 | MergeFrom(from); |
5024 | } |
5025 | |
5026 | bool SavedConstant::IsInitialized() const { |
5027 | return true; |
5028 | } |
5029 | |
5030 | void SavedConstant::InternalSwap(SavedConstant* other) { |
5031 | using std::swap; |
5032 | _internal_metadata_.Swap(&other->_internal_metadata_); |
5033 | operation_.Swap(&other->operation_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
5034 | GetArenaNoVirtual()); |
5035 | } |
5036 | |
5037 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedConstant::GetMetadata() const { |
5038 | return GetMetadataStatic(); |
5039 | } |
5040 | |
5041 | |
5042 | // =================================================================== |
5043 | |
5044 | void SavedVariable::InitAsDefaultInstance() { |
5045 | ::tensorflow::_SavedVariable_default_instance_._instance.get_mutable()->shape_ = const_cast< ::tensorflow::TensorShapeProto*>( |
5046 | ::tensorflow::TensorShapeProto::internal_default_instance()); |
5047 | } |
5048 | class SavedVariable::_Internal { |
5049 | public: |
5050 | static const ::tensorflow::TensorShapeProto& shape(const SavedVariable* msg); |
5051 | }; |
5052 | |
5053 | const ::tensorflow::TensorShapeProto& |
5054 | SavedVariable::_Internal::shape(const SavedVariable* msg) { |
5055 | return *msg->shape_; |
5056 | } |
5057 | void SavedVariable::unsafe_arena_set_allocated_shape( |
5058 | ::tensorflow::TensorShapeProto* shape) { |
5059 | if (GetArenaNoVirtual() == nullptr) { |
5060 | delete shape_; |
5061 | } |
5062 | shape_ = shape; |
5063 | if (shape) { |
5064 | |
5065 | } else { |
5066 | |
5067 | } |
5068 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SavedVariable.shape) |
5069 | } |
5070 | void SavedVariable::clear_shape() { |
5071 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
5072 | delete shape_; |
5073 | } |
5074 | shape_ = nullptr; |
5075 | } |
5076 | SavedVariable::SavedVariable() |
5077 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
5078 | SharedCtor(); |
5079 | // @@protoc_insertion_point(constructor:tensorflow.SavedVariable) |
5080 | } |
5081 | SavedVariable::SavedVariable(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
5082 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
5083 | _internal_metadata_(arena), |
5084 | experimental_distributed_variable_components_(arena) { |
5085 | SharedCtor(); |
5086 | RegisterArenaDtor(arena); |
5087 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedVariable) |
5088 | } |
5089 | SavedVariable::SavedVariable(const SavedVariable& from) |
5090 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
5091 | _internal_metadata_(nullptr), |
5092 | experimental_distributed_variable_components_(from.experimental_distributed_variable_components_) { |
5093 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
5094 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
5095 | if (!from.name().empty()) { |
5096 | name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), |
5097 | GetArenaNoVirtual()); |
5098 | } |
5099 | device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
5100 | if (!from.device().empty()) { |
5101 | device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.device(), |
5102 | GetArenaNoVirtual()); |
5103 | } |
5104 | if (from.has_shape()) { |
5105 | shape_ = new ::tensorflow::TensorShapeProto(*from.shape_); |
5106 | } else { |
5107 | shape_ = nullptr; |
5108 | } |
5109 | ::memcpy(&dtype_, &from.dtype_, |
5110 | static_cast<size_t>(reinterpret_cast<char*>(&aggregation_) - |
5111 | reinterpret_cast<char*>(&dtype_)) + sizeof(aggregation_)); |
5112 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedVariable) |
5113 | } |
5114 | |
5115 | void SavedVariable::SharedCtor() { |
5116 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SavedVariable_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
5117 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
5118 | device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
5119 | ::memset(&shape_, 0, static_cast<size_t>( |
5120 | reinterpret_cast<char*>(&aggregation_) - |
5121 | reinterpret_cast<char*>(&shape_)) + sizeof(aggregation_)); |
5122 | } |
5123 | |
5124 | SavedVariable::~SavedVariable() { |
5125 | // @@protoc_insertion_point(destructor:tensorflow.SavedVariable) |
5126 | SharedDtor(); |
5127 | } |
5128 | |
5129 | void SavedVariable::SharedDtor() { |
5130 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
5131 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
5132 | device_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
5133 | if (this != internal_default_instance()) delete shape_; |
5134 | } |
5135 | |
5136 | void SavedVariable::ArenaDtor(void* object) { |
5137 | SavedVariable* _this = reinterpret_cast< SavedVariable* >(object); |
5138 | (void)_this; |
5139 | } |
5140 | void SavedVariable::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
5141 | } |
5142 | void SavedVariable::SetCachedSize(int size) const { |
5143 | _cached_size_.Set(size); |
5144 | } |
5145 | const SavedVariable& SavedVariable::default_instance() { |
5146 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedVariable_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
5147 | return *internal_default_instance(); |
5148 | } |
5149 | |
5150 | |
5151 | void SavedVariable::Clear() { |
5152 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedVariable) |
5153 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5154 | // Prevent compiler warnings about cached_has_bits being unused |
5155 | (void) cached_has_bits; |
5156 | |
5157 | experimental_distributed_variable_components_.Clear(); |
5158 | name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
5159 | device_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
5160 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
5161 | delete shape_; |
5162 | } |
5163 | shape_ = nullptr; |
5164 | ::memset(&dtype_, 0, static_cast<size_t>( |
5165 | reinterpret_cast<char*>(&aggregation_) - |
5166 | reinterpret_cast<char*>(&dtype_)) + sizeof(aggregation_)); |
5167 | _internal_metadata_.Clear(); |
5168 | } |
5169 | |
5170 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5171 | const char* SavedVariable::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
5172 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
5173 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
5174 | while (!ctx->Done(&ptr)) { |
5175 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
5176 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
5177 | CHK_(ptr); |
5178 | switch (tag >> 3) { |
5179 | // .tensorflow.DataType dtype = 1; |
5180 | case 1: |
5181 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
5182 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
5183 | CHK_(ptr); |
5184 | set_dtype(static_cast<::tensorflow::DataType>(val)); |
5185 | } else goto handle_unusual; |
5186 | continue; |
5187 | // .tensorflow.TensorShapeProto shape = 2; |
5188 | case 2: |
5189 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
5190 | ptr = ctx->ParseMessage(mutable_shape(), ptr); |
5191 | CHK_(ptr); |
5192 | } else goto handle_unusual; |
5193 | continue; |
5194 | // bool trainable = 3; |
5195 | case 3: |
5196 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
5197 | trainable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
5198 | CHK_(ptr); |
5199 | } else goto handle_unusual; |
5200 | continue; |
5201 | // .tensorflow.VariableSynchronization synchronization = 4; |
5202 | case 4: |
5203 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
5204 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
5205 | CHK_(ptr); |
5206 | set_synchronization(static_cast<::tensorflow::VariableSynchronization>(val)); |
5207 | } else goto handle_unusual; |
5208 | continue; |
5209 | // .tensorflow.VariableAggregation aggregation = 5; |
5210 | case 5: |
5211 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
5212 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
5213 | CHK_(ptr); |
5214 | set_aggregation(static_cast<::tensorflow::VariableAggregation>(val)); |
5215 | } else goto handle_unusual; |
5216 | continue; |
5217 | // string name = 6; |
5218 | case 6: |
5219 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
5220 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.SavedVariable.name" ); |
5221 | CHK_(ptr); |
5222 | } else goto handle_unusual; |
5223 | continue; |
5224 | // string device = 7; |
5225 | case 7: |
5226 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
5227 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_device(), ptr, ctx, "tensorflow.SavedVariable.device" ); |
5228 | CHK_(ptr); |
5229 | } else goto handle_unusual; |
5230 | continue; |
5231 | // repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8; |
5232 | case 8: |
5233 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { |
5234 | ptr -= 1; |
5235 | do { |
5236 | ptr += 1; |
5237 | ptr = ctx->ParseMessage(add_experimental_distributed_variable_components(), ptr); |
5238 | CHK_(ptr); |
5239 | if (!ctx->DataAvailable(ptr)) break; |
5240 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 66); |
5241 | } else goto handle_unusual; |
5242 | continue; |
5243 | default: { |
5244 | handle_unusual: |
5245 | if ((tag & 7) == 4 || tag == 0) { |
5246 | ctx->SetLastTag(tag); |
5247 | goto success; |
5248 | } |
5249 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
5250 | CHK_(ptr != nullptr); |
5251 | continue; |
5252 | } |
5253 | } // switch |
5254 | } // while |
5255 | success: |
5256 | return ptr; |
5257 | failure: |
5258 | ptr = nullptr; |
5259 | goto success; |
5260 | #undef CHK_ |
5261 | } |
5262 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5263 | bool SavedVariable::MergePartialFromCodedStream( |
5264 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
5265 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
5266 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
5267 | // @@protoc_insertion_point(parse_start:tensorflow.SavedVariable) |
5268 | for (;;) { |
5269 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
5270 | tag = p.first; |
5271 | if (!p.second) goto handle_unusual; |
5272 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
5273 | // .tensorflow.DataType dtype = 1; |
5274 | case 1: { |
5275 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
5276 | int value = 0; |
5277 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
5278 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
5279 | input, &value))); |
5280 | set_dtype(static_cast< ::tensorflow::DataType >(value)); |
5281 | } else { |
5282 | goto handle_unusual; |
5283 | } |
5284 | break; |
5285 | } |
5286 | |
5287 | // .tensorflow.TensorShapeProto shape = 2; |
5288 | case 2: { |
5289 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
5290 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
5291 | input, mutable_shape())); |
5292 | } else { |
5293 | goto handle_unusual; |
5294 | } |
5295 | break; |
5296 | } |
5297 | |
5298 | // bool trainable = 3; |
5299 | case 3: { |
5300 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
5301 | |
5302 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
5303 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
5304 | input, &trainable_))); |
5305 | } else { |
5306 | goto handle_unusual; |
5307 | } |
5308 | break; |
5309 | } |
5310 | |
5311 | // .tensorflow.VariableSynchronization synchronization = 4; |
5312 | case 4: { |
5313 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
5314 | int value = 0; |
5315 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
5316 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
5317 | input, &value))); |
5318 | set_synchronization(static_cast< ::tensorflow::VariableSynchronization >(value)); |
5319 | } else { |
5320 | goto handle_unusual; |
5321 | } |
5322 | break; |
5323 | } |
5324 | |
5325 | // .tensorflow.VariableAggregation aggregation = 5; |
5326 | case 5: { |
5327 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { |
5328 | int value = 0; |
5329 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
5330 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
5331 | input, &value))); |
5332 | set_aggregation(static_cast< ::tensorflow::VariableAggregation >(value)); |
5333 | } else { |
5334 | goto handle_unusual; |
5335 | } |
5336 | break; |
5337 | } |
5338 | |
5339 | // string name = 6; |
5340 | case 6: { |
5341 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { |
5342 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
5343 | input, this->mutable_name())); |
5344 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5345 | this->name().data(), static_cast<int>(this->name().length()), |
5346 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
5347 | "tensorflow.SavedVariable.name" )); |
5348 | } else { |
5349 | goto handle_unusual; |
5350 | } |
5351 | break; |
5352 | } |
5353 | |
5354 | // string device = 7; |
5355 | case 7: { |
5356 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
5357 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
5358 | input, this->mutable_device())); |
5359 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5360 | this->device().data(), static_cast<int>(this->device().length()), |
5361 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
5362 | "tensorflow.SavedVariable.device" )); |
5363 | } else { |
5364 | goto handle_unusual; |
5365 | } |
5366 | break; |
5367 | } |
5368 | |
5369 | // repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8; |
5370 | case 8: { |
5371 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { |
5372 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
5373 | input, add_experimental_distributed_variable_components())); |
5374 | } else { |
5375 | goto handle_unusual; |
5376 | } |
5377 | break; |
5378 | } |
5379 | |
5380 | default: { |
5381 | handle_unusual: |
5382 | if (tag == 0) { |
5383 | goto success; |
5384 | } |
5385 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
5386 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
5387 | break; |
5388 | } |
5389 | } |
5390 | } |
5391 | success: |
5392 | // @@protoc_insertion_point(parse_success:tensorflow.SavedVariable) |
5393 | return true; |
5394 | failure: |
5395 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedVariable) |
5396 | return false; |
5397 | #undef DO_ |
5398 | } |
5399 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5400 | |
5401 | void SavedVariable::SerializeWithCachedSizes( |
5402 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
5403 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedVariable) |
5404 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5405 | (void) cached_has_bits; |
5406 | |
5407 | // .tensorflow.DataType dtype = 1; |
5408 | if (this->dtype() != 0) { |
5409 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
5410 | 1, this->dtype(), output); |
5411 | } |
5412 | |
5413 | // .tensorflow.TensorShapeProto shape = 2; |
5414 | if (this->has_shape()) { |
5415 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
5416 | 2, _Internal::shape(this), output); |
5417 | } |
5418 | |
5419 | // bool trainable = 3; |
5420 | if (this->trainable() != 0) { |
5421 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->trainable(), output); |
5422 | } |
5423 | |
5424 | // .tensorflow.VariableSynchronization synchronization = 4; |
5425 | if (this->synchronization() != 0) { |
5426 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
5427 | 4, this->synchronization(), output); |
5428 | } |
5429 | |
5430 | // .tensorflow.VariableAggregation aggregation = 5; |
5431 | if (this->aggregation() != 0) { |
5432 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
5433 | 5, this->aggregation(), output); |
5434 | } |
5435 | |
5436 | // string name = 6; |
5437 | if (this->name().size() > 0) { |
5438 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5439 | this->name().data(), static_cast<int>(this->name().length()), |
5440 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5441 | "tensorflow.SavedVariable.name" ); |
5442 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
5443 | 6, this->name(), output); |
5444 | } |
5445 | |
5446 | // string device = 7; |
5447 | if (this->device().size() > 0) { |
5448 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5449 | this->device().data(), static_cast<int>(this->device().length()), |
5450 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5451 | "tensorflow.SavedVariable.device" ); |
5452 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
5453 | 7, this->device(), output); |
5454 | } |
5455 | |
5456 | // repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8; |
5457 | for (unsigned int i = 0, |
5458 | n = static_cast<unsigned int>(this->experimental_distributed_variable_components_size()); i < n; i++) { |
5459 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
5460 | 8, |
5461 | this->experimental_distributed_variable_components(static_cast<int>(i)), |
5462 | output); |
5463 | } |
5464 | |
5465 | if (_internal_metadata_.have_unknown_fields()) { |
5466 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
5467 | _internal_metadata_.unknown_fields(), output); |
5468 | } |
5469 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedVariable) |
5470 | } |
5471 | |
5472 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedVariable::InternalSerializeWithCachedSizesToArray( |
5473 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
5474 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedVariable) |
5475 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5476 | (void) cached_has_bits; |
5477 | |
5478 | // .tensorflow.DataType dtype = 1; |
5479 | if (this->dtype() != 0) { |
5480 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
5481 | 1, this->dtype(), target); |
5482 | } |
5483 | |
5484 | // .tensorflow.TensorShapeProto shape = 2; |
5485 | if (this->has_shape()) { |
5486 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
5487 | InternalWriteMessageToArray( |
5488 | 2, _Internal::shape(this), target); |
5489 | } |
5490 | |
5491 | // bool trainable = 3; |
5492 | if (this->trainable() != 0) { |
5493 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->trainable(), target); |
5494 | } |
5495 | |
5496 | // .tensorflow.VariableSynchronization synchronization = 4; |
5497 | if (this->synchronization() != 0) { |
5498 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
5499 | 4, this->synchronization(), target); |
5500 | } |
5501 | |
5502 | // .tensorflow.VariableAggregation aggregation = 5; |
5503 | if (this->aggregation() != 0) { |
5504 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
5505 | 5, this->aggregation(), target); |
5506 | } |
5507 | |
5508 | // string name = 6; |
5509 | if (this->name().size() > 0) { |
5510 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5511 | this->name().data(), static_cast<int>(this->name().length()), |
5512 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5513 | "tensorflow.SavedVariable.name" ); |
5514 | target = |
5515 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
5516 | 6, this->name(), target); |
5517 | } |
5518 | |
5519 | // string device = 7; |
5520 | if (this->device().size() > 0) { |
5521 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5522 | this->device().data(), static_cast<int>(this->device().length()), |
5523 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5524 | "tensorflow.SavedVariable.device" ); |
5525 | target = |
5526 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
5527 | 7, this->device(), target); |
5528 | } |
5529 | |
5530 | // repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8; |
5531 | for (unsigned int i = 0, |
5532 | n = static_cast<unsigned int>(this->experimental_distributed_variable_components_size()); i < n; i++) { |
5533 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
5534 | InternalWriteMessageToArray( |
5535 | 8, this->experimental_distributed_variable_components(static_cast<int>(i)), target); |
5536 | } |
5537 | |
5538 | if (_internal_metadata_.have_unknown_fields()) { |
5539 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
5540 | _internal_metadata_.unknown_fields(), target); |
5541 | } |
5542 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedVariable) |
5543 | return target; |
5544 | } |
5545 | |
5546 | size_t SavedVariable::ByteSizeLong() const { |
5547 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedVariable) |
5548 | size_t total_size = 0; |
5549 | |
5550 | if (_internal_metadata_.have_unknown_fields()) { |
5551 | total_size += |
5552 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
5553 | _internal_metadata_.unknown_fields()); |
5554 | } |
5555 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5556 | // Prevent compiler warnings about cached_has_bits being unused |
5557 | (void) cached_has_bits; |
5558 | |
5559 | // repeated .tensorflow.SavedVariable experimental_distributed_variable_components = 8; |
5560 | { |
5561 | unsigned int count = static_cast<unsigned int>(this->experimental_distributed_variable_components_size()); |
5562 | total_size += 1UL * count; |
5563 | for (unsigned int i = 0; i < count; i++) { |
5564 | total_size += |
5565 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
5566 | this->experimental_distributed_variable_components(static_cast<int>(i))); |
5567 | } |
5568 | } |
5569 | |
5570 | // string name = 6; |
5571 | if (this->name().size() > 0) { |
5572 | total_size += 1 + |
5573 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
5574 | this->name()); |
5575 | } |
5576 | |
5577 | // string device = 7; |
5578 | if (this->device().size() > 0) { |
5579 | total_size += 1 + |
5580 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
5581 | this->device()); |
5582 | } |
5583 | |
5584 | // .tensorflow.TensorShapeProto shape = 2; |
5585 | if (this->has_shape()) { |
5586 | total_size += 1 + |
5587 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
5588 | *shape_); |
5589 | } |
5590 | |
5591 | // .tensorflow.DataType dtype = 1; |
5592 | if (this->dtype() != 0) { |
5593 | total_size += 1 + |
5594 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->dtype()); |
5595 | } |
5596 | |
5597 | // bool trainable = 3; |
5598 | if (this->trainable() != 0) { |
5599 | total_size += 1 + 1; |
5600 | } |
5601 | |
5602 | // .tensorflow.VariableSynchronization synchronization = 4; |
5603 | if (this->synchronization() != 0) { |
5604 | total_size += 1 + |
5605 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->synchronization()); |
5606 | } |
5607 | |
5608 | // .tensorflow.VariableAggregation aggregation = 5; |
5609 | if (this->aggregation() != 0) { |
5610 | total_size += 1 + |
5611 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->aggregation()); |
5612 | } |
5613 | |
5614 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
5615 | SetCachedSize(cached_size); |
5616 | return total_size; |
5617 | } |
5618 | |
5619 | void SavedVariable::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
5620 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedVariable) |
5621 | GOOGLE_DCHECK_NE(&from, this); |
5622 | const SavedVariable* source = |
5623 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedVariable>( |
5624 | &from); |
5625 | if (source == nullptr) { |
5626 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedVariable) |
5627 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
5628 | } else { |
5629 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedVariable) |
5630 | MergeFrom(*source); |
5631 | } |
5632 | } |
5633 | |
5634 | void SavedVariable::MergeFrom(const SavedVariable& from) { |
5635 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedVariable) |
5636 | GOOGLE_DCHECK_NE(&from, this); |
5637 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
5638 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5639 | (void) cached_has_bits; |
5640 | |
5641 | experimental_distributed_variable_components_.MergeFrom(from.experimental_distributed_variable_components_); |
5642 | if (from.name().size() > 0) { |
5643 | set_name(from.name()); |
5644 | } |
5645 | if (from.device().size() > 0) { |
5646 | set_device(from.device()); |
5647 | } |
5648 | if (from.has_shape()) { |
5649 | mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape()); |
5650 | } |
5651 | if (from.dtype() != 0) { |
5652 | set_dtype(from.dtype()); |
5653 | } |
5654 | if (from.trainable() != 0) { |
5655 | set_trainable(from.trainable()); |
5656 | } |
5657 | if (from.synchronization() != 0) { |
5658 | set_synchronization(from.synchronization()); |
5659 | } |
5660 | if (from.aggregation() != 0) { |
5661 | set_aggregation(from.aggregation()); |
5662 | } |
5663 | } |
5664 | |
5665 | void SavedVariable::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
5666 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedVariable) |
5667 | if (&from == this) return; |
5668 | Clear(); |
5669 | MergeFrom(from); |
5670 | } |
5671 | |
5672 | void SavedVariable::CopyFrom(const SavedVariable& from) { |
5673 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedVariable) |
5674 | if (&from == this) return; |
5675 | Clear(); |
5676 | MergeFrom(from); |
5677 | } |
5678 | |
5679 | bool SavedVariable::IsInitialized() const { |
5680 | return true; |
5681 | } |
5682 | |
5683 | void SavedVariable::InternalSwap(SavedVariable* other) { |
5684 | using std::swap; |
5685 | _internal_metadata_.Swap(&other->_internal_metadata_); |
5686 | CastToBase(&experimental_distributed_variable_components_)->InternalSwap(CastToBase(&other->experimental_distributed_variable_components_)); |
5687 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
5688 | GetArenaNoVirtual()); |
5689 | device_.Swap(&other->device_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
5690 | GetArenaNoVirtual()); |
5691 | swap(shape_, other->shape_); |
5692 | swap(dtype_, other->dtype_); |
5693 | swap(trainable_, other->trainable_); |
5694 | swap(synchronization_, other->synchronization_); |
5695 | swap(aggregation_, other->aggregation_); |
5696 | } |
5697 | |
5698 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedVariable::GetMetadata() const { |
5699 | return GetMetadataStatic(); |
5700 | } |
5701 | |
5702 | |
5703 | // =================================================================== |
5704 | |
5705 | void FunctionSpec::InitAsDefaultInstance() { |
5706 | ::tensorflow::_FunctionSpec_default_instance_._instance.get_mutable()->fullargspec_ = const_cast< ::tensorflow::StructuredValue*>( |
5707 | ::tensorflow::StructuredValue::internal_default_instance()); |
5708 | ::tensorflow::_FunctionSpec_default_instance_._instance.get_mutable()->input_signature_ = const_cast< ::tensorflow::StructuredValue*>( |
5709 | ::tensorflow::StructuredValue::internal_default_instance()); |
5710 | } |
5711 | class FunctionSpec::_Internal { |
5712 | public: |
5713 | static const ::tensorflow::StructuredValue& fullargspec(const FunctionSpec* msg); |
5714 | static const ::tensorflow::StructuredValue& input_signature(const FunctionSpec* msg); |
5715 | }; |
5716 | |
5717 | const ::tensorflow::StructuredValue& |
5718 | FunctionSpec::_Internal::fullargspec(const FunctionSpec* msg) { |
5719 | return *msg->fullargspec_; |
5720 | } |
5721 | const ::tensorflow::StructuredValue& |
5722 | FunctionSpec::_Internal::input_signature(const FunctionSpec* msg) { |
5723 | return *msg->input_signature_; |
5724 | } |
5725 | void FunctionSpec::unsafe_arena_set_allocated_fullargspec( |
5726 | ::tensorflow::StructuredValue* fullargspec) { |
5727 | if (GetArenaNoVirtual() == nullptr) { |
5728 | delete fullargspec_; |
5729 | } |
5730 | fullargspec_ = fullargspec; |
5731 | if (fullargspec) { |
5732 | |
5733 | } else { |
5734 | |
5735 | } |
5736 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FunctionSpec.fullargspec) |
5737 | } |
5738 | void FunctionSpec::clear_fullargspec() { |
5739 | if (GetArenaNoVirtual() == nullptr && fullargspec_ != nullptr) { |
5740 | delete fullargspec_; |
5741 | } |
5742 | fullargspec_ = nullptr; |
5743 | } |
5744 | void FunctionSpec::unsafe_arena_set_allocated_input_signature( |
5745 | ::tensorflow::StructuredValue* input_signature) { |
5746 | if (GetArenaNoVirtual() == nullptr) { |
5747 | delete input_signature_; |
5748 | } |
5749 | input_signature_ = input_signature; |
5750 | if (input_signature) { |
5751 | |
5752 | } else { |
5753 | |
5754 | } |
5755 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FunctionSpec.input_signature) |
5756 | } |
5757 | void FunctionSpec::clear_input_signature() { |
5758 | if (GetArenaNoVirtual() == nullptr && input_signature_ != nullptr) { |
5759 | delete input_signature_; |
5760 | } |
5761 | input_signature_ = nullptr; |
5762 | } |
5763 | FunctionSpec::FunctionSpec() |
5764 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
5765 | SharedCtor(); |
5766 | // @@protoc_insertion_point(constructor:tensorflow.FunctionSpec) |
5767 | } |
5768 | FunctionSpec::FunctionSpec(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
5769 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
5770 | _internal_metadata_(arena) { |
5771 | SharedCtor(); |
5772 | RegisterArenaDtor(arena); |
5773 | // @@protoc_insertion_point(arena_constructor:tensorflow.FunctionSpec) |
5774 | } |
5775 | FunctionSpec::FunctionSpec(const FunctionSpec& from) |
5776 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
5777 | _internal_metadata_(nullptr) { |
5778 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
5779 | if (from.has_fullargspec()) { |
5780 | fullargspec_ = new ::tensorflow::StructuredValue(*from.fullargspec_); |
5781 | } else { |
5782 | fullargspec_ = nullptr; |
5783 | } |
5784 | if (from.has_input_signature()) { |
5785 | input_signature_ = new ::tensorflow::StructuredValue(*from.input_signature_); |
5786 | } else { |
5787 | input_signature_ = nullptr; |
5788 | } |
5789 | ::memcpy(&is_method_, &from.is_method_, |
5790 | static_cast<size_t>(reinterpret_cast<char*>(&jit_compile_) - |
5791 | reinterpret_cast<char*>(&is_method_)) + sizeof(jit_compile_)); |
5792 | // @@protoc_insertion_point(copy_constructor:tensorflow.FunctionSpec) |
5793 | } |
5794 | |
5795 | void FunctionSpec::SharedCtor() { |
5796 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FunctionSpec_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
5797 | ::memset(&fullargspec_, 0, static_cast<size_t>( |
5798 | reinterpret_cast<char*>(&jit_compile_) - |
5799 | reinterpret_cast<char*>(&fullargspec_)) + sizeof(jit_compile_)); |
5800 | } |
5801 | |
5802 | FunctionSpec::~FunctionSpec() { |
5803 | // @@protoc_insertion_point(destructor:tensorflow.FunctionSpec) |
5804 | SharedDtor(); |
5805 | } |
5806 | |
5807 | void FunctionSpec::SharedDtor() { |
5808 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
5809 | if (this != internal_default_instance()) delete fullargspec_; |
5810 | if (this != internal_default_instance()) delete input_signature_; |
5811 | } |
5812 | |
5813 | void FunctionSpec::ArenaDtor(void* object) { |
5814 | FunctionSpec* _this = reinterpret_cast< FunctionSpec* >(object); |
5815 | (void)_this; |
5816 | } |
5817 | void FunctionSpec::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
5818 | } |
5819 | void FunctionSpec::SetCachedSize(int size) const { |
5820 | _cached_size_.Set(size); |
5821 | } |
5822 | const FunctionSpec& FunctionSpec::default_instance() { |
5823 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FunctionSpec_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
5824 | return *internal_default_instance(); |
5825 | } |
5826 | |
5827 | |
5828 | void FunctionSpec::Clear() { |
5829 | // @@protoc_insertion_point(message_clear_start:tensorflow.FunctionSpec) |
5830 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5831 | // Prevent compiler warnings about cached_has_bits being unused |
5832 | (void) cached_has_bits; |
5833 | |
5834 | if (GetArenaNoVirtual() == nullptr && fullargspec_ != nullptr) { |
5835 | delete fullargspec_; |
5836 | } |
5837 | fullargspec_ = nullptr; |
5838 | if (GetArenaNoVirtual() == nullptr && input_signature_ != nullptr) { |
5839 | delete input_signature_; |
5840 | } |
5841 | input_signature_ = nullptr; |
5842 | ::memset(&is_method_, 0, static_cast<size_t>( |
5843 | reinterpret_cast<char*>(&jit_compile_) - |
5844 | reinterpret_cast<char*>(&is_method_)) + sizeof(jit_compile_)); |
5845 | _internal_metadata_.Clear(); |
5846 | } |
5847 | |
5848 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5849 | const char* FunctionSpec::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
5850 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
5851 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
5852 | while (!ctx->Done(&ptr)) { |
5853 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
5854 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
5855 | CHK_(ptr); |
5856 | switch (tag >> 3) { |
5857 | // .tensorflow.StructuredValue fullargspec = 1; |
5858 | case 1: |
5859 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
5860 | ptr = ctx->ParseMessage(mutable_fullargspec(), ptr); |
5861 | CHK_(ptr); |
5862 | } else goto handle_unusual; |
5863 | continue; |
5864 | // bool is_method = 2; |
5865 | case 2: |
5866 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
5867 | is_method_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
5868 | CHK_(ptr); |
5869 | } else goto handle_unusual; |
5870 | continue; |
5871 | // .tensorflow.StructuredValue input_signature = 5; |
5872 | case 5: |
5873 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
5874 | ptr = ctx->ParseMessage(mutable_input_signature(), ptr); |
5875 | CHK_(ptr); |
5876 | } else goto handle_unusual; |
5877 | continue; |
5878 | // .tensorflow.FunctionSpec.JitCompile jit_compile = 6; |
5879 | case 6: |
5880 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
5881 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
5882 | CHK_(ptr); |
5883 | set_jit_compile(static_cast<::tensorflow::FunctionSpec_JitCompile>(val)); |
5884 | } else goto handle_unusual; |
5885 | continue; |
5886 | default: { |
5887 | handle_unusual: |
5888 | if ((tag & 7) == 4 || tag == 0) { |
5889 | ctx->SetLastTag(tag); |
5890 | goto success; |
5891 | } |
5892 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
5893 | CHK_(ptr != nullptr); |
5894 | continue; |
5895 | } |
5896 | } // switch |
5897 | } // while |
5898 | success: |
5899 | return ptr; |
5900 | failure: |
5901 | ptr = nullptr; |
5902 | goto success; |
5903 | #undef CHK_ |
5904 | } |
5905 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5906 | bool FunctionSpec::MergePartialFromCodedStream( |
5907 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
5908 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
5909 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
5910 | // @@protoc_insertion_point(parse_start:tensorflow.FunctionSpec) |
5911 | for (;;) { |
5912 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
5913 | tag = p.first; |
5914 | if (!p.second) goto handle_unusual; |
5915 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
5916 | // .tensorflow.StructuredValue fullargspec = 1; |
5917 | case 1: { |
5918 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
5919 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
5920 | input, mutable_fullargspec())); |
5921 | } else { |
5922 | goto handle_unusual; |
5923 | } |
5924 | break; |
5925 | } |
5926 | |
5927 | // bool is_method = 2; |
5928 | case 2: { |
5929 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
5930 | |
5931 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
5932 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
5933 | input, &is_method_))); |
5934 | } else { |
5935 | goto handle_unusual; |
5936 | } |
5937 | break; |
5938 | } |
5939 | |
5940 | // .tensorflow.StructuredValue input_signature = 5; |
5941 | case 5: { |
5942 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
5943 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
5944 | input, mutable_input_signature())); |
5945 | } else { |
5946 | goto handle_unusual; |
5947 | } |
5948 | break; |
5949 | } |
5950 | |
5951 | // .tensorflow.FunctionSpec.JitCompile jit_compile = 6; |
5952 | case 6: { |
5953 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { |
5954 | int value = 0; |
5955 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
5956 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
5957 | input, &value))); |
5958 | set_jit_compile(static_cast< ::tensorflow::FunctionSpec_JitCompile >(value)); |
5959 | } else { |
5960 | goto handle_unusual; |
5961 | } |
5962 | break; |
5963 | } |
5964 | |
5965 | default: { |
5966 | handle_unusual: |
5967 | if (tag == 0) { |
5968 | goto success; |
5969 | } |
5970 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
5971 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
5972 | break; |
5973 | } |
5974 | } |
5975 | } |
5976 | success: |
5977 | // @@protoc_insertion_point(parse_success:tensorflow.FunctionSpec) |
5978 | return true; |
5979 | failure: |
5980 | // @@protoc_insertion_point(parse_failure:tensorflow.FunctionSpec) |
5981 | return false; |
5982 | #undef DO_ |
5983 | } |
5984 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5985 | |
5986 | void FunctionSpec::SerializeWithCachedSizes( |
5987 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
5988 | // @@protoc_insertion_point(serialize_start:tensorflow.FunctionSpec) |
5989 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5990 | (void) cached_has_bits; |
5991 | |
5992 | // .tensorflow.StructuredValue fullargspec = 1; |
5993 | if (this->has_fullargspec()) { |
5994 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
5995 | 1, _Internal::fullargspec(this), output); |
5996 | } |
5997 | |
5998 | // bool is_method = 2; |
5999 | if (this->is_method() != 0) { |
6000 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->is_method(), output); |
6001 | } |
6002 | |
6003 | // .tensorflow.StructuredValue input_signature = 5; |
6004 | if (this->has_input_signature()) { |
6005 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
6006 | 5, _Internal::input_signature(this), output); |
6007 | } |
6008 | |
6009 | // .tensorflow.FunctionSpec.JitCompile jit_compile = 6; |
6010 | if (this->jit_compile() != 0) { |
6011 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
6012 | 6, this->jit_compile(), output); |
6013 | } |
6014 | |
6015 | if (_internal_metadata_.have_unknown_fields()) { |
6016 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
6017 | _internal_metadata_.unknown_fields(), output); |
6018 | } |
6019 | // @@protoc_insertion_point(serialize_end:tensorflow.FunctionSpec) |
6020 | } |
6021 | |
6022 | ::PROTOBUF_NAMESPACE_ID::uint8* FunctionSpec::InternalSerializeWithCachedSizesToArray( |
6023 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
6024 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.FunctionSpec) |
6025 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6026 | (void) cached_has_bits; |
6027 | |
6028 | // .tensorflow.StructuredValue fullargspec = 1; |
6029 | if (this->has_fullargspec()) { |
6030 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
6031 | InternalWriteMessageToArray( |
6032 | 1, _Internal::fullargspec(this), target); |
6033 | } |
6034 | |
6035 | // bool is_method = 2; |
6036 | if (this->is_method() != 0) { |
6037 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->is_method(), target); |
6038 | } |
6039 | |
6040 | // .tensorflow.StructuredValue input_signature = 5; |
6041 | if (this->has_input_signature()) { |
6042 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
6043 | InternalWriteMessageToArray( |
6044 | 5, _Internal::input_signature(this), target); |
6045 | } |
6046 | |
6047 | // .tensorflow.FunctionSpec.JitCompile jit_compile = 6; |
6048 | if (this->jit_compile() != 0) { |
6049 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
6050 | 6, this->jit_compile(), target); |
6051 | } |
6052 | |
6053 | if (_internal_metadata_.have_unknown_fields()) { |
6054 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
6055 | _internal_metadata_.unknown_fields(), target); |
6056 | } |
6057 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.FunctionSpec) |
6058 | return target; |
6059 | } |
6060 | |
6061 | size_t FunctionSpec::ByteSizeLong() const { |
6062 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.FunctionSpec) |
6063 | size_t total_size = 0; |
6064 | |
6065 | if (_internal_metadata_.have_unknown_fields()) { |
6066 | total_size += |
6067 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
6068 | _internal_metadata_.unknown_fields()); |
6069 | } |
6070 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6071 | // Prevent compiler warnings about cached_has_bits being unused |
6072 | (void) cached_has_bits; |
6073 | |
6074 | // .tensorflow.StructuredValue fullargspec = 1; |
6075 | if (this->has_fullargspec()) { |
6076 | total_size += 1 + |
6077 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
6078 | *fullargspec_); |
6079 | } |
6080 | |
6081 | // .tensorflow.StructuredValue input_signature = 5; |
6082 | if (this->has_input_signature()) { |
6083 | total_size += 1 + |
6084 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
6085 | *input_signature_); |
6086 | } |
6087 | |
6088 | // bool is_method = 2; |
6089 | if (this->is_method() != 0) { |
6090 | total_size += 1 + 1; |
6091 | } |
6092 | |
6093 | // .tensorflow.FunctionSpec.JitCompile jit_compile = 6; |
6094 | if (this->jit_compile() != 0) { |
6095 | total_size += 1 + |
6096 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->jit_compile()); |
6097 | } |
6098 | |
6099 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
6100 | SetCachedSize(cached_size); |
6101 | return total_size; |
6102 | } |
6103 | |
6104 | void FunctionSpec::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6105 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.FunctionSpec) |
6106 | GOOGLE_DCHECK_NE(&from, this); |
6107 | const FunctionSpec* source = |
6108 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<FunctionSpec>( |
6109 | &from); |
6110 | if (source == nullptr) { |
6111 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.FunctionSpec) |
6112 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
6113 | } else { |
6114 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.FunctionSpec) |
6115 | MergeFrom(*source); |
6116 | } |
6117 | } |
6118 | |
6119 | void FunctionSpec::MergeFrom(const FunctionSpec& from) { |
6120 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.FunctionSpec) |
6121 | GOOGLE_DCHECK_NE(&from, this); |
6122 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
6123 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6124 | (void) cached_has_bits; |
6125 | |
6126 | if (from.has_fullargspec()) { |
6127 | mutable_fullargspec()->::tensorflow::StructuredValue::MergeFrom(from.fullargspec()); |
6128 | } |
6129 | if (from.has_input_signature()) { |
6130 | mutable_input_signature()->::tensorflow::StructuredValue::MergeFrom(from.input_signature()); |
6131 | } |
6132 | if (from.is_method() != 0) { |
6133 | set_is_method(from.is_method()); |
6134 | } |
6135 | if (from.jit_compile() != 0) { |
6136 | set_jit_compile(from.jit_compile()); |
6137 | } |
6138 | } |
6139 | |
6140 | void FunctionSpec::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6141 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.FunctionSpec) |
6142 | if (&from == this) return; |
6143 | Clear(); |
6144 | MergeFrom(from); |
6145 | } |
6146 | |
6147 | void FunctionSpec::CopyFrom(const FunctionSpec& from) { |
6148 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.FunctionSpec) |
6149 | if (&from == this) return; |
6150 | Clear(); |
6151 | MergeFrom(from); |
6152 | } |
6153 | |
6154 | bool FunctionSpec::IsInitialized() const { |
6155 | return true; |
6156 | } |
6157 | |
6158 | void FunctionSpec::InternalSwap(FunctionSpec* other) { |
6159 | using std::swap; |
6160 | _internal_metadata_.Swap(&other->_internal_metadata_); |
6161 | swap(fullargspec_, other->fullargspec_); |
6162 | swap(input_signature_, other->input_signature_); |
6163 | swap(is_method_, other->is_method_); |
6164 | swap(jit_compile_, other->jit_compile_); |
6165 | } |
6166 | |
6167 | ::PROTOBUF_NAMESPACE_ID::Metadata FunctionSpec::GetMetadata() const { |
6168 | return GetMetadataStatic(); |
6169 | } |
6170 | |
6171 | |
6172 | // =================================================================== |
6173 | |
6174 | void SavedResource::InitAsDefaultInstance() { |
6175 | } |
6176 | class SavedResource::_Internal { |
6177 | public: |
6178 | }; |
6179 | |
6180 | SavedResource::SavedResource() |
6181 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
6182 | SharedCtor(); |
6183 | // @@protoc_insertion_point(constructor:tensorflow.SavedResource) |
6184 | } |
6185 | SavedResource::SavedResource(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
6186 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
6187 | _internal_metadata_(arena) { |
6188 | SharedCtor(); |
6189 | RegisterArenaDtor(arena); |
6190 | // @@protoc_insertion_point(arena_constructor:tensorflow.SavedResource) |
6191 | } |
6192 | SavedResource::SavedResource(const SavedResource& from) |
6193 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
6194 | _internal_metadata_(nullptr) { |
6195 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
6196 | device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
6197 | if (!from.device().empty()) { |
6198 | device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.device(), |
6199 | GetArenaNoVirtual()); |
6200 | } |
6201 | // @@protoc_insertion_point(copy_constructor:tensorflow.SavedResource) |
6202 | } |
6203 | |
6204 | void SavedResource::SharedCtor() { |
6205 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SavedResource_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
6206 | device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
6207 | } |
6208 | |
6209 | SavedResource::~SavedResource() { |
6210 | // @@protoc_insertion_point(destructor:tensorflow.SavedResource) |
6211 | SharedDtor(); |
6212 | } |
6213 | |
6214 | void SavedResource::SharedDtor() { |
6215 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
6216 | device_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
6217 | } |
6218 | |
6219 | void SavedResource::ArenaDtor(void* object) { |
6220 | SavedResource* _this = reinterpret_cast< SavedResource* >(object); |
6221 | (void)_this; |
6222 | } |
6223 | void SavedResource::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
6224 | } |
6225 | void SavedResource::SetCachedSize(int size) const { |
6226 | _cached_size_.Set(size); |
6227 | } |
6228 | const SavedResource& SavedResource::default_instance() { |
6229 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SavedResource_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
6230 | return *internal_default_instance(); |
6231 | } |
6232 | |
6233 | |
6234 | void SavedResource::Clear() { |
6235 | // @@protoc_insertion_point(message_clear_start:tensorflow.SavedResource) |
6236 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6237 | // Prevent compiler warnings about cached_has_bits being unused |
6238 | (void) cached_has_bits; |
6239 | |
6240 | device_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
6241 | _internal_metadata_.Clear(); |
6242 | } |
6243 | |
6244 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6245 | const char* SavedResource::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
6246 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
6247 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
6248 | while (!ctx->Done(&ptr)) { |
6249 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
6250 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
6251 | CHK_(ptr); |
6252 | switch (tag >> 3) { |
6253 | // string device = 1; |
6254 | case 1: |
6255 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
6256 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_device(), ptr, ctx, "tensorflow.SavedResource.device" ); |
6257 | CHK_(ptr); |
6258 | } else goto handle_unusual; |
6259 | continue; |
6260 | default: { |
6261 | handle_unusual: |
6262 | if ((tag & 7) == 4 || tag == 0) { |
6263 | ctx->SetLastTag(tag); |
6264 | goto success; |
6265 | } |
6266 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
6267 | CHK_(ptr != nullptr); |
6268 | continue; |
6269 | } |
6270 | } // switch |
6271 | } // while |
6272 | success: |
6273 | return ptr; |
6274 | failure: |
6275 | ptr = nullptr; |
6276 | goto success; |
6277 | #undef CHK_ |
6278 | } |
6279 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6280 | bool SavedResource::MergePartialFromCodedStream( |
6281 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
6282 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
6283 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
6284 | // @@protoc_insertion_point(parse_start:tensorflow.SavedResource) |
6285 | for (;;) { |
6286 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
6287 | tag = p.first; |
6288 | if (!p.second) goto handle_unusual; |
6289 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
6290 | // string device = 1; |
6291 | case 1: { |
6292 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
6293 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
6294 | input, this->mutable_device())); |
6295 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
6296 | this->device().data(), static_cast<int>(this->device().length()), |
6297 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
6298 | "tensorflow.SavedResource.device" )); |
6299 | } else { |
6300 | goto handle_unusual; |
6301 | } |
6302 | break; |
6303 | } |
6304 | |
6305 | default: { |
6306 | handle_unusual: |
6307 | if (tag == 0) { |
6308 | goto success; |
6309 | } |
6310 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
6311 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
6312 | break; |
6313 | } |
6314 | } |
6315 | } |
6316 | success: |
6317 | // @@protoc_insertion_point(parse_success:tensorflow.SavedResource) |
6318 | return true; |
6319 | failure: |
6320 | // @@protoc_insertion_point(parse_failure:tensorflow.SavedResource) |
6321 | return false; |
6322 | #undef DO_ |
6323 | } |
6324 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6325 | |
6326 | void SavedResource::SerializeWithCachedSizes( |
6327 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
6328 | // @@protoc_insertion_point(serialize_start:tensorflow.SavedResource) |
6329 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6330 | (void) cached_has_bits; |
6331 | |
6332 | // string device = 1; |
6333 | if (this->device().size() > 0) { |
6334 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
6335 | this->device().data(), static_cast<int>(this->device().length()), |
6336 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
6337 | "tensorflow.SavedResource.device" ); |
6338 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
6339 | 1, this->device(), output); |
6340 | } |
6341 | |
6342 | if (_internal_metadata_.have_unknown_fields()) { |
6343 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
6344 | _internal_metadata_.unknown_fields(), output); |
6345 | } |
6346 | // @@protoc_insertion_point(serialize_end:tensorflow.SavedResource) |
6347 | } |
6348 | |
6349 | ::PROTOBUF_NAMESPACE_ID::uint8* SavedResource::InternalSerializeWithCachedSizesToArray( |
6350 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
6351 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SavedResource) |
6352 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6353 | (void) cached_has_bits; |
6354 | |
6355 | // string device = 1; |
6356 | if (this->device().size() > 0) { |
6357 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
6358 | this->device().data(), static_cast<int>(this->device().length()), |
6359 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
6360 | "tensorflow.SavedResource.device" ); |
6361 | target = |
6362 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
6363 | 1, this->device(), target); |
6364 | } |
6365 | |
6366 | if (_internal_metadata_.have_unknown_fields()) { |
6367 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
6368 | _internal_metadata_.unknown_fields(), target); |
6369 | } |
6370 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SavedResource) |
6371 | return target; |
6372 | } |
6373 | |
6374 | size_t SavedResource::ByteSizeLong() const { |
6375 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SavedResource) |
6376 | size_t total_size = 0; |
6377 | |
6378 | if (_internal_metadata_.have_unknown_fields()) { |
6379 | total_size += |
6380 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
6381 | _internal_metadata_.unknown_fields()); |
6382 | } |
6383 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6384 | // Prevent compiler warnings about cached_has_bits being unused |
6385 | (void) cached_has_bits; |
6386 | |
6387 | // string device = 1; |
6388 | if (this->device().size() > 0) { |
6389 | total_size += 1 + |
6390 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
6391 | this->device()); |
6392 | } |
6393 | |
6394 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
6395 | SetCachedSize(cached_size); |
6396 | return total_size; |
6397 | } |
6398 | |
6399 | void SavedResource::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6400 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SavedResource) |
6401 | GOOGLE_DCHECK_NE(&from, this); |
6402 | const SavedResource* source = |
6403 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SavedResource>( |
6404 | &from); |
6405 | if (source == nullptr) { |
6406 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SavedResource) |
6407 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
6408 | } else { |
6409 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SavedResource) |
6410 | MergeFrom(*source); |
6411 | } |
6412 | } |
6413 | |
6414 | void SavedResource::MergeFrom(const SavedResource& from) { |
6415 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SavedResource) |
6416 | GOOGLE_DCHECK_NE(&from, this); |
6417 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
6418 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6419 | (void) cached_has_bits; |
6420 | |
6421 | if (from.device().size() > 0) { |
6422 | set_device(from.device()); |
6423 | } |
6424 | } |
6425 | |
6426 | void SavedResource::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6427 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SavedResource) |
6428 | if (&from == this) return; |
6429 | Clear(); |
6430 | MergeFrom(from); |
6431 | } |
6432 | |
6433 | void SavedResource::CopyFrom(const SavedResource& from) { |
6434 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SavedResource) |
6435 | if (&from == this) return; |
6436 | Clear(); |
6437 | MergeFrom(from); |
6438 | } |
6439 | |
6440 | bool SavedResource::IsInitialized() const { |
6441 | return true; |
6442 | } |
6443 | |
6444 | void SavedResource::InternalSwap(SavedResource* other) { |
6445 | using std::swap; |
6446 | _internal_metadata_.Swap(&other->_internal_metadata_); |
6447 | device_.Swap(&other->device_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
6448 | GetArenaNoVirtual()); |
6449 | } |
6450 | |
6451 | ::PROTOBUF_NAMESPACE_ID::Metadata SavedResource::GetMetadata() const { |
6452 | return GetMetadataStatic(); |
6453 | } |
6454 | |
6455 | |
6456 | // =================================================================== |
6457 | |
6458 | void SaveableObject::InitAsDefaultInstance() { |
6459 | } |
6460 | class SaveableObject::_Internal { |
6461 | public: |
6462 | }; |
6463 | |
6464 | SaveableObject::SaveableObject() |
6465 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
6466 | SharedCtor(); |
6467 | // @@protoc_insertion_point(constructor:tensorflow.SaveableObject) |
6468 | } |
6469 | SaveableObject::SaveableObject(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
6470 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
6471 | _internal_metadata_(arena) { |
6472 | SharedCtor(); |
6473 | RegisterArenaDtor(arena); |
6474 | // @@protoc_insertion_point(arena_constructor:tensorflow.SaveableObject) |
6475 | } |
6476 | SaveableObject::SaveableObject(const SaveableObject& from) |
6477 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
6478 | _internal_metadata_(nullptr) { |
6479 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
6480 | ::memcpy(&save_function_, &from.save_function_, |
6481 | static_cast<size_t>(reinterpret_cast<char*>(&restore_function_) - |
6482 | reinterpret_cast<char*>(&save_function_)) + sizeof(restore_function_)); |
6483 | // @@protoc_insertion_point(copy_constructor:tensorflow.SaveableObject) |
6484 | } |
6485 | |
6486 | void SaveableObject::SharedCtor() { |
6487 | ::memset(&save_function_, 0, static_cast<size_t>( |
6488 | reinterpret_cast<char*>(&restore_function_) - |
6489 | reinterpret_cast<char*>(&save_function_)) + sizeof(restore_function_)); |
6490 | } |
6491 | |
6492 | SaveableObject::~SaveableObject() { |
6493 | // @@protoc_insertion_point(destructor:tensorflow.SaveableObject) |
6494 | SharedDtor(); |
6495 | } |
6496 | |
6497 | void SaveableObject::SharedDtor() { |
6498 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
6499 | } |
6500 | |
6501 | void SaveableObject::ArenaDtor(void* object) { |
6502 | SaveableObject* _this = reinterpret_cast< SaveableObject* >(object); |
6503 | (void)_this; |
6504 | } |
6505 | void SaveableObject::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
6506 | } |
6507 | void SaveableObject::SetCachedSize(int size) const { |
6508 | _cached_size_.Set(size); |
6509 | } |
6510 | const SaveableObject& SaveableObject::default_instance() { |
6511 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SaveableObject_tensorflow_2fcore_2fprotobuf_2fsaved_5fobject_5fgraph_2eproto.base); |
6512 | return *internal_default_instance(); |
6513 | } |
6514 | |
6515 | |
6516 | void SaveableObject::Clear() { |
6517 | // @@protoc_insertion_point(message_clear_start:tensorflow.SaveableObject) |
6518 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6519 | // Prevent compiler warnings about cached_has_bits being unused |
6520 | (void) cached_has_bits; |
6521 | |
6522 | ::memset(&save_function_, 0, static_cast<size_t>( |
6523 | reinterpret_cast<char*>(&restore_function_) - |
6524 | reinterpret_cast<char*>(&save_function_)) + sizeof(restore_function_)); |
6525 | _internal_metadata_.Clear(); |
6526 | } |
6527 | |
6528 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6529 | const char* SaveableObject::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
6530 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
6531 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
6532 | while (!ctx->Done(&ptr)) { |
6533 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
6534 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
6535 | CHK_(ptr); |
6536 | switch (tag >> 3) { |
6537 | // int32 save_function = 2; |
6538 | case 2: |
6539 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
6540 | save_function_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6541 | CHK_(ptr); |
6542 | } else goto handle_unusual; |
6543 | continue; |
6544 | // int32 restore_function = 3; |
6545 | case 3: |
6546 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
6547 | restore_function_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6548 | CHK_(ptr); |
6549 | } else goto handle_unusual; |
6550 | continue; |
6551 | default: { |
6552 | handle_unusual: |
6553 | if ((tag & 7) == 4 || tag == 0) { |
6554 | ctx->SetLastTag(tag); |
6555 | goto success; |
6556 | } |
6557 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
6558 | CHK_(ptr != nullptr); |
6559 | continue; |
6560 | } |
6561 | } // switch |
6562 | } // while |
6563 | success: |
6564 | return ptr; |
6565 | failure: |
6566 | ptr = nullptr; |
6567 | goto success; |
6568 | #undef CHK_ |
6569 | } |
6570 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6571 | bool SaveableObject::MergePartialFromCodedStream( |
6572 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
6573 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
6574 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
6575 | // @@protoc_insertion_point(parse_start:tensorflow.SaveableObject) |
6576 | for (;;) { |
6577 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
6578 | tag = p.first; |
6579 | if (!p.second) goto handle_unusual; |
6580 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
6581 | // int32 save_function = 2; |
6582 | case 2: { |
6583 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
6584 | |
6585 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6586 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
6587 | input, &save_function_))); |
6588 | } else { |
6589 | goto handle_unusual; |
6590 | } |
6591 | break; |
6592 | } |
6593 | |
6594 | // int32 restore_function = 3; |
6595 | case 3: { |
6596 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
6597 | |
6598 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6599 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
6600 | input, &restore_function_))); |
6601 | } else { |
6602 | goto handle_unusual; |
6603 | } |
6604 | break; |
6605 | } |
6606 | |
6607 | default: { |
6608 | handle_unusual: |
6609 | if (tag == 0) { |
6610 | goto success; |
6611 | } |
6612 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
6613 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
6614 | break; |
6615 | } |
6616 | } |
6617 | } |
6618 | success: |
6619 | // @@protoc_insertion_point(parse_success:tensorflow.SaveableObject) |
6620 | return true; |
6621 | failure: |
6622 | // @@protoc_insertion_point(parse_failure:tensorflow.SaveableObject) |
6623 | return false; |
6624 | #undef DO_ |
6625 | } |
6626 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6627 | |
6628 | void SaveableObject::SerializeWithCachedSizes( |
6629 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
6630 | // @@protoc_insertion_point(serialize_start:tensorflow.SaveableObject) |
6631 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6632 | (void) cached_has_bits; |
6633 | |
6634 | // int32 save_function = 2; |
6635 | if (this->save_function() != 0) { |
6636 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->save_function(), output); |
6637 | } |
6638 | |
6639 | // int32 restore_function = 3; |
6640 | if (this->restore_function() != 0) { |
6641 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->restore_function(), output); |
6642 | } |
6643 | |
6644 | if (_internal_metadata_.have_unknown_fields()) { |
6645 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
6646 | _internal_metadata_.unknown_fields(), output); |
6647 | } |
6648 | // @@protoc_insertion_point(serialize_end:tensorflow.SaveableObject) |
6649 | } |
6650 | |
6651 | ::PROTOBUF_NAMESPACE_ID::uint8* SaveableObject::InternalSerializeWithCachedSizesToArray( |
6652 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
6653 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SaveableObject) |
6654 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6655 | (void) cached_has_bits; |
6656 | |
6657 | // int32 save_function = 2; |
6658 | if (this->save_function() != 0) { |
6659 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->save_function(), target); |
6660 | } |
6661 | |
6662 | // int32 restore_function = 3; |
6663 | if (this->restore_function() != 0) { |
6664 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->restore_function(), target); |
6665 | } |
6666 | |
6667 | if (_internal_metadata_.have_unknown_fields()) { |
6668 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
6669 | _internal_metadata_.unknown_fields(), target); |
6670 | } |
6671 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SaveableObject) |
6672 | return target; |
6673 | } |
6674 | |
6675 | size_t SaveableObject::ByteSizeLong() const { |
6676 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SaveableObject) |
6677 | size_t total_size = 0; |
6678 | |
6679 | if (_internal_metadata_.have_unknown_fields()) { |
6680 | total_size += |
6681 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
6682 | _internal_metadata_.unknown_fields()); |
6683 | } |
6684 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6685 | // Prevent compiler warnings about cached_has_bits being unused |
6686 | (void) cached_has_bits; |
6687 | |
6688 | // int32 save_function = 2; |
6689 | if (this->save_function() != 0) { |
6690 | total_size += 1 + |
6691 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
6692 | this->save_function()); |
6693 | } |
6694 | |
6695 | // int32 restore_function = 3; |
6696 | if (this->restore_function() != 0) { |
6697 | total_size += 1 + |
6698 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
6699 | this->restore_function()); |
6700 | } |
6701 | |
6702 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
6703 | SetCachedSize(cached_size); |
6704 | return total_size; |
6705 | } |
6706 | |
6707 | void SaveableObject::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6708 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SaveableObject) |
6709 | GOOGLE_DCHECK_NE(&from, this); |
6710 | const SaveableObject* source = |
6711 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SaveableObject>( |
6712 | &from); |
6713 | if (source == nullptr) { |
6714 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SaveableObject) |
6715 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
6716 | } else { |
6717 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SaveableObject) |
6718 | MergeFrom(*source); |
6719 | } |
6720 | } |
6721 | |
6722 | void SaveableObject::MergeFrom(const SaveableObject& from) { |
6723 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SaveableObject) |
6724 | GOOGLE_DCHECK_NE(&from, this); |
6725 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
6726 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6727 | (void) cached_has_bits; |
6728 | |
6729 | if (from.save_function() != 0) { |
6730 | set_save_function(from.save_function()); |
6731 | } |
6732 | if (from.restore_function() != 0) { |
6733 | set_restore_function(from.restore_function()); |
6734 | } |
6735 | } |
6736 | |
6737 | void SaveableObject::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6738 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SaveableObject) |
6739 | if (&from == this) return; |
6740 | Clear(); |
6741 | MergeFrom(from); |
6742 | } |
6743 | |
6744 | void SaveableObject::CopyFrom(const SaveableObject& from) { |
6745 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SaveableObject) |
6746 | if (&from == this) return; |
6747 | Clear(); |
6748 | MergeFrom(from); |
6749 | } |
6750 | |
6751 | bool SaveableObject::IsInitialized() const { |
6752 | return true; |
6753 | } |
6754 | |
6755 | void SaveableObject::InternalSwap(SaveableObject* other) { |
6756 | using std::swap; |
6757 | _internal_metadata_.Swap(&other->_internal_metadata_); |
6758 | swap(save_function_, other->save_function_); |
6759 | swap(restore_function_, other->restore_function_); |
6760 | } |
6761 | |
6762 | ::PROTOBUF_NAMESPACE_ID::Metadata SaveableObject::GetMetadata() const { |
6763 | return GetMetadataStatic(); |
6764 | } |
6765 | |
6766 | |
6767 | // @@protoc_insertion_point(namespace_scope) |
6768 | } // namespace tensorflow |
6769 | PROTOBUF_NAMESPACE_OPEN |
6770 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse >(Arena* arena) { |
6771 | return Arena::CreateMessageInternal< ::tensorflow::SavedObjectGraph_ConcreteFunctionsEntry_DoNotUse >(arena); |
6772 | } |
6773 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedObjectGraph* Arena::CreateMaybeMessage< ::tensorflow::SavedObjectGraph >(Arena* arena) { |
6774 | return Arena::CreateMessageInternal< ::tensorflow::SavedObjectGraph >(arena); |
6775 | } |
6776 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse >(Arena* arena) { |
6777 | return Arena::CreateMessageInternal< ::tensorflow::SavedObject_SaveableObjectsEntry_DoNotUse >(arena); |
6778 | } |
6779 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedObject* Arena::CreateMaybeMessage< ::tensorflow::SavedObject >(Arena* arena) { |
6780 | return Arena::CreateMessageInternal< ::tensorflow::SavedObject >(arena); |
6781 | } |
6782 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedUserObject* Arena::CreateMaybeMessage< ::tensorflow::SavedUserObject >(Arena* arena) { |
6783 | return Arena::CreateMessageInternal< ::tensorflow::SavedUserObject >(arena); |
6784 | } |
6785 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedAsset* Arena::CreateMaybeMessage< ::tensorflow::SavedAsset >(Arena* arena) { |
6786 | return Arena::CreateMessageInternal< ::tensorflow::SavedAsset >(arena); |
6787 | } |
6788 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedFunction* Arena::CreateMaybeMessage< ::tensorflow::SavedFunction >(Arena* arena) { |
6789 | return Arena::CreateMessageInternal< ::tensorflow::SavedFunction >(arena); |
6790 | } |
6791 | template<> PROTOBUF_NOINLINE ::tensorflow::CapturedTensor* Arena::CreateMaybeMessage< ::tensorflow::CapturedTensor >(Arena* arena) { |
6792 | return Arena::CreateMessageInternal< ::tensorflow::CapturedTensor >(arena); |
6793 | } |
6794 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedConcreteFunction* Arena::CreateMaybeMessage< ::tensorflow::SavedConcreteFunction >(Arena* arena) { |
6795 | return Arena::CreateMessageInternal< ::tensorflow::SavedConcreteFunction >(arena); |
6796 | } |
6797 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedBareConcreteFunction* Arena::CreateMaybeMessage< ::tensorflow::SavedBareConcreteFunction >(Arena* arena) { |
6798 | return Arena::CreateMessageInternal< ::tensorflow::SavedBareConcreteFunction >(arena); |
6799 | } |
6800 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedConstant* Arena::CreateMaybeMessage< ::tensorflow::SavedConstant >(Arena* arena) { |
6801 | return Arena::CreateMessageInternal< ::tensorflow::SavedConstant >(arena); |
6802 | } |
6803 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedVariable* Arena::CreateMaybeMessage< ::tensorflow::SavedVariable >(Arena* arena) { |
6804 | return Arena::CreateMessageInternal< ::tensorflow::SavedVariable >(arena); |
6805 | } |
6806 | template<> PROTOBUF_NOINLINE ::tensorflow::FunctionSpec* Arena::CreateMaybeMessage< ::tensorflow::FunctionSpec >(Arena* arena) { |
6807 | return Arena::CreateMessageInternal< ::tensorflow::FunctionSpec >(arena); |
6808 | } |
6809 | template<> PROTOBUF_NOINLINE ::tensorflow::SavedResource* Arena::CreateMaybeMessage< ::tensorflow::SavedResource >(Arena* arena) { |
6810 | return Arena::CreateMessageInternal< ::tensorflow::SavedResource >(arena); |
6811 | } |
6812 | template<> PROTOBUF_NOINLINE ::tensorflow::SaveableObject* Arena::CreateMaybeMessage< ::tensorflow::SaveableObject >(Arena* arena) { |
6813 | return Arena::CreateMessageInternal< ::tensorflow::SaveableObject >(arena); |
6814 | } |
6815 | PROTOBUF_NAMESPACE_CLOSE |
6816 | |
6817 | // @@protoc_insertion_point(global_scope) |
6818 | #include <google/protobuf/port_undef.inc> |
6819 | |