1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: tensorflow/core/protobuf/meta_graph.proto
3
4 #include "tensorflow/core/protobuf/meta_graph.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
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/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15
16 PROTOBUF_PRAGMA_INIT_SEG
17
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20
21 namespace tensorflow {
MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse(::_pbi::ConstantInitialized)22 PROTOBUF_CONSTEXPR MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse(
23 ::_pbi::ConstantInitialized) {}
24 struct MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternal {
MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternaltensorflow::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternal25 PROTOBUF_CONSTEXPR MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternal()
26 : _instance(::_pbi::ConstantInitialized{}) {}
~MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternaltensorflow::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternal27 ~MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternal() {}
28 union { // NOLINT(misc-non-private-member-variables-in-classes)
29 MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse _instance;
30 };
31 };
32 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUseDefaultTypeInternal _MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse_default_instance_;
MetaGraphDef_MetaInfoDef(::_pbi::ConstantInitialized)33 PROTOBUF_CONSTEXPR MetaGraphDef_MetaInfoDef::MetaGraphDef_MetaInfoDef(
34 ::_pbi::ConstantInitialized): _impl_{
35 /*decltype(_impl_.tags_)*/{}
36 , /*decltype(_impl_.function_aliases_)*/{}
37 , /*decltype(_impl_.meta_graph_version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
38 , /*decltype(_impl_.tensorflow_version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
39 , /*decltype(_impl_.tensorflow_git_version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
40 , /*decltype(_impl_.stripped_op_list_)*/nullptr
41 , /*decltype(_impl_.any_info_)*/nullptr
42 , /*decltype(_impl_.stripped_default_attrs_)*/false
43 , /*decltype(_impl_._cached_size_)*/{}} {}
44 struct MetaGraphDef_MetaInfoDefDefaultTypeInternal {
MetaGraphDef_MetaInfoDefDefaultTypeInternaltensorflow::MetaGraphDef_MetaInfoDefDefaultTypeInternal45 PROTOBUF_CONSTEXPR MetaGraphDef_MetaInfoDefDefaultTypeInternal()
46 : _instance(::_pbi::ConstantInitialized{}) {}
~MetaGraphDef_MetaInfoDefDefaultTypeInternaltensorflow::MetaGraphDef_MetaInfoDefDefaultTypeInternal47 ~MetaGraphDef_MetaInfoDefDefaultTypeInternal() {}
48 union { // NOLINT(misc-non-private-member-variables-in-classes)
49 MetaGraphDef_MetaInfoDef _instance;
50 };
51 };
52 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetaGraphDef_MetaInfoDefDefaultTypeInternal _MetaGraphDef_MetaInfoDef_default_instance_;
MetaGraphDef_CollectionDefEntry_DoNotUse(::_pbi::ConstantInitialized)53 PROTOBUF_CONSTEXPR MetaGraphDef_CollectionDefEntry_DoNotUse::MetaGraphDef_CollectionDefEntry_DoNotUse(
54 ::_pbi::ConstantInitialized) {}
55 struct MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternal {
MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternaltensorflow::MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternal56 PROTOBUF_CONSTEXPR MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternal()
57 : _instance(::_pbi::ConstantInitialized{}) {}
~MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternaltensorflow::MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternal58 ~MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternal() {}
59 union { // NOLINT(misc-non-private-member-variables-in-classes)
60 MetaGraphDef_CollectionDefEntry_DoNotUse _instance;
61 };
62 };
63 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetaGraphDef_CollectionDefEntry_DoNotUseDefaultTypeInternal _MetaGraphDef_CollectionDefEntry_DoNotUse_default_instance_;
MetaGraphDef_SignatureDefEntry_DoNotUse(::_pbi::ConstantInitialized)64 PROTOBUF_CONSTEXPR MetaGraphDef_SignatureDefEntry_DoNotUse::MetaGraphDef_SignatureDefEntry_DoNotUse(
65 ::_pbi::ConstantInitialized) {}
66 struct MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternal {
MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternaltensorflow::MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternal67 PROTOBUF_CONSTEXPR MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternal()
68 : _instance(::_pbi::ConstantInitialized{}) {}
~MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternaltensorflow::MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternal69 ~MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternal() {}
70 union { // NOLINT(misc-non-private-member-variables-in-classes)
71 MetaGraphDef_SignatureDefEntry_DoNotUse _instance;
72 };
73 };
74 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetaGraphDef_SignatureDefEntry_DoNotUseDefaultTypeInternal _MetaGraphDef_SignatureDefEntry_DoNotUse_default_instance_;
MetaGraphDef(::_pbi::ConstantInitialized)75 PROTOBUF_CONSTEXPR MetaGraphDef::MetaGraphDef(
76 ::_pbi::ConstantInitialized): _impl_{
77 /*decltype(_impl_.collection_def_)*/{}
78 , /*decltype(_impl_.signature_def_)*/{}
79 , /*decltype(_impl_.asset_file_def_)*/{}
80 , /*decltype(_impl_.meta_info_def_)*/nullptr
81 , /*decltype(_impl_.graph_def_)*/nullptr
82 , /*decltype(_impl_.saver_def_)*/nullptr
83 , /*decltype(_impl_.object_graph_def_)*/nullptr
84 , /*decltype(_impl_._cached_size_)*/{}} {}
85 struct MetaGraphDefDefaultTypeInternal {
MetaGraphDefDefaultTypeInternaltensorflow::MetaGraphDefDefaultTypeInternal86 PROTOBUF_CONSTEXPR MetaGraphDefDefaultTypeInternal()
87 : _instance(::_pbi::ConstantInitialized{}) {}
~MetaGraphDefDefaultTypeInternaltensorflow::MetaGraphDefDefaultTypeInternal88 ~MetaGraphDefDefaultTypeInternal() {}
89 union { // NOLINT(misc-non-private-member-variables-in-classes)
90 MetaGraphDef _instance;
91 };
92 };
93 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetaGraphDefDefaultTypeInternal _MetaGraphDef_default_instance_;
CollectionDef_NodeList(::_pbi::ConstantInitialized)94 PROTOBUF_CONSTEXPR CollectionDef_NodeList::CollectionDef_NodeList(
95 ::_pbi::ConstantInitialized): _impl_{
96 /*decltype(_impl_.value_)*/{}
97 , /*decltype(_impl_._cached_size_)*/{}} {}
98 struct CollectionDef_NodeListDefaultTypeInternal {
CollectionDef_NodeListDefaultTypeInternaltensorflow::CollectionDef_NodeListDefaultTypeInternal99 PROTOBUF_CONSTEXPR CollectionDef_NodeListDefaultTypeInternal()
100 : _instance(::_pbi::ConstantInitialized{}) {}
~CollectionDef_NodeListDefaultTypeInternaltensorflow::CollectionDef_NodeListDefaultTypeInternal101 ~CollectionDef_NodeListDefaultTypeInternal() {}
102 union { // NOLINT(misc-non-private-member-variables-in-classes)
103 CollectionDef_NodeList _instance;
104 };
105 };
106 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CollectionDef_NodeListDefaultTypeInternal _CollectionDef_NodeList_default_instance_;
CollectionDef_BytesList(::_pbi::ConstantInitialized)107 PROTOBUF_CONSTEXPR CollectionDef_BytesList::CollectionDef_BytesList(
108 ::_pbi::ConstantInitialized): _impl_{
109 /*decltype(_impl_.value_)*/{}
110 , /*decltype(_impl_._cached_size_)*/{}} {}
111 struct CollectionDef_BytesListDefaultTypeInternal {
CollectionDef_BytesListDefaultTypeInternaltensorflow::CollectionDef_BytesListDefaultTypeInternal112 PROTOBUF_CONSTEXPR CollectionDef_BytesListDefaultTypeInternal()
113 : _instance(::_pbi::ConstantInitialized{}) {}
~CollectionDef_BytesListDefaultTypeInternaltensorflow::CollectionDef_BytesListDefaultTypeInternal114 ~CollectionDef_BytesListDefaultTypeInternal() {}
115 union { // NOLINT(misc-non-private-member-variables-in-classes)
116 CollectionDef_BytesList _instance;
117 };
118 };
119 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CollectionDef_BytesListDefaultTypeInternal _CollectionDef_BytesList_default_instance_;
CollectionDef_Int64List(::_pbi::ConstantInitialized)120 PROTOBUF_CONSTEXPR CollectionDef_Int64List::CollectionDef_Int64List(
121 ::_pbi::ConstantInitialized): _impl_{
122 /*decltype(_impl_.value_)*/{}
123 , /*decltype(_impl_._value_cached_byte_size_)*/{0}
124 , /*decltype(_impl_._cached_size_)*/{}} {}
125 struct CollectionDef_Int64ListDefaultTypeInternal {
CollectionDef_Int64ListDefaultTypeInternaltensorflow::CollectionDef_Int64ListDefaultTypeInternal126 PROTOBUF_CONSTEXPR CollectionDef_Int64ListDefaultTypeInternal()
127 : _instance(::_pbi::ConstantInitialized{}) {}
~CollectionDef_Int64ListDefaultTypeInternaltensorflow::CollectionDef_Int64ListDefaultTypeInternal128 ~CollectionDef_Int64ListDefaultTypeInternal() {}
129 union { // NOLINT(misc-non-private-member-variables-in-classes)
130 CollectionDef_Int64List _instance;
131 };
132 };
133 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CollectionDef_Int64ListDefaultTypeInternal _CollectionDef_Int64List_default_instance_;
CollectionDef_FloatList(::_pbi::ConstantInitialized)134 PROTOBUF_CONSTEXPR CollectionDef_FloatList::CollectionDef_FloatList(
135 ::_pbi::ConstantInitialized): _impl_{
136 /*decltype(_impl_.value_)*/{}
137 , /*decltype(_impl_._cached_size_)*/{}} {}
138 struct CollectionDef_FloatListDefaultTypeInternal {
CollectionDef_FloatListDefaultTypeInternaltensorflow::CollectionDef_FloatListDefaultTypeInternal139 PROTOBUF_CONSTEXPR CollectionDef_FloatListDefaultTypeInternal()
140 : _instance(::_pbi::ConstantInitialized{}) {}
~CollectionDef_FloatListDefaultTypeInternaltensorflow::CollectionDef_FloatListDefaultTypeInternal141 ~CollectionDef_FloatListDefaultTypeInternal() {}
142 union { // NOLINT(misc-non-private-member-variables-in-classes)
143 CollectionDef_FloatList _instance;
144 };
145 };
146 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CollectionDef_FloatListDefaultTypeInternal _CollectionDef_FloatList_default_instance_;
CollectionDef_AnyList(::_pbi::ConstantInitialized)147 PROTOBUF_CONSTEXPR CollectionDef_AnyList::CollectionDef_AnyList(
148 ::_pbi::ConstantInitialized): _impl_{
149 /*decltype(_impl_.value_)*/{}
150 , /*decltype(_impl_._cached_size_)*/{}} {}
151 struct CollectionDef_AnyListDefaultTypeInternal {
CollectionDef_AnyListDefaultTypeInternaltensorflow::CollectionDef_AnyListDefaultTypeInternal152 PROTOBUF_CONSTEXPR CollectionDef_AnyListDefaultTypeInternal()
153 : _instance(::_pbi::ConstantInitialized{}) {}
~CollectionDef_AnyListDefaultTypeInternaltensorflow::CollectionDef_AnyListDefaultTypeInternal154 ~CollectionDef_AnyListDefaultTypeInternal() {}
155 union { // NOLINT(misc-non-private-member-variables-in-classes)
156 CollectionDef_AnyList _instance;
157 };
158 };
159 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CollectionDef_AnyListDefaultTypeInternal _CollectionDef_AnyList_default_instance_;
CollectionDef(::_pbi::ConstantInitialized)160 PROTOBUF_CONSTEXPR CollectionDef::CollectionDef(
161 ::_pbi::ConstantInitialized): _impl_{
162 /*decltype(_impl_.kind_)*/{}
163 , /*decltype(_impl_._cached_size_)*/{}
164 , /*decltype(_impl_._oneof_case_)*/{}} {}
165 struct CollectionDefDefaultTypeInternal {
CollectionDefDefaultTypeInternaltensorflow::CollectionDefDefaultTypeInternal166 PROTOBUF_CONSTEXPR CollectionDefDefaultTypeInternal()
167 : _instance(::_pbi::ConstantInitialized{}) {}
~CollectionDefDefaultTypeInternaltensorflow::CollectionDefDefaultTypeInternal168 ~CollectionDefDefaultTypeInternal() {}
169 union { // NOLINT(misc-non-private-member-variables-in-classes)
170 CollectionDef _instance;
171 };
172 };
173 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CollectionDefDefaultTypeInternal _CollectionDef_default_instance_;
TensorInfo_CooSparse(::_pbi::ConstantInitialized)174 PROTOBUF_CONSTEXPR TensorInfo_CooSparse::TensorInfo_CooSparse(
175 ::_pbi::ConstantInitialized): _impl_{
176 /*decltype(_impl_.values_tensor_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
177 , /*decltype(_impl_.indices_tensor_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
178 , /*decltype(_impl_.dense_shape_tensor_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
179 , /*decltype(_impl_._cached_size_)*/{}} {}
180 struct TensorInfo_CooSparseDefaultTypeInternal {
TensorInfo_CooSparseDefaultTypeInternaltensorflow::TensorInfo_CooSparseDefaultTypeInternal181 PROTOBUF_CONSTEXPR TensorInfo_CooSparseDefaultTypeInternal()
182 : _instance(::_pbi::ConstantInitialized{}) {}
~TensorInfo_CooSparseDefaultTypeInternaltensorflow::TensorInfo_CooSparseDefaultTypeInternal183 ~TensorInfo_CooSparseDefaultTypeInternal() {}
184 union { // NOLINT(misc-non-private-member-variables-in-classes)
185 TensorInfo_CooSparse _instance;
186 };
187 };
188 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorInfo_CooSparseDefaultTypeInternal _TensorInfo_CooSparse_default_instance_;
TensorInfo_CompositeTensor(::_pbi::ConstantInitialized)189 PROTOBUF_CONSTEXPR TensorInfo_CompositeTensor::TensorInfo_CompositeTensor(
190 ::_pbi::ConstantInitialized): _impl_{
191 /*decltype(_impl_.components_)*/{}
192 , /*decltype(_impl_.type_spec_)*/nullptr
193 , /*decltype(_impl_._cached_size_)*/{}} {}
194 struct TensorInfo_CompositeTensorDefaultTypeInternal {
TensorInfo_CompositeTensorDefaultTypeInternaltensorflow::TensorInfo_CompositeTensorDefaultTypeInternal195 PROTOBUF_CONSTEXPR TensorInfo_CompositeTensorDefaultTypeInternal()
196 : _instance(::_pbi::ConstantInitialized{}) {}
~TensorInfo_CompositeTensorDefaultTypeInternaltensorflow::TensorInfo_CompositeTensorDefaultTypeInternal197 ~TensorInfo_CompositeTensorDefaultTypeInternal() {}
198 union { // NOLINT(misc-non-private-member-variables-in-classes)
199 TensorInfo_CompositeTensor _instance;
200 };
201 };
202 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorInfo_CompositeTensorDefaultTypeInternal _TensorInfo_CompositeTensor_default_instance_;
TensorInfo(::_pbi::ConstantInitialized)203 PROTOBUF_CONSTEXPR TensorInfo::TensorInfo(
204 ::_pbi::ConstantInitialized): _impl_{
205 /*decltype(_impl_.tensor_shape_)*/nullptr
206 , /*decltype(_impl_.dtype_)*/0
207 , /*decltype(_impl_.encoding_)*/{}
208 , /*decltype(_impl_._cached_size_)*/{}
209 , /*decltype(_impl_._oneof_case_)*/{}} {}
210 struct TensorInfoDefaultTypeInternal {
TensorInfoDefaultTypeInternaltensorflow::TensorInfoDefaultTypeInternal211 PROTOBUF_CONSTEXPR TensorInfoDefaultTypeInternal()
212 : _instance(::_pbi::ConstantInitialized{}) {}
~TensorInfoDefaultTypeInternaltensorflow::TensorInfoDefaultTypeInternal213 ~TensorInfoDefaultTypeInternal() {}
214 union { // NOLINT(misc-non-private-member-variables-in-classes)
215 TensorInfo _instance;
216 };
217 };
218 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorInfoDefaultTypeInternal _TensorInfo_default_instance_;
SignatureDef_InputsEntry_DoNotUse(::_pbi::ConstantInitialized)219 PROTOBUF_CONSTEXPR SignatureDef_InputsEntry_DoNotUse::SignatureDef_InputsEntry_DoNotUse(
220 ::_pbi::ConstantInitialized) {}
221 struct SignatureDef_InputsEntry_DoNotUseDefaultTypeInternal {
SignatureDef_InputsEntry_DoNotUseDefaultTypeInternaltensorflow::SignatureDef_InputsEntry_DoNotUseDefaultTypeInternal222 PROTOBUF_CONSTEXPR SignatureDef_InputsEntry_DoNotUseDefaultTypeInternal()
223 : _instance(::_pbi::ConstantInitialized{}) {}
~SignatureDef_InputsEntry_DoNotUseDefaultTypeInternaltensorflow::SignatureDef_InputsEntry_DoNotUseDefaultTypeInternal224 ~SignatureDef_InputsEntry_DoNotUseDefaultTypeInternal() {}
225 union { // NOLINT(misc-non-private-member-variables-in-classes)
226 SignatureDef_InputsEntry_DoNotUse _instance;
227 };
228 };
229 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SignatureDef_InputsEntry_DoNotUseDefaultTypeInternal _SignatureDef_InputsEntry_DoNotUse_default_instance_;
SignatureDef_OutputsEntry_DoNotUse(::_pbi::ConstantInitialized)230 PROTOBUF_CONSTEXPR SignatureDef_OutputsEntry_DoNotUse::SignatureDef_OutputsEntry_DoNotUse(
231 ::_pbi::ConstantInitialized) {}
232 struct SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternal {
SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternaltensorflow::SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternal233 PROTOBUF_CONSTEXPR SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternal()
234 : _instance(::_pbi::ConstantInitialized{}) {}
~SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternaltensorflow::SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternal235 ~SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternal() {}
236 union { // NOLINT(misc-non-private-member-variables-in-classes)
237 SignatureDef_OutputsEntry_DoNotUse _instance;
238 };
239 };
240 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SignatureDef_OutputsEntry_DoNotUseDefaultTypeInternal _SignatureDef_OutputsEntry_DoNotUse_default_instance_;
SignatureDef(::_pbi::ConstantInitialized)241 PROTOBUF_CONSTEXPR SignatureDef::SignatureDef(
242 ::_pbi::ConstantInitialized): _impl_{
243 /*decltype(_impl_.inputs_)*/{}
244 , /*decltype(_impl_.outputs_)*/{}
245 , /*decltype(_impl_.method_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
246 , /*decltype(_impl_._cached_size_)*/{}} {}
247 struct SignatureDefDefaultTypeInternal {
SignatureDefDefaultTypeInternaltensorflow::SignatureDefDefaultTypeInternal248 PROTOBUF_CONSTEXPR SignatureDefDefaultTypeInternal()
249 : _instance(::_pbi::ConstantInitialized{}) {}
~SignatureDefDefaultTypeInternaltensorflow::SignatureDefDefaultTypeInternal250 ~SignatureDefDefaultTypeInternal() {}
251 union { // NOLINT(misc-non-private-member-variables-in-classes)
252 SignatureDef _instance;
253 };
254 };
255 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SignatureDefDefaultTypeInternal _SignatureDef_default_instance_;
AssetFileDef(::_pbi::ConstantInitialized)256 PROTOBUF_CONSTEXPR AssetFileDef::AssetFileDef(
257 ::_pbi::ConstantInitialized): _impl_{
258 /*decltype(_impl_.filename_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
259 , /*decltype(_impl_.tensor_info_)*/nullptr
260 , /*decltype(_impl_._cached_size_)*/{}} {}
261 struct AssetFileDefDefaultTypeInternal {
AssetFileDefDefaultTypeInternaltensorflow::AssetFileDefDefaultTypeInternal262 PROTOBUF_CONSTEXPR AssetFileDefDefaultTypeInternal()
263 : _instance(::_pbi::ConstantInitialized{}) {}
~AssetFileDefDefaultTypeInternaltensorflow::AssetFileDefDefaultTypeInternal264 ~AssetFileDefDefaultTypeInternal() {}
265 union { // NOLINT(misc-non-private-member-variables-in-classes)
266 AssetFileDef _instance;
267 };
268 };
269 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AssetFileDefDefaultTypeInternal _AssetFileDef_default_instance_;
270 } // namespace tensorflow
271 namespace tensorflow {
272
273 // ===================================================================
274
MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse()275 MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse() {}
MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)276 MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
277 : SuperType(arena) {}
MergeFrom(const MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse & other)278 void MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse::MergeFrom(const MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse& other) {
279 MergeFromInternal(other);
280 }
281
282 // ===================================================================
283
284 class MetaGraphDef_MetaInfoDef::_Internal {
285 public:
286 static const ::tensorflow::OpList& stripped_op_list(const MetaGraphDef_MetaInfoDef* msg);
287 static const ::PROTOBUF_NAMESPACE_ID::Any& any_info(const MetaGraphDef_MetaInfoDef* msg);
288 };
289
290 const ::tensorflow::OpList&
stripped_op_list(const MetaGraphDef_MetaInfoDef * msg)291 MetaGraphDef_MetaInfoDef::_Internal::stripped_op_list(const MetaGraphDef_MetaInfoDef* msg) {
292 return *msg->_impl_.stripped_op_list_;
293 }
294 const ::PROTOBUF_NAMESPACE_ID::Any&
any_info(const MetaGraphDef_MetaInfoDef * msg)295 MetaGraphDef_MetaInfoDef::_Internal::any_info(const MetaGraphDef_MetaInfoDef* msg) {
296 return *msg->_impl_.any_info_;
297 }
clear_stripped_op_list()298 void MetaGraphDef_MetaInfoDef::clear_stripped_op_list() {
299 if (GetArenaForAllocation() == nullptr && _impl_.stripped_op_list_ != nullptr) {
300 delete _impl_.stripped_op_list_;
301 }
302 _impl_.stripped_op_list_ = nullptr;
303 }
clear_any_info()304 void MetaGraphDef_MetaInfoDef::clear_any_info() {
305 if (GetArenaForAllocation() == nullptr && _impl_.any_info_ != nullptr) {
306 delete _impl_.any_info_;
307 }
308 _impl_.any_info_ = nullptr;
309 }
MetaGraphDef_MetaInfoDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)310 MetaGraphDef_MetaInfoDef::MetaGraphDef_MetaInfoDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
311 bool is_message_owned)
312 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
313 SharedCtor(arena, is_message_owned);
314 // @@protoc_insertion_point(arena_constructor:tensorflow.MetaGraphDef.MetaInfoDef)
315 }
MetaGraphDef_MetaInfoDef(const MetaGraphDef_MetaInfoDef & from)316 MetaGraphDef_MetaInfoDef::MetaGraphDef_MetaInfoDef(const MetaGraphDef_MetaInfoDef& from)
317 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
318 MetaGraphDef_MetaInfoDef* const _this = this; (void)_this;
319 new (&_impl_) Impl_{
320 decltype(_impl_.tags_){from._impl_.tags_}
321 , /*decltype(_impl_.function_aliases_)*/{}
322 , decltype(_impl_.meta_graph_version_){}
323 , decltype(_impl_.tensorflow_version_){}
324 , decltype(_impl_.tensorflow_git_version_){}
325 , decltype(_impl_.stripped_op_list_){nullptr}
326 , decltype(_impl_.any_info_){nullptr}
327 , decltype(_impl_.stripped_default_attrs_){}
328 , /*decltype(_impl_._cached_size_)*/{}};
329
330 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
331 _this->_impl_.function_aliases_.MergeFrom(from._impl_.function_aliases_);
332 _impl_.meta_graph_version_.InitDefault();
333 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
334 _impl_.meta_graph_version_.Set("", GetArenaForAllocation());
335 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
336 if (!from._internal_meta_graph_version().empty()) {
337 _this->_impl_.meta_graph_version_.Set(from._internal_meta_graph_version(),
338 _this->GetArenaForAllocation());
339 }
340 _impl_.tensorflow_version_.InitDefault();
341 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
342 _impl_.tensorflow_version_.Set("", GetArenaForAllocation());
343 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
344 if (!from._internal_tensorflow_version().empty()) {
345 _this->_impl_.tensorflow_version_.Set(from._internal_tensorflow_version(),
346 _this->GetArenaForAllocation());
347 }
348 _impl_.tensorflow_git_version_.InitDefault();
349 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
350 _impl_.tensorflow_git_version_.Set("", GetArenaForAllocation());
351 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
352 if (!from._internal_tensorflow_git_version().empty()) {
353 _this->_impl_.tensorflow_git_version_.Set(from._internal_tensorflow_git_version(),
354 _this->GetArenaForAllocation());
355 }
356 if (from._internal_has_stripped_op_list()) {
357 _this->_impl_.stripped_op_list_ = new ::tensorflow::OpList(*from._impl_.stripped_op_list_);
358 }
359 if (from._internal_has_any_info()) {
360 _this->_impl_.any_info_ = new ::PROTOBUF_NAMESPACE_ID::Any(*from._impl_.any_info_);
361 }
362 _this->_impl_.stripped_default_attrs_ = from._impl_.stripped_default_attrs_;
363 // @@protoc_insertion_point(copy_constructor:tensorflow.MetaGraphDef.MetaInfoDef)
364 }
365
SharedCtor(::_pb::Arena * arena,bool is_message_owned)366 inline void MetaGraphDef_MetaInfoDef::SharedCtor(
367 ::_pb::Arena* arena, bool is_message_owned) {
368 (void)arena;
369 (void)is_message_owned;
370 new (&_impl_) Impl_{
371 decltype(_impl_.tags_){arena}
372 , /*decltype(_impl_.function_aliases_)*/{::_pbi::ArenaInitialized(), arena}
373 , decltype(_impl_.meta_graph_version_){}
374 , decltype(_impl_.tensorflow_version_){}
375 , decltype(_impl_.tensorflow_git_version_){}
376 , decltype(_impl_.stripped_op_list_){nullptr}
377 , decltype(_impl_.any_info_){nullptr}
378 , decltype(_impl_.stripped_default_attrs_){false}
379 , /*decltype(_impl_._cached_size_)*/{}
380 };
381 _impl_.meta_graph_version_.InitDefault();
382 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
383 _impl_.meta_graph_version_.Set("", GetArenaForAllocation());
384 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
385 _impl_.tensorflow_version_.InitDefault();
386 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
387 _impl_.tensorflow_version_.Set("", GetArenaForAllocation());
388 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
389 _impl_.tensorflow_git_version_.InitDefault();
390 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
391 _impl_.tensorflow_git_version_.Set("", GetArenaForAllocation());
392 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
393 }
394
~MetaGraphDef_MetaInfoDef()395 MetaGraphDef_MetaInfoDef::~MetaGraphDef_MetaInfoDef() {
396 // @@protoc_insertion_point(destructor:tensorflow.MetaGraphDef.MetaInfoDef)
397 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
398 (void)arena;
399 return;
400 }
401 SharedDtor();
402 }
403
SharedDtor()404 inline void MetaGraphDef_MetaInfoDef::SharedDtor() {
405 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
406 _impl_.tags_.~RepeatedPtrField();
407 _impl_.function_aliases_.Destruct();
408 _impl_.function_aliases_.~MapFieldLite();
409 _impl_.meta_graph_version_.Destroy();
410 _impl_.tensorflow_version_.Destroy();
411 _impl_.tensorflow_git_version_.Destroy();
412 if (this != internal_default_instance()) delete _impl_.stripped_op_list_;
413 if (this != internal_default_instance()) delete _impl_.any_info_;
414 }
415
SetCachedSize(int size) const416 void MetaGraphDef_MetaInfoDef::SetCachedSize(int size) const {
417 _impl_._cached_size_.Set(size);
418 }
419
Clear()420 void MetaGraphDef_MetaInfoDef::Clear() {
421 // @@protoc_insertion_point(message_clear_start:tensorflow.MetaGraphDef.MetaInfoDef)
422 ::uint32_t cached_has_bits = 0;
423 // Prevent compiler warnings about cached_has_bits being unused
424 (void) cached_has_bits;
425
426 _impl_.tags_.Clear();
427 _impl_.function_aliases_.Clear();
428 _impl_.meta_graph_version_.ClearToEmpty();
429 _impl_.tensorflow_version_.ClearToEmpty();
430 _impl_.tensorflow_git_version_.ClearToEmpty();
431 if (GetArenaForAllocation() == nullptr && _impl_.stripped_op_list_ != nullptr) {
432 delete _impl_.stripped_op_list_;
433 }
434 _impl_.stripped_op_list_ = nullptr;
435 if (GetArenaForAllocation() == nullptr && _impl_.any_info_ != nullptr) {
436 delete _impl_.any_info_;
437 }
438 _impl_.any_info_ = nullptr;
439 _impl_.stripped_default_attrs_ = false;
440 _internal_metadata_.Clear<std::string>();
441 }
442
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)443 const char* MetaGraphDef_MetaInfoDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
444 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
445 while (!ctx->Done(&ptr)) {
446 ::uint32_t tag;
447 ptr = ::_pbi::ReadTag(ptr, &tag);
448 switch (tag >> 3) {
449 // string meta_graph_version = 1;
450 case 1:
451 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
452 auto str = _internal_mutable_meta_graph_version();
453 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
454 CHK_(ptr);
455 CHK_(::_pbi::VerifyUTF8(str, nullptr));
456 } else {
457 goto handle_unusual;
458 }
459 continue;
460 // .tensorflow.OpList stripped_op_list = 2;
461 case 2:
462 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
463 ptr = ctx->ParseMessage(_internal_mutable_stripped_op_list(), ptr);
464 CHK_(ptr);
465 } else {
466 goto handle_unusual;
467 }
468 continue;
469 // .google.protobuf.Any any_info = 3;
470 case 3:
471 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
472 ptr = ctx->ParseMessage(_internal_mutable_any_info(), ptr);
473 CHK_(ptr);
474 } else {
475 goto handle_unusual;
476 }
477 continue;
478 // repeated string tags = 4;
479 case 4:
480 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
481 ptr -= 1;
482 do {
483 ptr += 1;
484 auto str = _internal_add_tags();
485 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
486 CHK_(ptr);
487 CHK_(::_pbi::VerifyUTF8(str, nullptr));
488 if (!ctx->DataAvailable(ptr)) break;
489 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
490 } else {
491 goto handle_unusual;
492 }
493 continue;
494 // string tensorflow_version = 5;
495 case 5:
496 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
497 auto str = _internal_mutable_tensorflow_version();
498 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
499 CHK_(ptr);
500 CHK_(::_pbi::VerifyUTF8(str, nullptr));
501 } else {
502 goto handle_unusual;
503 }
504 continue;
505 // string tensorflow_git_version = 6;
506 case 6:
507 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
508 auto str = _internal_mutable_tensorflow_git_version();
509 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
510 CHK_(ptr);
511 CHK_(::_pbi::VerifyUTF8(str, nullptr));
512 } else {
513 goto handle_unusual;
514 }
515 continue;
516 // bool stripped_default_attrs = 7;
517 case 7:
518 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
519 _impl_.stripped_default_attrs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
520 CHK_(ptr);
521 } else {
522 goto handle_unusual;
523 }
524 continue;
525 // map<string, string> function_aliases = 8;
526 case 8:
527 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
528 ptr -= 1;
529 do {
530 ptr += 1;
531 ptr = ctx->ParseMessage(&_impl_.function_aliases_, ptr);
532 CHK_(ptr);
533 if (!ctx->DataAvailable(ptr)) break;
534 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
535 } else {
536 goto handle_unusual;
537 }
538 continue;
539 default:
540 goto handle_unusual;
541 } // switch
542 handle_unusual:
543 if ((tag == 0) || ((tag & 7) == 4)) {
544 CHK_(ptr);
545 ctx->SetLastTag(tag);
546 goto message_done;
547 }
548 ptr = UnknownFieldParse(
549 tag,
550 _internal_metadata_.mutable_unknown_fields<std::string>(),
551 ptr, ctx);
552 CHK_(ptr != nullptr);
553 } // while
554 message_done:
555 return ptr;
556 failure:
557 ptr = nullptr;
558 goto message_done;
559 #undef CHK_
560 }
561
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const562 ::uint8_t* MetaGraphDef_MetaInfoDef::_InternalSerialize(
563 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
564 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MetaGraphDef.MetaInfoDef)
565 ::uint32_t cached_has_bits = 0;
566 (void) cached_has_bits;
567
568 // string meta_graph_version = 1;
569 if (!this->_internal_meta_graph_version().empty()) {
570 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
571 this->_internal_meta_graph_version().data(), static_cast<int>(this->_internal_meta_graph_version().length()),
572 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
573 "tensorflow.MetaGraphDef.MetaInfoDef.meta_graph_version");
574 target = stream->WriteStringMaybeAliased(
575 1, this->_internal_meta_graph_version(), target);
576 }
577
578 // .tensorflow.OpList stripped_op_list = 2;
579 if (this->_internal_has_stripped_op_list()) {
580 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
581 InternalWriteMessage(2, _Internal::stripped_op_list(this),
582 _Internal::stripped_op_list(this).GetCachedSize(), target, stream);
583 }
584
585 // .google.protobuf.Any any_info = 3;
586 if (this->_internal_has_any_info()) {
587 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
588 InternalWriteMessage(3, _Internal::any_info(this),
589 _Internal::any_info(this).GetCachedSize(), target, stream);
590 }
591
592 // repeated string tags = 4;
593 for (int i = 0, n = this->_internal_tags_size(); i < n; i++) {
594 const auto& s = this->_internal_tags(i);
595 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
596 s.data(), static_cast<int>(s.length()),
597 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
598 "tensorflow.MetaGraphDef.MetaInfoDef.tags");
599 target = stream->WriteString(4, s, target);
600 }
601
602 // string tensorflow_version = 5;
603 if (!this->_internal_tensorflow_version().empty()) {
604 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
605 this->_internal_tensorflow_version().data(), static_cast<int>(this->_internal_tensorflow_version().length()),
606 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
607 "tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_version");
608 target = stream->WriteStringMaybeAliased(
609 5, this->_internal_tensorflow_version(), target);
610 }
611
612 // string tensorflow_git_version = 6;
613 if (!this->_internal_tensorflow_git_version().empty()) {
614 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
615 this->_internal_tensorflow_git_version().data(), static_cast<int>(this->_internal_tensorflow_git_version().length()),
616 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
617 "tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_git_version");
618 target = stream->WriteStringMaybeAliased(
619 6, this->_internal_tensorflow_git_version(), target);
620 }
621
622 // bool stripped_default_attrs = 7;
623 if (this->_internal_stripped_default_attrs() != 0) {
624 target = stream->EnsureSpace(target);
625 target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_stripped_default_attrs(), target);
626 }
627
628 // map<string, string> function_aliases = 8;
629 if (!this->_internal_function_aliases().empty()) {
630 using MapType = ::_pb::Map<std::string, std::string>;
631 using WireHelper = MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse::Funcs;
632 const auto& map_field = this->_internal_function_aliases();
633 auto check_utf8 = [](const MapType::value_type& entry) {
634 (void)entry;
635 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
636 entry.first.data(), static_cast<int>(entry.first.length()),
637 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
638 "tensorflow.MetaGraphDef.MetaInfoDef.FunctionAliasesEntry.key");
639 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
640 entry.second.data(), static_cast<int>(entry.second.length()),
641 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
642 "tensorflow.MetaGraphDef.MetaInfoDef.FunctionAliasesEntry.value");
643 };
644
645 if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
646 for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
647 target = WireHelper::InternalSerialize(8, entry.first, entry.second, target, stream);
648 check_utf8(entry);
649 }
650 } else {
651 for (const auto& entry : map_field) {
652 target = WireHelper::InternalSerialize(8, entry.first, entry.second, target, stream);
653 check_utf8(entry);
654 }
655 }
656 }
657
658 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
659 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
660 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
661 }
662 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MetaGraphDef.MetaInfoDef)
663 return target;
664 }
665
ByteSizeLong() const666 size_t MetaGraphDef_MetaInfoDef::ByteSizeLong() const {
667 // @@protoc_insertion_point(message_byte_size_start:tensorflow.MetaGraphDef.MetaInfoDef)
668 size_t total_size = 0;
669
670 ::uint32_t cached_has_bits = 0;
671 // Prevent compiler warnings about cached_has_bits being unused
672 (void) cached_has_bits;
673
674 // repeated string tags = 4;
675 total_size += 1 *
676 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.tags_.size());
677 for (int i = 0, n = _impl_.tags_.size(); i < n; i++) {
678 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
679 _impl_.tags_.Get(i));
680 }
681
682 // map<string, string> function_aliases = 8;
683 total_size += 1 *
684 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_function_aliases_size());
685 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
686 it = this->_internal_function_aliases().begin();
687 it != this->_internal_function_aliases().end(); ++it) {
688 total_size += MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
689 }
690
691 // string meta_graph_version = 1;
692 if (!this->_internal_meta_graph_version().empty()) {
693 total_size += 1 +
694 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
695 this->_internal_meta_graph_version());
696 }
697
698 // string tensorflow_version = 5;
699 if (!this->_internal_tensorflow_version().empty()) {
700 total_size += 1 +
701 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
702 this->_internal_tensorflow_version());
703 }
704
705 // string tensorflow_git_version = 6;
706 if (!this->_internal_tensorflow_git_version().empty()) {
707 total_size += 1 +
708 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
709 this->_internal_tensorflow_git_version());
710 }
711
712 // .tensorflow.OpList stripped_op_list = 2;
713 if (this->_internal_has_stripped_op_list()) {
714 total_size += 1 +
715 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
716 *_impl_.stripped_op_list_);
717 }
718
719 // .google.protobuf.Any any_info = 3;
720 if (this->_internal_has_any_info()) {
721 total_size += 1 +
722 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
723 *_impl_.any_info_);
724 }
725
726 // bool stripped_default_attrs = 7;
727 if (this->_internal_stripped_default_attrs() != 0) {
728 total_size += 1 + 1;
729 }
730
731 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
732 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
733 }
734 int cached_size = ::_pbi::ToCachedSize(total_size);
735 SetCachedSize(cached_size);
736 return total_size;
737 }
738
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)739 void MetaGraphDef_MetaInfoDef::CheckTypeAndMergeFrom(
740 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
741 MergeFrom(*::_pbi::DownCast<const MetaGraphDef_MetaInfoDef*>(
742 &from));
743 }
744
MergeFrom(const MetaGraphDef_MetaInfoDef & from)745 void MetaGraphDef_MetaInfoDef::MergeFrom(const MetaGraphDef_MetaInfoDef& from) {
746 MetaGraphDef_MetaInfoDef* const _this = this;
747 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MetaGraphDef.MetaInfoDef)
748 GOOGLE_DCHECK_NE(&from, _this);
749 ::uint32_t cached_has_bits = 0;
750 (void) cached_has_bits;
751
752 _this->_impl_.tags_.MergeFrom(from._impl_.tags_);
753 _this->_impl_.function_aliases_.MergeFrom(from._impl_.function_aliases_);
754 if (!from._internal_meta_graph_version().empty()) {
755 _this->_internal_set_meta_graph_version(from._internal_meta_graph_version());
756 }
757 if (!from._internal_tensorflow_version().empty()) {
758 _this->_internal_set_tensorflow_version(from._internal_tensorflow_version());
759 }
760 if (!from._internal_tensorflow_git_version().empty()) {
761 _this->_internal_set_tensorflow_git_version(from._internal_tensorflow_git_version());
762 }
763 if (from._internal_has_stripped_op_list()) {
764 _this->_internal_mutable_stripped_op_list()->::tensorflow::OpList::MergeFrom(
765 from._internal_stripped_op_list());
766 }
767 if (from._internal_has_any_info()) {
768 _this->_internal_mutable_any_info()->::PROTOBUF_NAMESPACE_ID::Any::MergeFrom(
769 from._internal_any_info());
770 }
771 if (from._internal_stripped_default_attrs() != 0) {
772 _this->_internal_set_stripped_default_attrs(from._internal_stripped_default_attrs());
773 }
774 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
775 }
776
CopyFrom(const MetaGraphDef_MetaInfoDef & from)777 void MetaGraphDef_MetaInfoDef::CopyFrom(const MetaGraphDef_MetaInfoDef& from) {
778 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MetaGraphDef.MetaInfoDef)
779 if (&from == this) return;
780 Clear();
781 MergeFrom(from);
782 }
783
IsInitialized() const784 bool MetaGraphDef_MetaInfoDef::IsInitialized() const {
785 return true;
786 }
787
InternalSwap(MetaGraphDef_MetaInfoDef * other)788 void MetaGraphDef_MetaInfoDef::InternalSwap(MetaGraphDef_MetaInfoDef* other) {
789 using std::swap;
790 auto* lhs_arena = GetArenaForAllocation();
791 auto* rhs_arena = other->GetArenaForAllocation();
792 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
793 _impl_.tags_.InternalSwap(&other->_impl_.tags_);
794 _impl_.function_aliases_.InternalSwap(&other->_impl_.function_aliases_);
795 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
796 &_impl_.meta_graph_version_, lhs_arena,
797 &other->_impl_.meta_graph_version_, rhs_arena
798 );
799 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
800 &_impl_.tensorflow_version_, lhs_arena,
801 &other->_impl_.tensorflow_version_, rhs_arena
802 );
803 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
804 &_impl_.tensorflow_git_version_, lhs_arena,
805 &other->_impl_.tensorflow_git_version_, rhs_arena
806 );
807 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
808 PROTOBUF_FIELD_OFFSET(MetaGraphDef_MetaInfoDef, _impl_.stripped_default_attrs_)
809 + sizeof(MetaGraphDef_MetaInfoDef::_impl_.stripped_default_attrs_) // NOLINT
810 - PROTOBUF_FIELD_OFFSET(MetaGraphDef_MetaInfoDef, _impl_.stripped_op_list_)>(
811 reinterpret_cast<char*>(&_impl_.stripped_op_list_),
812 reinterpret_cast<char*>(&other->_impl_.stripped_op_list_));
813 }
814
GetTypeName() const815 std::string MetaGraphDef_MetaInfoDef::GetTypeName() const {
816 return "tensorflow.MetaGraphDef.MetaInfoDef";
817 }
818
819
820 // ===================================================================
821
MetaGraphDef_CollectionDefEntry_DoNotUse()822 MetaGraphDef_CollectionDefEntry_DoNotUse::MetaGraphDef_CollectionDefEntry_DoNotUse() {}
MetaGraphDef_CollectionDefEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)823 MetaGraphDef_CollectionDefEntry_DoNotUse::MetaGraphDef_CollectionDefEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
824 : SuperType(arena) {}
MergeFrom(const MetaGraphDef_CollectionDefEntry_DoNotUse & other)825 void MetaGraphDef_CollectionDefEntry_DoNotUse::MergeFrom(const MetaGraphDef_CollectionDefEntry_DoNotUse& other) {
826 MergeFromInternal(other);
827 }
828
829 // ===================================================================
830
MetaGraphDef_SignatureDefEntry_DoNotUse()831 MetaGraphDef_SignatureDefEntry_DoNotUse::MetaGraphDef_SignatureDefEntry_DoNotUse() {}
MetaGraphDef_SignatureDefEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)832 MetaGraphDef_SignatureDefEntry_DoNotUse::MetaGraphDef_SignatureDefEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
833 : SuperType(arena) {}
MergeFrom(const MetaGraphDef_SignatureDefEntry_DoNotUse & other)834 void MetaGraphDef_SignatureDefEntry_DoNotUse::MergeFrom(const MetaGraphDef_SignatureDefEntry_DoNotUse& other) {
835 MergeFromInternal(other);
836 }
837
838 // ===================================================================
839
840 class MetaGraphDef::_Internal {
841 public:
842 static const ::tensorflow::MetaGraphDef_MetaInfoDef& meta_info_def(const MetaGraphDef* msg);
843 static const ::tensorflow::GraphDef& graph_def(const MetaGraphDef* msg);
844 static const ::tensorflow::SaverDef& saver_def(const MetaGraphDef* msg);
845 static const ::tensorflow::SavedObjectGraph& object_graph_def(const MetaGraphDef* msg);
846 };
847
848 const ::tensorflow::MetaGraphDef_MetaInfoDef&
meta_info_def(const MetaGraphDef * msg)849 MetaGraphDef::_Internal::meta_info_def(const MetaGraphDef* msg) {
850 return *msg->_impl_.meta_info_def_;
851 }
852 const ::tensorflow::GraphDef&
graph_def(const MetaGraphDef * msg)853 MetaGraphDef::_Internal::graph_def(const MetaGraphDef* msg) {
854 return *msg->_impl_.graph_def_;
855 }
856 const ::tensorflow::SaverDef&
saver_def(const MetaGraphDef * msg)857 MetaGraphDef::_Internal::saver_def(const MetaGraphDef* msg) {
858 return *msg->_impl_.saver_def_;
859 }
860 const ::tensorflow::SavedObjectGraph&
object_graph_def(const MetaGraphDef * msg)861 MetaGraphDef::_Internal::object_graph_def(const MetaGraphDef* msg) {
862 return *msg->_impl_.object_graph_def_;
863 }
clear_graph_def()864 void MetaGraphDef::clear_graph_def() {
865 if (GetArenaForAllocation() == nullptr && _impl_.graph_def_ != nullptr) {
866 delete _impl_.graph_def_;
867 }
868 _impl_.graph_def_ = nullptr;
869 }
clear_saver_def()870 void MetaGraphDef::clear_saver_def() {
871 if (GetArenaForAllocation() == nullptr && _impl_.saver_def_ != nullptr) {
872 delete _impl_.saver_def_;
873 }
874 _impl_.saver_def_ = nullptr;
875 }
clear_object_graph_def()876 void MetaGraphDef::clear_object_graph_def() {
877 if (GetArenaForAllocation() == nullptr && _impl_.object_graph_def_ != nullptr) {
878 delete _impl_.object_graph_def_;
879 }
880 _impl_.object_graph_def_ = nullptr;
881 }
MetaGraphDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)882 MetaGraphDef::MetaGraphDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
883 bool is_message_owned)
884 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
885 SharedCtor(arena, is_message_owned);
886 // @@protoc_insertion_point(arena_constructor:tensorflow.MetaGraphDef)
887 }
MetaGraphDef(const MetaGraphDef & from)888 MetaGraphDef::MetaGraphDef(const MetaGraphDef& from)
889 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
890 MetaGraphDef* const _this = this; (void)_this;
891 new (&_impl_) Impl_{
892 /*decltype(_impl_.collection_def_)*/{}
893 , /*decltype(_impl_.signature_def_)*/{}
894 , decltype(_impl_.asset_file_def_){from._impl_.asset_file_def_}
895 , decltype(_impl_.meta_info_def_){nullptr}
896 , decltype(_impl_.graph_def_){nullptr}
897 , decltype(_impl_.saver_def_){nullptr}
898 , decltype(_impl_.object_graph_def_){nullptr}
899 , /*decltype(_impl_._cached_size_)*/{}};
900
901 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
902 _this->_impl_.collection_def_.MergeFrom(from._impl_.collection_def_);
903 _this->_impl_.signature_def_.MergeFrom(from._impl_.signature_def_);
904 if (from._internal_has_meta_info_def()) {
905 _this->_impl_.meta_info_def_ = new ::tensorflow::MetaGraphDef_MetaInfoDef(*from._impl_.meta_info_def_);
906 }
907 if (from._internal_has_graph_def()) {
908 _this->_impl_.graph_def_ = new ::tensorflow::GraphDef(*from._impl_.graph_def_);
909 }
910 if (from._internal_has_saver_def()) {
911 _this->_impl_.saver_def_ = new ::tensorflow::SaverDef(*from._impl_.saver_def_);
912 }
913 if (from._internal_has_object_graph_def()) {
914 _this->_impl_.object_graph_def_ = new ::tensorflow::SavedObjectGraph(*from._impl_.object_graph_def_);
915 }
916 // @@protoc_insertion_point(copy_constructor:tensorflow.MetaGraphDef)
917 }
918
SharedCtor(::_pb::Arena * arena,bool is_message_owned)919 inline void MetaGraphDef::SharedCtor(
920 ::_pb::Arena* arena, bool is_message_owned) {
921 (void)arena;
922 (void)is_message_owned;
923 new (&_impl_) Impl_{
924 /*decltype(_impl_.collection_def_)*/{::_pbi::ArenaInitialized(), arena}
925 , /*decltype(_impl_.signature_def_)*/{::_pbi::ArenaInitialized(), arena}
926 , decltype(_impl_.asset_file_def_){arena}
927 , decltype(_impl_.meta_info_def_){nullptr}
928 , decltype(_impl_.graph_def_){nullptr}
929 , decltype(_impl_.saver_def_){nullptr}
930 , decltype(_impl_.object_graph_def_){nullptr}
931 , /*decltype(_impl_._cached_size_)*/{}
932 };
933 }
934
~MetaGraphDef()935 MetaGraphDef::~MetaGraphDef() {
936 // @@protoc_insertion_point(destructor:tensorflow.MetaGraphDef)
937 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
938 (void)arena;
939 return;
940 }
941 SharedDtor();
942 }
943
SharedDtor()944 inline void MetaGraphDef::SharedDtor() {
945 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
946 _impl_.collection_def_.Destruct();
947 _impl_.collection_def_.~MapFieldLite();
948 _impl_.signature_def_.Destruct();
949 _impl_.signature_def_.~MapFieldLite();
950 _impl_.asset_file_def_.~RepeatedPtrField();
951 if (this != internal_default_instance()) delete _impl_.meta_info_def_;
952 if (this != internal_default_instance()) delete _impl_.graph_def_;
953 if (this != internal_default_instance()) delete _impl_.saver_def_;
954 if (this != internal_default_instance()) delete _impl_.object_graph_def_;
955 }
956
SetCachedSize(int size) const957 void MetaGraphDef::SetCachedSize(int size) const {
958 _impl_._cached_size_.Set(size);
959 }
960
Clear()961 void MetaGraphDef::Clear() {
962 // @@protoc_insertion_point(message_clear_start:tensorflow.MetaGraphDef)
963 ::uint32_t cached_has_bits = 0;
964 // Prevent compiler warnings about cached_has_bits being unused
965 (void) cached_has_bits;
966
967 _impl_.collection_def_.Clear();
968 _impl_.signature_def_.Clear();
969 _impl_.asset_file_def_.Clear();
970 if (GetArenaForAllocation() == nullptr && _impl_.meta_info_def_ != nullptr) {
971 delete _impl_.meta_info_def_;
972 }
973 _impl_.meta_info_def_ = nullptr;
974 if (GetArenaForAllocation() == nullptr && _impl_.graph_def_ != nullptr) {
975 delete _impl_.graph_def_;
976 }
977 _impl_.graph_def_ = nullptr;
978 if (GetArenaForAllocation() == nullptr && _impl_.saver_def_ != nullptr) {
979 delete _impl_.saver_def_;
980 }
981 _impl_.saver_def_ = nullptr;
982 if (GetArenaForAllocation() == nullptr && _impl_.object_graph_def_ != nullptr) {
983 delete _impl_.object_graph_def_;
984 }
985 _impl_.object_graph_def_ = nullptr;
986 _internal_metadata_.Clear<std::string>();
987 }
988
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)989 const char* MetaGraphDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
990 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
991 while (!ctx->Done(&ptr)) {
992 ::uint32_t tag;
993 ptr = ::_pbi::ReadTag(ptr, &tag);
994 switch (tag >> 3) {
995 // .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1;
996 case 1:
997 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
998 ptr = ctx->ParseMessage(_internal_mutable_meta_info_def(), ptr);
999 CHK_(ptr);
1000 } else {
1001 goto handle_unusual;
1002 }
1003 continue;
1004 // .tensorflow.GraphDef graph_def = 2;
1005 case 2:
1006 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1007 ptr = ctx->ParseMessage(_internal_mutable_graph_def(), ptr);
1008 CHK_(ptr);
1009 } else {
1010 goto handle_unusual;
1011 }
1012 continue;
1013 // .tensorflow.SaverDef saver_def = 3;
1014 case 3:
1015 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1016 ptr = ctx->ParseMessage(_internal_mutable_saver_def(), ptr);
1017 CHK_(ptr);
1018 } else {
1019 goto handle_unusual;
1020 }
1021 continue;
1022 // map<string, .tensorflow.CollectionDef> collection_def = 4;
1023 case 4:
1024 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1025 ptr -= 1;
1026 do {
1027 ptr += 1;
1028 ptr = ctx->ParseMessage(&_impl_.collection_def_, ptr);
1029 CHK_(ptr);
1030 if (!ctx->DataAvailable(ptr)) break;
1031 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
1032 } else {
1033 goto handle_unusual;
1034 }
1035 continue;
1036 // map<string, .tensorflow.SignatureDef> signature_def = 5;
1037 case 5:
1038 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
1039 ptr -= 1;
1040 do {
1041 ptr += 1;
1042 ptr = ctx->ParseMessage(&_impl_.signature_def_, ptr);
1043 CHK_(ptr);
1044 if (!ctx->DataAvailable(ptr)) break;
1045 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
1046 } else {
1047 goto handle_unusual;
1048 }
1049 continue;
1050 // repeated .tensorflow.AssetFileDef asset_file_def = 6;
1051 case 6:
1052 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1053 ptr -= 1;
1054 do {
1055 ptr += 1;
1056 ptr = ctx->ParseMessage(_internal_add_asset_file_def(), ptr);
1057 CHK_(ptr);
1058 if (!ctx->DataAvailable(ptr)) break;
1059 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
1060 } else {
1061 goto handle_unusual;
1062 }
1063 continue;
1064 // .tensorflow.SavedObjectGraph object_graph_def = 7;
1065 case 7:
1066 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
1067 ptr = ctx->ParseMessage(_internal_mutable_object_graph_def(), ptr);
1068 CHK_(ptr);
1069 } else {
1070 goto handle_unusual;
1071 }
1072 continue;
1073 default:
1074 goto handle_unusual;
1075 } // switch
1076 handle_unusual:
1077 if ((tag == 0) || ((tag & 7) == 4)) {
1078 CHK_(ptr);
1079 ctx->SetLastTag(tag);
1080 goto message_done;
1081 }
1082 ptr = UnknownFieldParse(
1083 tag,
1084 _internal_metadata_.mutable_unknown_fields<std::string>(),
1085 ptr, ctx);
1086 CHK_(ptr != nullptr);
1087 } // while
1088 message_done:
1089 return ptr;
1090 failure:
1091 ptr = nullptr;
1092 goto message_done;
1093 #undef CHK_
1094 }
1095
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1096 ::uint8_t* MetaGraphDef::_InternalSerialize(
1097 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1098 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MetaGraphDef)
1099 ::uint32_t cached_has_bits = 0;
1100 (void) cached_has_bits;
1101
1102 // .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1;
1103 if (this->_internal_has_meta_info_def()) {
1104 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1105 InternalWriteMessage(1, _Internal::meta_info_def(this),
1106 _Internal::meta_info_def(this).GetCachedSize(), target, stream);
1107 }
1108
1109 // .tensorflow.GraphDef graph_def = 2;
1110 if (this->_internal_has_graph_def()) {
1111 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1112 InternalWriteMessage(2, _Internal::graph_def(this),
1113 _Internal::graph_def(this).GetCachedSize(), target, stream);
1114 }
1115
1116 // .tensorflow.SaverDef saver_def = 3;
1117 if (this->_internal_has_saver_def()) {
1118 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1119 InternalWriteMessage(3, _Internal::saver_def(this),
1120 _Internal::saver_def(this).GetCachedSize(), target, stream);
1121 }
1122
1123 // map<string, .tensorflow.CollectionDef> collection_def = 4;
1124 if (!this->_internal_collection_def().empty()) {
1125 using MapType = ::_pb::Map<std::string, ::tensorflow::CollectionDef>;
1126 using WireHelper = MetaGraphDef_CollectionDefEntry_DoNotUse::Funcs;
1127 const auto& map_field = this->_internal_collection_def();
1128 auto check_utf8 = [](const MapType::value_type& entry) {
1129 (void)entry;
1130 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1131 entry.first.data(), static_cast<int>(entry.first.length()),
1132 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1133 "tensorflow.MetaGraphDef.CollectionDefEntry.key");
1134 };
1135
1136 if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
1137 for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
1138 target = WireHelper::InternalSerialize(4, entry.first, entry.second, target, stream);
1139 check_utf8(entry);
1140 }
1141 } else {
1142 for (const auto& entry : map_field) {
1143 target = WireHelper::InternalSerialize(4, entry.first, entry.second, target, stream);
1144 check_utf8(entry);
1145 }
1146 }
1147 }
1148
1149 // map<string, .tensorflow.SignatureDef> signature_def = 5;
1150 if (!this->_internal_signature_def().empty()) {
1151 using MapType = ::_pb::Map<std::string, ::tensorflow::SignatureDef>;
1152 using WireHelper = MetaGraphDef_SignatureDefEntry_DoNotUse::Funcs;
1153 const auto& map_field = this->_internal_signature_def();
1154 auto check_utf8 = [](const MapType::value_type& entry) {
1155 (void)entry;
1156 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1157 entry.first.data(), static_cast<int>(entry.first.length()),
1158 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1159 "tensorflow.MetaGraphDef.SignatureDefEntry.key");
1160 };
1161
1162 if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
1163 for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
1164 target = WireHelper::InternalSerialize(5, entry.first, entry.second, target, stream);
1165 check_utf8(entry);
1166 }
1167 } else {
1168 for (const auto& entry : map_field) {
1169 target = WireHelper::InternalSerialize(5, entry.first, entry.second, target, stream);
1170 check_utf8(entry);
1171 }
1172 }
1173 }
1174
1175 // repeated .tensorflow.AssetFileDef asset_file_def = 6;
1176 for (unsigned i = 0,
1177 n = static_cast<unsigned>(this->_internal_asset_file_def_size()); i < n; i++) {
1178 const auto& repfield = this->_internal_asset_file_def(i);
1179 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1180 InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
1181 }
1182
1183 // .tensorflow.SavedObjectGraph object_graph_def = 7;
1184 if (this->_internal_has_object_graph_def()) {
1185 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1186 InternalWriteMessage(7, _Internal::object_graph_def(this),
1187 _Internal::object_graph_def(this).GetCachedSize(), target, stream);
1188 }
1189
1190 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1191 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1192 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1193 }
1194 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MetaGraphDef)
1195 return target;
1196 }
1197
ByteSizeLong() const1198 size_t MetaGraphDef::ByteSizeLong() const {
1199 // @@protoc_insertion_point(message_byte_size_start:tensorflow.MetaGraphDef)
1200 size_t total_size = 0;
1201
1202 ::uint32_t cached_has_bits = 0;
1203 // Prevent compiler warnings about cached_has_bits being unused
1204 (void) cached_has_bits;
1205
1206 // map<string, .tensorflow.CollectionDef> collection_def = 4;
1207 total_size += 1 *
1208 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_collection_def_size());
1209 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::CollectionDef >::const_iterator
1210 it = this->_internal_collection_def().begin();
1211 it != this->_internal_collection_def().end(); ++it) {
1212 total_size += MetaGraphDef_CollectionDefEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
1213 }
1214
1215 // map<string, .tensorflow.SignatureDef> signature_def = 5;
1216 total_size += 1 *
1217 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_signature_def_size());
1218 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::SignatureDef >::const_iterator
1219 it = this->_internal_signature_def().begin();
1220 it != this->_internal_signature_def().end(); ++it) {
1221 total_size += MetaGraphDef_SignatureDefEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
1222 }
1223
1224 // repeated .tensorflow.AssetFileDef asset_file_def = 6;
1225 total_size += 1UL * this->_internal_asset_file_def_size();
1226 for (const auto& msg : this->_impl_.asset_file_def_) {
1227 total_size +=
1228 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1229 }
1230
1231 // .tensorflow.MetaGraphDef.MetaInfoDef meta_info_def = 1;
1232 if (this->_internal_has_meta_info_def()) {
1233 total_size += 1 +
1234 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1235 *_impl_.meta_info_def_);
1236 }
1237
1238 // .tensorflow.GraphDef graph_def = 2;
1239 if (this->_internal_has_graph_def()) {
1240 total_size += 1 +
1241 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1242 *_impl_.graph_def_);
1243 }
1244
1245 // .tensorflow.SaverDef saver_def = 3;
1246 if (this->_internal_has_saver_def()) {
1247 total_size += 1 +
1248 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1249 *_impl_.saver_def_);
1250 }
1251
1252 // .tensorflow.SavedObjectGraph object_graph_def = 7;
1253 if (this->_internal_has_object_graph_def()) {
1254 total_size += 1 +
1255 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1256 *_impl_.object_graph_def_);
1257 }
1258
1259 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1260 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1261 }
1262 int cached_size = ::_pbi::ToCachedSize(total_size);
1263 SetCachedSize(cached_size);
1264 return total_size;
1265 }
1266
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1267 void MetaGraphDef::CheckTypeAndMergeFrom(
1268 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1269 MergeFrom(*::_pbi::DownCast<const MetaGraphDef*>(
1270 &from));
1271 }
1272
MergeFrom(const MetaGraphDef & from)1273 void MetaGraphDef::MergeFrom(const MetaGraphDef& from) {
1274 MetaGraphDef* const _this = this;
1275 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MetaGraphDef)
1276 GOOGLE_DCHECK_NE(&from, _this);
1277 ::uint32_t cached_has_bits = 0;
1278 (void) cached_has_bits;
1279
1280 _this->_impl_.collection_def_.MergeFrom(from._impl_.collection_def_);
1281 _this->_impl_.signature_def_.MergeFrom(from._impl_.signature_def_);
1282 _this->_impl_.asset_file_def_.MergeFrom(from._impl_.asset_file_def_);
1283 if (from._internal_has_meta_info_def()) {
1284 _this->_internal_mutable_meta_info_def()->::tensorflow::MetaGraphDef_MetaInfoDef::MergeFrom(
1285 from._internal_meta_info_def());
1286 }
1287 if (from._internal_has_graph_def()) {
1288 _this->_internal_mutable_graph_def()->::tensorflow::GraphDef::MergeFrom(
1289 from._internal_graph_def());
1290 }
1291 if (from._internal_has_saver_def()) {
1292 _this->_internal_mutable_saver_def()->::tensorflow::SaverDef::MergeFrom(
1293 from._internal_saver_def());
1294 }
1295 if (from._internal_has_object_graph_def()) {
1296 _this->_internal_mutable_object_graph_def()->::tensorflow::SavedObjectGraph::MergeFrom(
1297 from._internal_object_graph_def());
1298 }
1299 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1300 }
1301
CopyFrom(const MetaGraphDef & from)1302 void MetaGraphDef::CopyFrom(const MetaGraphDef& from) {
1303 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MetaGraphDef)
1304 if (&from == this) return;
1305 Clear();
1306 MergeFrom(from);
1307 }
1308
IsInitialized() const1309 bool MetaGraphDef::IsInitialized() const {
1310 return true;
1311 }
1312
InternalSwap(MetaGraphDef * other)1313 void MetaGraphDef::InternalSwap(MetaGraphDef* other) {
1314 using std::swap;
1315 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1316 _impl_.collection_def_.InternalSwap(&other->_impl_.collection_def_);
1317 _impl_.signature_def_.InternalSwap(&other->_impl_.signature_def_);
1318 _impl_.asset_file_def_.InternalSwap(&other->_impl_.asset_file_def_);
1319 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1320 PROTOBUF_FIELD_OFFSET(MetaGraphDef, _impl_.object_graph_def_)
1321 + sizeof(MetaGraphDef::_impl_.object_graph_def_) // NOLINT
1322 - PROTOBUF_FIELD_OFFSET(MetaGraphDef, _impl_.meta_info_def_)>(
1323 reinterpret_cast<char*>(&_impl_.meta_info_def_),
1324 reinterpret_cast<char*>(&other->_impl_.meta_info_def_));
1325 }
1326
GetTypeName() const1327 std::string MetaGraphDef::GetTypeName() const {
1328 return "tensorflow.MetaGraphDef";
1329 }
1330
1331
1332 // ===================================================================
1333
1334 class CollectionDef_NodeList::_Internal {
1335 public:
1336 };
1337
CollectionDef_NodeList(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1338 CollectionDef_NodeList::CollectionDef_NodeList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1339 bool is_message_owned)
1340 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1341 SharedCtor(arena, is_message_owned);
1342 // @@protoc_insertion_point(arena_constructor:tensorflow.CollectionDef.NodeList)
1343 }
CollectionDef_NodeList(const CollectionDef_NodeList & from)1344 CollectionDef_NodeList::CollectionDef_NodeList(const CollectionDef_NodeList& from)
1345 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1346 CollectionDef_NodeList* const _this = this; (void)_this;
1347 new (&_impl_) Impl_{
1348 decltype(_impl_.value_){from._impl_.value_}
1349 , /*decltype(_impl_._cached_size_)*/{}};
1350
1351 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1352 // @@protoc_insertion_point(copy_constructor:tensorflow.CollectionDef.NodeList)
1353 }
1354
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1355 inline void CollectionDef_NodeList::SharedCtor(
1356 ::_pb::Arena* arena, bool is_message_owned) {
1357 (void)arena;
1358 (void)is_message_owned;
1359 new (&_impl_) Impl_{
1360 decltype(_impl_.value_){arena}
1361 , /*decltype(_impl_._cached_size_)*/{}
1362 };
1363 }
1364
~CollectionDef_NodeList()1365 CollectionDef_NodeList::~CollectionDef_NodeList() {
1366 // @@protoc_insertion_point(destructor:tensorflow.CollectionDef.NodeList)
1367 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1368 (void)arena;
1369 return;
1370 }
1371 SharedDtor();
1372 }
1373
SharedDtor()1374 inline void CollectionDef_NodeList::SharedDtor() {
1375 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1376 _impl_.value_.~RepeatedPtrField();
1377 }
1378
SetCachedSize(int size) const1379 void CollectionDef_NodeList::SetCachedSize(int size) const {
1380 _impl_._cached_size_.Set(size);
1381 }
1382
Clear()1383 void CollectionDef_NodeList::Clear() {
1384 // @@protoc_insertion_point(message_clear_start:tensorflow.CollectionDef.NodeList)
1385 ::uint32_t cached_has_bits = 0;
1386 // Prevent compiler warnings about cached_has_bits being unused
1387 (void) cached_has_bits;
1388
1389 _impl_.value_.Clear();
1390 _internal_metadata_.Clear<std::string>();
1391 }
1392
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1393 const char* CollectionDef_NodeList::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1394 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1395 while (!ctx->Done(&ptr)) {
1396 ::uint32_t tag;
1397 ptr = ::_pbi::ReadTag(ptr, &tag);
1398 switch (tag >> 3) {
1399 // repeated string value = 1;
1400 case 1:
1401 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1402 ptr -= 1;
1403 do {
1404 ptr += 1;
1405 auto str = _internal_add_value();
1406 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1407 CHK_(ptr);
1408 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1409 if (!ctx->DataAvailable(ptr)) break;
1410 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1411 } else {
1412 goto handle_unusual;
1413 }
1414 continue;
1415 default:
1416 goto handle_unusual;
1417 } // switch
1418 handle_unusual:
1419 if ((tag == 0) || ((tag & 7) == 4)) {
1420 CHK_(ptr);
1421 ctx->SetLastTag(tag);
1422 goto message_done;
1423 }
1424 ptr = UnknownFieldParse(
1425 tag,
1426 _internal_metadata_.mutable_unknown_fields<std::string>(),
1427 ptr, ctx);
1428 CHK_(ptr != nullptr);
1429 } // while
1430 message_done:
1431 return ptr;
1432 failure:
1433 ptr = nullptr;
1434 goto message_done;
1435 #undef CHK_
1436 }
1437
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1438 ::uint8_t* CollectionDef_NodeList::_InternalSerialize(
1439 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1440 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CollectionDef.NodeList)
1441 ::uint32_t cached_has_bits = 0;
1442 (void) cached_has_bits;
1443
1444 // repeated string value = 1;
1445 for (int i = 0, n = this->_internal_value_size(); i < n; i++) {
1446 const auto& s = this->_internal_value(i);
1447 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1448 s.data(), static_cast<int>(s.length()),
1449 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1450 "tensorflow.CollectionDef.NodeList.value");
1451 target = stream->WriteString(1, s, target);
1452 }
1453
1454 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1455 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1456 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1457 }
1458 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CollectionDef.NodeList)
1459 return target;
1460 }
1461
ByteSizeLong() const1462 size_t CollectionDef_NodeList::ByteSizeLong() const {
1463 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CollectionDef.NodeList)
1464 size_t total_size = 0;
1465
1466 ::uint32_t cached_has_bits = 0;
1467 // Prevent compiler warnings about cached_has_bits being unused
1468 (void) cached_has_bits;
1469
1470 // repeated string value = 1;
1471 total_size += 1 *
1472 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.value_.size());
1473 for (int i = 0, n = _impl_.value_.size(); i < n; i++) {
1474 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1475 _impl_.value_.Get(i));
1476 }
1477
1478 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1479 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1480 }
1481 int cached_size = ::_pbi::ToCachedSize(total_size);
1482 SetCachedSize(cached_size);
1483 return total_size;
1484 }
1485
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1486 void CollectionDef_NodeList::CheckTypeAndMergeFrom(
1487 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1488 MergeFrom(*::_pbi::DownCast<const CollectionDef_NodeList*>(
1489 &from));
1490 }
1491
MergeFrom(const CollectionDef_NodeList & from)1492 void CollectionDef_NodeList::MergeFrom(const CollectionDef_NodeList& from) {
1493 CollectionDef_NodeList* const _this = this;
1494 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CollectionDef.NodeList)
1495 GOOGLE_DCHECK_NE(&from, _this);
1496 ::uint32_t cached_has_bits = 0;
1497 (void) cached_has_bits;
1498
1499 _this->_impl_.value_.MergeFrom(from._impl_.value_);
1500 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1501 }
1502
CopyFrom(const CollectionDef_NodeList & from)1503 void CollectionDef_NodeList::CopyFrom(const CollectionDef_NodeList& from) {
1504 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CollectionDef.NodeList)
1505 if (&from == this) return;
1506 Clear();
1507 MergeFrom(from);
1508 }
1509
IsInitialized() const1510 bool CollectionDef_NodeList::IsInitialized() const {
1511 return true;
1512 }
1513
InternalSwap(CollectionDef_NodeList * other)1514 void CollectionDef_NodeList::InternalSwap(CollectionDef_NodeList* other) {
1515 using std::swap;
1516 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1517 _impl_.value_.InternalSwap(&other->_impl_.value_);
1518 }
1519
GetTypeName() const1520 std::string CollectionDef_NodeList::GetTypeName() const {
1521 return "tensorflow.CollectionDef.NodeList";
1522 }
1523
1524
1525 // ===================================================================
1526
1527 class CollectionDef_BytesList::_Internal {
1528 public:
1529 };
1530
CollectionDef_BytesList(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1531 CollectionDef_BytesList::CollectionDef_BytesList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1532 bool is_message_owned)
1533 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1534 SharedCtor(arena, is_message_owned);
1535 // @@protoc_insertion_point(arena_constructor:tensorflow.CollectionDef.BytesList)
1536 }
CollectionDef_BytesList(const CollectionDef_BytesList & from)1537 CollectionDef_BytesList::CollectionDef_BytesList(const CollectionDef_BytesList& from)
1538 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1539 CollectionDef_BytesList* const _this = this; (void)_this;
1540 new (&_impl_) Impl_{
1541 decltype(_impl_.value_){from._impl_.value_}
1542 , /*decltype(_impl_._cached_size_)*/{}};
1543
1544 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1545 // @@protoc_insertion_point(copy_constructor:tensorflow.CollectionDef.BytesList)
1546 }
1547
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1548 inline void CollectionDef_BytesList::SharedCtor(
1549 ::_pb::Arena* arena, bool is_message_owned) {
1550 (void)arena;
1551 (void)is_message_owned;
1552 new (&_impl_) Impl_{
1553 decltype(_impl_.value_){arena}
1554 , /*decltype(_impl_._cached_size_)*/{}
1555 };
1556 }
1557
~CollectionDef_BytesList()1558 CollectionDef_BytesList::~CollectionDef_BytesList() {
1559 // @@protoc_insertion_point(destructor:tensorflow.CollectionDef.BytesList)
1560 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1561 (void)arena;
1562 return;
1563 }
1564 SharedDtor();
1565 }
1566
SharedDtor()1567 inline void CollectionDef_BytesList::SharedDtor() {
1568 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1569 _impl_.value_.~RepeatedPtrField();
1570 }
1571
SetCachedSize(int size) const1572 void CollectionDef_BytesList::SetCachedSize(int size) const {
1573 _impl_._cached_size_.Set(size);
1574 }
1575
Clear()1576 void CollectionDef_BytesList::Clear() {
1577 // @@protoc_insertion_point(message_clear_start:tensorflow.CollectionDef.BytesList)
1578 ::uint32_t cached_has_bits = 0;
1579 // Prevent compiler warnings about cached_has_bits being unused
1580 (void) cached_has_bits;
1581
1582 _impl_.value_.Clear();
1583 _internal_metadata_.Clear<std::string>();
1584 }
1585
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1586 const char* CollectionDef_BytesList::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1587 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1588 while (!ctx->Done(&ptr)) {
1589 ::uint32_t tag;
1590 ptr = ::_pbi::ReadTag(ptr, &tag);
1591 switch (tag >> 3) {
1592 // repeated bytes value = 1;
1593 case 1:
1594 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1595 ptr -= 1;
1596 do {
1597 ptr += 1;
1598 auto str = _internal_add_value();
1599 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1600 CHK_(ptr);
1601 if (!ctx->DataAvailable(ptr)) break;
1602 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1603 } else {
1604 goto handle_unusual;
1605 }
1606 continue;
1607 default:
1608 goto handle_unusual;
1609 } // switch
1610 handle_unusual:
1611 if ((tag == 0) || ((tag & 7) == 4)) {
1612 CHK_(ptr);
1613 ctx->SetLastTag(tag);
1614 goto message_done;
1615 }
1616 ptr = UnknownFieldParse(
1617 tag,
1618 _internal_metadata_.mutable_unknown_fields<std::string>(),
1619 ptr, ctx);
1620 CHK_(ptr != nullptr);
1621 } // while
1622 message_done:
1623 return ptr;
1624 failure:
1625 ptr = nullptr;
1626 goto message_done;
1627 #undef CHK_
1628 }
1629
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1630 ::uint8_t* CollectionDef_BytesList::_InternalSerialize(
1631 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1632 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CollectionDef.BytesList)
1633 ::uint32_t cached_has_bits = 0;
1634 (void) cached_has_bits;
1635
1636 // repeated bytes value = 1;
1637 for (int i = 0, n = this->_internal_value_size(); i < n; i++) {
1638 const auto& s = this->_internal_value(i);
1639 target = stream->WriteBytes(1, s, target);
1640 }
1641
1642 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1643 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1644 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1645 }
1646 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CollectionDef.BytesList)
1647 return target;
1648 }
1649
ByteSizeLong() const1650 size_t CollectionDef_BytesList::ByteSizeLong() const {
1651 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CollectionDef.BytesList)
1652 size_t total_size = 0;
1653
1654 ::uint32_t cached_has_bits = 0;
1655 // Prevent compiler warnings about cached_has_bits being unused
1656 (void) cached_has_bits;
1657
1658 // repeated bytes value = 1;
1659 total_size += 1 *
1660 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.value_.size());
1661 for (int i = 0, n = _impl_.value_.size(); i < n; i++) {
1662 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
1663 _impl_.value_.Get(i));
1664 }
1665
1666 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1667 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1668 }
1669 int cached_size = ::_pbi::ToCachedSize(total_size);
1670 SetCachedSize(cached_size);
1671 return total_size;
1672 }
1673
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1674 void CollectionDef_BytesList::CheckTypeAndMergeFrom(
1675 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1676 MergeFrom(*::_pbi::DownCast<const CollectionDef_BytesList*>(
1677 &from));
1678 }
1679
MergeFrom(const CollectionDef_BytesList & from)1680 void CollectionDef_BytesList::MergeFrom(const CollectionDef_BytesList& from) {
1681 CollectionDef_BytesList* const _this = this;
1682 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CollectionDef.BytesList)
1683 GOOGLE_DCHECK_NE(&from, _this);
1684 ::uint32_t cached_has_bits = 0;
1685 (void) cached_has_bits;
1686
1687 _this->_impl_.value_.MergeFrom(from._impl_.value_);
1688 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1689 }
1690
CopyFrom(const CollectionDef_BytesList & from)1691 void CollectionDef_BytesList::CopyFrom(const CollectionDef_BytesList& from) {
1692 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CollectionDef.BytesList)
1693 if (&from == this) return;
1694 Clear();
1695 MergeFrom(from);
1696 }
1697
IsInitialized() const1698 bool CollectionDef_BytesList::IsInitialized() const {
1699 return true;
1700 }
1701
InternalSwap(CollectionDef_BytesList * other)1702 void CollectionDef_BytesList::InternalSwap(CollectionDef_BytesList* other) {
1703 using std::swap;
1704 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1705 _impl_.value_.InternalSwap(&other->_impl_.value_);
1706 }
1707
GetTypeName() const1708 std::string CollectionDef_BytesList::GetTypeName() const {
1709 return "tensorflow.CollectionDef.BytesList";
1710 }
1711
1712
1713 // ===================================================================
1714
1715 class CollectionDef_Int64List::_Internal {
1716 public:
1717 };
1718
CollectionDef_Int64List(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1719 CollectionDef_Int64List::CollectionDef_Int64List(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1720 bool is_message_owned)
1721 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1722 SharedCtor(arena, is_message_owned);
1723 // @@protoc_insertion_point(arena_constructor:tensorflow.CollectionDef.Int64List)
1724 }
CollectionDef_Int64List(const CollectionDef_Int64List & from)1725 CollectionDef_Int64List::CollectionDef_Int64List(const CollectionDef_Int64List& from)
1726 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1727 CollectionDef_Int64List* const _this = this; (void)_this;
1728 new (&_impl_) Impl_{
1729 decltype(_impl_.value_){from._impl_.value_}
1730 , /*decltype(_impl_._value_cached_byte_size_)*/{0}
1731 , /*decltype(_impl_._cached_size_)*/{}};
1732
1733 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1734 // @@protoc_insertion_point(copy_constructor:tensorflow.CollectionDef.Int64List)
1735 }
1736
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1737 inline void CollectionDef_Int64List::SharedCtor(
1738 ::_pb::Arena* arena, bool is_message_owned) {
1739 (void)arena;
1740 (void)is_message_owned;
1741 new (&_impl_) Impl_{
1742 decltype(_impl_.value_){arena}
1743 , /*decltype(_impl_._value_cached_byte_size_)*/{0}
1744 , /*decltype(_impl_._cached_size_)*/{}
1745 };
1746 }
1747
~CollectionDef_Int64List()1748 CollectionDef_Int64List::~CollectionDef_Int64List() {
1749 // @@protoc_insertion_point(destructor:tensorflow.CollectionDef.Int64List)
1750 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1751 (void)arena;
1752 return;
1753 }
1754 SharedDtor();
1755 }
1756
SharedDtor()1757 inline void CollectionDef_Int64List::SharedDtor() {
1758 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1759 _impl_.value_.~RepeatedField();
1760 }
1761
SetCachedSize(int size) const1762 void CollectionDef_Int64List::SetCachedSize(int size) const {
1763 _impl_._cached_size_.Set(size);
1764 }
1765
Clear()1766 void CollectionDef_Int64List::Clear() {
1767 // @@protoc_insertion_point(message_clear_start:tensorflow.CollectionDef.Int64List)
1768 ::uint32_t cached_has_bits = 0;
1769 // Prevent compiler warnings about cached_has_bits being unused
1770 (void) cached_has_bits;
1771
1772 _impl_.value_.Clear();
1773 _internal_metadata_.Clear<std::string>();
1774 }
1775
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1776 const char* CollectionDef_Int64List::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1777 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1778 while (!ctx->Done(&ptr)) {
1779 ::uint32_t tag;
1780 ptr = ::_pbi::ReadTag(ptr, &tag);
1781 switch (tag >> 3) {
1782 // repeated int64 value = 1 [packed = true];
1783 case 1:
1784 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1785 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_value(), ptr, ctx);
1786 CHK_(ptr);
1787 } else if (static_cast<::uint8_t>(tag) == 8) {
1788 _internal_add_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
1789 CHK_(ptr);
1790 } else {
1791 goto handle_unusual;
1792 }
1793 continue;
1794 default:
1795 goto handle_unusual;
1796 } // switch
1797 handle_unusual:
1798 if ((tag == 0) || ((tag & 7) == 4)) {
1799 CHK_(ptr);
1800 ctx->SetLastTag(tag);
1801 goto message_done;
1802 }
1803 ptr = UnknownFieldParse(
1804 tag,
1805 _internal_metadata_.mutable_unknown_fields<std::string>(),
1806 ptr, ctx);
1807 CHK_(ptr != nullptr);
1808 } // while
1809 message_done:
1810 return ptr;
1811 failure:
1812 ptr = nullptr;
1813 goto message_done;
1814 #undef CHK_
1815 }
1816
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1817 ::uint8_t* CollectionDef_Int64List::_InternalSerialize(
1818 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1819 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CollectionDef.Int64List)
1820 ::uint32_t cached_has_bits = 0;
1821 (void) cached_has_bits;
1822
1823 // repeated int64 value = 1 [packed = true];
1824 {
1825 int byte_size = _impl_._value_cached_byte_size_.load(std::memory_order_relaxed);
1826 if (byte_size > 0) {
1827 target = stream->WriteInt64Packed(
1828 1, _internal_value(), byte_size, target);
1829 }
1830 }
1831
1832 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1833 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1834 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1835 }
1836 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CollectionDef.Int64List)
1837 return target;
1838 }
1839
ByteSizeLong() const1840 size_t CollectionDef_Int64List::ByteSizeLong() const {
1841 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CollectionDef.Int64List)
1842 size_t total_size = 0;
1843
1844 ::uint32_t cached_has_bits = 0;
1845 // Prevent compiler warnings about cached_has_bits being unused
1846 (void) cached_has_bits;
1847
1848 // repeated int64 value = 1 [packed = true];
1849 {
1850 size_t data_size = ::_pbi::WireFormatLite::
1851 Int64Size(this->_impl_.value_);
1852 if (data_size > 0) {
1853 total_size += 1 +
1854 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
1855 }
1856 int cached_size = ::_pbi::ToCachedSize(data_size);
1857 _impl_._value_cached_byte_size_.store(cached_size,
1858 std::memory_order_relaxed);
1859 total_size += data_size;
1860 }
1861
1862 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1863 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1864 }
1865 int cached_size = ::_pbi::ToCachedSize(total_size);
1866 SetCachedSize(cached_size);
1867 return total_size;
1868 }
1869
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1870 void CollectionDef_Int64List::CheckTypeAndMergeFrom(
1871 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1872 MergeFrom(*::_pbi::DownCast<const CollectionDef_Int64List*>(
1873 &from));
1874 }
1875
MergeFrom(const CollectionDef_Int64List & from)1876 void CollectionDef_Int64List::MergeFrom(const CollectionDef_Int64List& from) {
1877 CollectionDef_Int64List* const _this = this;
1878 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CollectionDef.Int64List)
1879 GOOGLE_DCHECK_NE(&from, _this);
1880 ::uint32_t cached_has_bits = 0;
1881 (void) cached_has_bits;
1882
1883 _this->_impl_.value_.MergeFrom(from._impl_.value_);
1884 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1885 }
1886
CopyFrom(const CollectionDef_Int64List & from)1887 void CollectionDef_Int64List::CopyFrom(const CollectionDef_Int64List& from) {
1888 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CollectionDef.Int64List)
1889 if (&from == this) return;
1890 Clear();
1891 MergeFrom(from);
1892 }
1893
IsInitialized() const1894 bool CollectionDef_Int64List::IsInitialized() const {
1895 return true;
1896 }
1897
InternalSwap(CollectionDef_Int64List * other)1898 void CollectionDef_Int64List::InternalSwap(CollectionDef_Int64List* other) {
1899 using std::swap;
1900 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1901 _impl_.value_.InternalSwap(&other->_impl_.value_);
1902 }
1903
GetTypeName() const1904 std::string CollectionDef_Int64List::GetTypeName() const {
1905 return "tensorflow.CollectionDef.Int64List";
1906 }
1907
1908
1909 // ===================================================================
1910
1911 class CollectionDef_FloatList::_Internal {
1912 public:
1913 };
1914
CollectionDef_FloatList(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1915 CollectionDef_FloatList::CollectionDef_FloatList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1916 bool is_message_owned)
1917 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1918 SharedCtor(arena, is_message_owned);
1919 // @@protoc_insertion_point(arena_constructor:tensorflow.CollectionDef.FloatList)
1920 }
CollectionDef_FloatList(const CollectionDef_FloatList & from)1921 CollectionDef_FloatList::CollectionDef_FloatList(const CollectionDef_FloatList& from)
1922 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1923 CollectionDef_FloatList* const _this = this; (void)_this;
1924 new (&_impl_) Impl_{
1925 decltype(_impl_.value_){from._impl_.value_}
1926 , /*decltype(_impl_._cached_size_)*/{}};
1927
1928 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1929 // @@protoc_insertion_point(copy_constructor:tensorflow.CollectionDef.FloatList)
1930 }
1931
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1932 inline void CollectionDef_FloatList::SharedCtor(
1933 ::_pb::Arena* arena, bool is_message_owned) {
1934 (void)arena;
1935 (void)is_message_owned;
1936 new (&_impl_) Impl_{
1937 decltype(_impl_.value_){arena}
1938 , /*decltype(_impl_._cached_size_)*/{}
1939 };
1940 }
1941
~CollectionDef_FloatList()1942 CollectionDef_FloatList::~CollectionDef_FloatList() {
1943 // @@protoc_insertion_point(destructor:tensorflow.CollectionDef.FloatList)
1944 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1945 (void)arena;
1946 return;
1947 }
1948 SharedDtor();
1949 }
1950
SharedDtor()1951 inline void CollectionDef_FloatList::SharedDtor() {
1952 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1953 _impl_.value_.~RepeatedField();
1954 }
1955
SetCachedSize(int size) const1956 void CollectionDef_FloatList::SetCachedSize(int size) const {
1957 _impl_._cached_size_.Set(size);
1958 }
1959
Clear()1960 void CollectionDef_FloatList::Clear() {
1961 // @@protoc_insertion_point(message_clear_start:tensorflow.CollectionDef.FloatList)
1962 ::uint32_t cached_has_bits = 0;
1963 // Prevent compiler warnings about cached_has_bits being unused
1964 (void) cached_has_bits;
1965
1966 _impl_.value_.Clear();
1967 _internal_metadata_.Clear<std::string>();
1968 }
1969
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1970 const char* CollectionDef_FloatList::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1971 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1972 while (!ctx->Done(&ptr)) {
1973 ::uint32_t tag;
1974 ptr = ::_pbi::ReadTag(ptr, &tag);
1975 switch (tag >> 3) {
1976 // repeated float value = 1 [packed = true];
1977 case 1:
1978 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1979 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_value(), ptr, ctx);
1980 CHK_(ptr);
1981 } else if (static_cast<::uint8_t>(tag) == 13) {
1982 _internal_add_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
1983 ptr += sizeof(float);
1984 } else {
1985 goto handle_unusual;
1986 }
1987 continue;
1988 default:
1989 goto handle_unusual;
1990 } // switch
1991 handle_unusual:
1992 if ((tag == 0) || ((tag & 7) == 4)) {
1993 CHK_(ptr);
1994 ctx->SetLastTag(tag);
1995 goto message_done;
1996 }
1997 ptr = UnknownFieldParse(
1998 tag,
1999 _internal_metadata_.mutable_unknown_fields<std::string>(),
2000 ptr, ctx);
2001 CHK_(ptr != nullptr);
2002 } // while
2003 message_done:
2004 return ptr;
2005 failure:
2006 ptr = nullptr;
2007 goto message_done;
2008 #undef CHK_
2009 }
2010
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2011 ::uint8_t* CollectionDef_FloatList::_InternalSerialize(
2012 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2013 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CollectionDef.FloatList)
2014 ::uint32_t cached_has_bits = 0;
2015 (void) cached_has_bits;
2016
2017 // repeated float value = 1 [packed = true];
2018 if (this->_internal_value_size() > 0) {
2019 target = stream->WriteFixedPacked(1, _internal_value(), target);
2020 }
2021
2022 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2023 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2024 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2025 }
2026 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CollectionDef.FloatList)
2027 return target;
2028 }
2029
ByteSizeLong() const2030 size_t CollectionDef_FloatList::ByteSizeLong() const {
2031 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CollectionDef.FloatList)
2032 size_t total_size = 0;
2033
2034 ::uint32_t cached_has_bits = 0;
2035 // Prevent compiler warnings about cached_has_bits being unused
2036 (void) cached_has_bits;
2037
2038 // repeated float value = 1 [packed = true];
2039 {
2040 unsigned int count = static_cast<unsigned int>(this->_internal_value_size());
2041 size_t data_size = 4UL * count;
2042 if (data_size > 0) {
2043 total_size += 1 +
2044 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
2045 }
2046 total_size += data_size;
2047 }
2048
2049 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2050 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2051 }
2052 int cached_size = ::_pbi::ToCachedSize(total_size);
2053 SetCachedSize(cached_size);
2054 return total_size;
2055 }
2056
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2057 void CollectionDef_FloatList::CheckTypeAndMergeFrom(
2058 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2059 MergeFrom(*::_pbi::DownCast<const CollectionDef_FloatList*>(
2060 &from));
2061 }
2062
MergeFrom(const CollectionDef_FloatList & from)2063 void CollectionDef_FloatList::MergeFrom(const CollectionDef_FloatList& from) {
2064 CollectionDef_FloatList* const _this = this;
2065 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CollectionDef.FloatList)
2066 GOOGLE_DCHECK_NE(&from, _this);
2067 ::uint32_t cached_has_bits = 0;
2068 (void) cached_has_bits;
2069
2070 _this->_impl_.value_.MergeFrom(from._impl_.value_);
2071 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2072 }
2073
CopyFrom(const CollectionDef_FloatList & from)2074 void CollectionDef_FloatList::CopyFrom(const CollectionDef_FloatList& from) {
2075 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CollectionDef.FloatList)
2076 if (&from == this) return;
2077 Clear();
2078 MergeFrom(from);
2079 }
2080
IsInitialized() const2081 bool CollectionDef_FloatList::IsInitialized() const {
2082 return true;
2083 }
2084
InternalSwap(CollectionDef_FloatList * other)2085 void CollectionDef_FloatList::InternalSwap(CollectionDef_FloatList* other) {
2086 using std::swap;
2087 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2088 _impl_.value_.InternalSwap(&other->_impl_.value_);
2089 }
2090
GetTypeName() const2091 std::string CollectionDef_FloatList::GetTypeName() const {
2092 return "tensorflow.CollectionDef.FloatList";
2093 }
2094
2095
2096 // ===================================================================
2097
2098 class CollectionDef_AnyList::_Internal {
2099 public:
2100 };
2101
clear_value()2102 void CollectionDef_AnyList::clear_value() {
2103 _impl_.value_.Clear();
2104 }
CollectionDef_AnyList(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2105 CollectionDef_AnyList::CollectionDef_AnyList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2106 bool is_message_owned)
2107 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2108 SharedCtor(arena, is_message_owned);
2109 // @@protoc_insertion_point(arena_constructor:tensorflow.CollectionDef.AnyList)
2110 }
CollectionDef_AnyList(const CollectionDef_AnyList & from)2111 CollectionDef_AnyList::CollectionDef_AnyList(const CollectionDef_AnyList& from)
2112 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2113 CollectionDef_AnyList* const _this = this; (void)_this;
2114 new (&_impl_) Impl_{
2115 decltype(_impl_.value_){from._impl_.value_}
2116 , /*decltype(_impl_._cached_size_)*/{}};
2117
2118 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2119 // @@protoc_insertion_point(copy_constructor:tensorflow.CollectionDef.AnyList)
2120 }
2121
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2122 inline void CollectionDef_AnyList::SharedCtor(
2123 ::_pb::Arena* arena, bool is_message_owned) {
2124 (void)arena;
2125 (void)is_message_owned;
2126 new (&_impl_) Impl_{
2127 decltype(_impl_.value_){arena}
2128 , /*decltype(_impl_._cached_size_)*/{}
2129 };
2130 }
2131
~CollectionDef_AnyList()2132 CollectionDef_AnyList::~CollectionDef_AnyList() {
2133 // @@protoc_insertion_point(destructor:tensorflow.CollectionDef.AnyList)
2134 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2135 (void)arena;
2136 return;
2137 }
2138 SharedDtor();
2139 }
2140
SharedDtor()2141 inline void CollectionDef_AnyList::SharedDtor() {
2142 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2143 _impl_.value_.~RepeatedPtrField();
2144 }
2145
SetCachedSize(int size) const2146 void CollectionDef_AnyList::SetCachedSize(int size) const {
2147 _impl_._cached_size_.Set(size);
2148 }
2149
Clear()2150 void CollectionDef_AnyList::Clear() {
2151 // @@protoc_insertion_point(message_clear_start:tensorflow.CollectionDef.AnyList)
2152 ::uint32_t cached_has_bits = 0;
2153 // Prevent compiler warnings about cached_has_bits being unused
2154 (void) cached_has_bits;
2155
2156 _impl_.value_.Clear();
2157 _internal_metadata_.Clear<std::string>();
2158 }
2159
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2160 const char* CollectionDef_AnyList::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2161 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2162 while (!ctx->Done(&ptr)) {
2163 ::uint32_t tag;
2164 ptr = ::_pbi::ReadTag(ptr, &tag);
2165 switch (tag >> 3) {
2166 // repeated .google.protobuf.Any value = 1;
2167 case 1:
2168 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2169 ptr -= 1;
2170 do {
2171 ptr += 1;
2172 ptr = ctx->ParseMessage(_internal_add_value(), ptr);
2173 CHK_(ptr);
2174 if (!ctx->DataAvailable(ptr)) break;
2175 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
2176 } else {
2177 goto handle_unusual;
2178 }
2179 continue;
2180 default:
2181 goto handle_unusual;
2182 } // switch
2183 handle_unusual:
2184 if ((tag == 0) || ((tag & 7) == 4)) {
2185 CHK_(ptr);
2186 ctx->SetLastTag(tag);
2187 goto message_done;
2188 }
2189 ptr = UnknownFieldParse(
2190 tag,
2191 _internal_metadata_.mutable_unknown_fields<std::string>(),
2192 ptr, ctx);
2193 CHK_(ptr != nullptr);
2194 } // while
2195 message_done:
2196 return ptr;
2197 failure:
2198 ptr = nullptr;
2199 goto message_done;
2200 #undef CHK_
2201 }
2202
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2203 ::uint8_t* CollectionDef_AnyList::_InternalSerialize(
2204 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2205 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CollectionDef.AnyList)
2206 ::uint32_t cached_has_bits = 0;
2207 (void) cached_has_bits;
2208
2209 // repeated .google.protobuf.Any value = 1;
2210 for (unsigned i = 0,
2211 n = static_cast<unsigned>(this->_internal_value_size()); i < n; i++) {
2212 const auto& repfield = this->_internal_value(i);
2213 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2214 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
2215 }
2216
2217 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2218 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2219 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2220 }
2221 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CollectionDef.AnyList)
2222 return target;
2223 }
2224
ByteSizeLong() const2225 size_t CollectionDef_AnyList::ByteSizeLong() const {
2226 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CollectionDef.AnyList)
2227 size_t total_size = 0;
2228
2229 ::uint32_t cached_has_bits = 0;
2230 // Prevent compiler warnings about cached_has_bits being unused
2231 (void) cached_has_bits;
2232
2233 // repeated .google.protobuf.Any value = 1;
2234 total_size += 1UL * this->_internal_value_size();
2235 for (const auto& msg : this->_impl_.value_) {
2236 total_size +=
2237 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2238 }
2239
2240 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2241 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2242 }
2243 int cached_size = ::_pbi::ToCachedSize(total_size);
2244 SetCachedSize(cached_size);
2245 return total_size;
2246 }
2247
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2248 void CollectionDef_AnyList::CheckTypeAndMergeFrom(
2249 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2250 MergeFrom(*::_pbi::DownCast<const CollectionDef_AnyList*>(
2251 &from));
2252 }
2253
MergeFrom(const CollectionDef_AnyList & from)2254 void CollectionDef_AnyList::MergeFrom(const CollectionDef_AnyList& from) {
2255 CollectionDef_AnyList* const _this = this;
2256 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CollectionDef.AnyList)
2257 GOOGLE_DCHECK_NE(&from, _this);
2258 ::uint32_t cached_has_bits = 0;
2259 (void) cached_has_bits;
2260
2261 _this->_impl_.value_.MergeFrom(from._impl_.value_);
2262 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2263 }
2264
CopyFrom(const CollectionDef_AnyList & from)2265 void CollectionDef_AnyList::CopyFrom(const CollectionDef_AnyList& from) {
2266 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CollectionDef.AnyList)
2267 if (&from == this) return;
2268 Clear();
2269 MergeFrom(from);
2270 }
2271
IsInitialized() const2272 bool CollectionDef_AnyList::IsInitialized() const {
2273 return true;
2274 }
2275
InternalSwap(CollectionDef_AnyList * other)2276 void CollectionDef_AnyList::InternalSwap(CollectionDef_AnyList* other) {
2277 using std::swap;
2278 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2279 _impl_.value_.InternalSwap(&other->_impl_.value_);
2280 }
2281
GetTypeName() const2282 std::string CollectionDef_AnyList::GetTypeName() const {
2283 return "tensorflow.CollectionDef.AnyList";
2284 }
2285
2286
2287 // ===================================================================
2288
2289 class CollectionDef::_Internal {
2290 public:
2291 static const ::tensorflow::CollectionDef_NodeList& node_list(const CollectionDef* msg);
2292 static const ::tensorflow::CollectionDef_BytesList& bytes_list(const CollectionDef* msg);
2293 static const ::tensorflow::CollectionDef_Int64List& int64_list(const CollectionDef* msg);
2294 static const ::tensorflow::CollectionDef_FloatList& float_list(const CollectionDef* msg);
2295 static const ::tensorflow::CollectionDef_AnyList& any_list(const CollectionDef* msg);
2296 };
2297
2298 const ::tensorflow::CollectionDef_NodeList&
node_list(const CollectionDef * msg)2299 CollectionDef::_Internal::node_list(const CollectionDef* msg) {
2300 return *msg->_impl_.kind_.node_list_;
2301 }
2302 const ::tensorflow::CollectionDef_BytesList&
bytes_list(const CollectionDef * msg)2303 CollectionDef::_Internal::bytes_list(const CollectionDef* msg) {
2304 return *msg->_impl_.kind_.bytes_list_;
2305 }
2306 const ::tensorflow::CollectionDef_Int64List&
int64_list(const CollectionDef * msg)2307 CollectionDef::_Internal::int64_list(const CollectionDef* msg) {
2308 return *msg->_impl_.kind_.int64_list_;
2309 }
2310 const ::tensorflow::CollectionDef_FloatList&
float_list(const CollectionDef * msg)2311 CollectionDef::_Internal::float_list(const CollectionDef* msg) {
2312 return *msg->_impl_.kind_.float_list_;
2313 }
2314 const ::tensorflow::CollectionDef_AnyList&
any_list(const CollectionDef * msg)2315 CollectionDef::_Internal::any_list(const CollectionDef* msg) {
2316 return *msg->_impl_.kind_.any_list_;
2317 }
set_allocated_node_list(::tensorflow::CollectionDef_NodeList * node_list)2318 void CollectionDef::set_allocated_node_list(::tensorflow::CollectionDef_NodeList* node_list) {
2319 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2320 clear_kind();
2321 if (node_list) {
2322 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2323 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(node_list);
2324 if (message_arena != submessage_arena) {
2325 node_list = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2326 message_arena, node_list, submessage_arena);
2327 }
2328 set_has_node_list();
2329 _impl_.kind_.node_list_ = node_list;
2330 }
2331 // @@protoc_insertion_point(field_set_allocated:tensorflow.CollectionDef.node_list)
2332 }
set_allocated_bytes_list(::tensorflow::CollectionDef_BytesList * bytes_list)2333 void CollectionDef::set_allocated_bytes_list(::tensorflow::CollectionDef_BytesList* bytes_list) {
2334 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2335 clear_kind();
2336 if (bytes_list) {
2337 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2338 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bytes_list);
2339 if (message_arena != submessage_arena) {
2340 bytes_list = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2341 message_arena, bytes_list, submessage_arena);
2342 }
2343 set_has_bytes_list();
2344 _impl_.kind_.bytes_list_ = bytes_list;
2345 }
2346 // @@protoc_insertion_point(field_set_allocated:tensorflow.CollectionDef.bytes_list)
2347 }
set_allocated_int64_list(::tensorflow::CollectionDef_Int64List * int64_list)2348 void CollectionDef::set_allocated_int64_list(::tensorflow::CollectionDef_Int64List* int64_list) {
2349 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2350 clear_kind();
2351 if (int64_list) {
2352 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2353 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(int64_list);
2354 if (message_arena != submessage_arena) {
2355 int64_list = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2356 message_arena, int64_list, submessage_arena);
2357 }
2358 set_has_int64_list();
2359 _impl_.kind_.int64_list_ = int64_list;
2360 }
2361 // @@protoc_insertion_point(field_set_allocated:tensorflow.CollectionDef.int64_list)
2362 }
set_allocated_float_list(::tensorflow::CollectionDef_FloatList * float_list)2363 void CollectionDef::set_allocated_float_list(::tensorflow::CollectionDef_FloatList* float_list) {
2364 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2365 clear_kind();
2366 if (float_list) {
2367 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2368 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(float_list);
2369 if (message_arena != submessage_arena) {
2370 float_list = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2371 message_arena, float_list, submessage_arena);
2372 }
2373 set_has_float_list();
2374 _impl_.kind_.float_list_ = float_list;
2375 }
2376 // @@protoc_insertion_point(field_set_allocated:tensorflow.CollectionDef.float_list)
2377 }
set_allocated_any_list(::tensorflow::CollectionDef_AnyList * any_list)2378 void CollectionDef::set_allocated_any_list(::tensorflow::CollectionDef_AnyList* any_list) {
2379 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
2380 clear_kind();
2381 if (any_list) {
2382 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
2383 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(any_list);
2384 if (message_arena != submessage_arena) {
2385 any_list = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
2386 message_arena, any_list, submessage_arena);
2387 }
2388 set_has_any_list();
2389 _impl_.kind_.any_list_ = any_list;
2390 }
2391 // @@protoc_insertion_point(field_set_allocated:tensorflow.CollectionDef.any_list)
2392 }
CollectionDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2393 CollectionDef::CollectionDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2394 bool is_message_owned)
2395 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2396 SharedCtor(arena, is_message_owned);
2397 // @@protoc_insertion_point(arena_constructor:tensorflow.CollectionDef)
2398 }
CollectionDef(const CollectionDef & from)2399 CollectionDef::CollectionDef(const CollectionDef& from)
2400 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2401 CollectionDef* const _this = this; (void)_this;
2402 new (&_impl_) Impl_{
2403 decltype(_impl_.kind_){}
2404 , /*decltype(_impl_._cached_size_)*/{}
2405 , /*decltype(_impl_._oneof_case_)*/{}};
2406
2407 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2408 clear_has_kind();
2409 switch (from.kind_case()) {
2410 case kNodeList: {
2411 _this->_internal_mutable_node_list()->::tensorflow::CollectionDef_NodeList::MergeFrom(
2412 from._internal_node_list());
2413 break;
2414 }
2415 case kBytesList: {
2416 _this->_internal_mutable_bytes_list()->::tensorflow::CollectionDef_BytesList::MergeFrom(
2417 from._internal_bytes_list());
2418 break;
2419 }
2420 case kInt64List: {
2421 _this->_internal_mutable_int64_list()->::tensorflow::CollectionDef_Int64List::MergeFrom(
2422 from._internal_int64_list());
2423 break;
2424 }
2425 case kFloatList: {
2426 _this->_internal_mutable_float_list()->::tensorflow::CollectionDef_FloatList::MergeFrom(
2427 from._internal_float_list());
2428 break;
2429 }
2430 case kAnyList: {
2431 _this->_internal_mutable_any_list()->::tensorflow::CollectionDef_AnyList::MergeFrom(
2432 from._internal_any_list());
2433 break;
2434 }
2435 case KIND_NOT_SET: {
2436 break;
2437 }
2438 }
2439 // @@protoc_insertion_point(copy_constructor:tensorflow.CollectionDef)
2440 }
2441
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2442 inline void CollectionDef::SharedCtor(
2443 ::_pb::Arena* arena, bool is_message_owned) {
2444 (void)arena;
2445 (void)is_message_owned;
2446 new (&_impl_) Impl_{
2447 decltype(_impl_.kind_){}
2448 , /*decltype(_impl_._cached_size_)*/{}
2449 , /*decltype(_impl_._oneof_case_)*/{}
2450 };
2451 clear_has_kind();
2452 }
2453
~CollectionDef()2454 CollectionDef::~CollectionDef() {
2455 // @@protoc_insertion_point(destructor:tensorflow.CollectionDef)
2456 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2457 (void)arena;
2458 return;
2459 }
2460 SharedDtor();
2461 }
2462
SharedDtor()2463 inline void CollectionDef::SharedDtor() {
2464 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2465 if (has_kind()) {
2466 clear_kind();
2467 }
2468 }
2469
SetCachedSize(int size) const2470 void CollectionDef::SetCachedSize(int size) const {
2471 _impl_._cached_size_.Set(size);
2472 }
2473
clear_kind()2474 void CollectionDef::clear_kind() {
2475 // @@protoc_insertion_point(one_of_clear_start:tensorflow.CollectionDef)
2476 switch (kind_case()) {
2477 case kNodeList: {
2478 if (GetArenaForAllocation() == nullptr) {
2479 delete _impl_.kind_.node_list_;
2480 }
2481 break;
2482 }
2483 case kBytesList: {
2484 if (GetArenaForAllocation() == nullptr) {
2485 delete _impl_.kind_.bytes_list_;
2486 }
2487 break;
2488 }
2489 case kInt64List: {
2490 if (GetArenaForAllocation() == nullptr) {
2491 delete _impl_.kind_.int64_list_;
2492 }
2493 break;
2494 }
2495 case kFloatList: {
2496 if (GetArenaForAllocation() == nullptr) {
2497 delete _impl_.kind_.float_list_;
2498 }
2499 break;
2500 }
2501 case kAnyList: {
2502 if (GetArenaForAllocation() == nullptr) {
2503 delete _impl_.kind_.any_list_;
2504 }
2505 break;
2506 }
2507 case KIND_NOT_SET: {
2508 break;
2509 }
2510 }
2511 _impl_._oneof_case_[0] = KIND_NOT_SET;
2512 }
2513
2514
Clear()2515 void CollectionDef::Clear() {
2516 // @@protoc_insertion_point(message_clear_start:tensorflow.CollectionDef)
2517 ::uint32_t cached_has_bits = 0;
2518 // Prevent compiler warnings about cached_has_bits being unused
2519 (void) cached_has_bits;
2520
2521 clear_kind();
2522 _internal_metadata_.Clear<std::string>();
2523 }
2524
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2525 const char* CollectionDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2526 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2527 while (!ctx->Done(&ptr)) {
2528 ::uint32_t tag;
2529 ptr = ::_pbi::ReadTag(ptr, &tag);
2530 switch (tag >> 3) {
2531 // .tensorflow.CollectionDef.NodeList node_list = 1;
2532 case 1:
2533 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2534 ptr = ctx->ParseMessage(_internal_mutable_node_list(), ptr);
2535 CHK_(ptr);
2536 } else {
2537 goto handle_unusual;
2538 }
2539 continue;
2540 // .tensorflow.CollectionDef.BytesList bytes_list = 2;
2541 case 2:
2542 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2543 ptr = ctx->ParseMessage(_internal_mutable_bytes_list(), ptr);
2544 CHK_(ptr);
2545 } else {
2546 goto handle_unusual;
2547 }
2548 continue;
2549 // .tensorflow.CollectionDef.Int64List int64_list = 3;
2550 case 3:
2551 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2552 ptr = ctx->ParseMessage(_internal_mutable_int64_list(), ptr);
2553 CHK_(ptr);
2554 } else {
2555 goto handle_unusual;
2556 }
2557 continue;
2558 // .tensorflow.CollectionDef.FloatList float_list = 4;
2559 case 4:
2560 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2561 ptr = ctx->ParseMessage(_internal_mutable_float_list(), ptr);
2562 CHK_(ptr);
2563 } else {
2564 goto handle_unusual;
2565 }
2566 continue;
2567 // .tensorflow.CollectionDef.AnyList any_list = 5;
2568 case 5:
2569 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2570 ptr = ctx->ParseMessage(_internal_mutable_any_list(), ptr);
2571 CHK_(ptr);
2572 } else {
2573 goto handle_unusual;
2574 }
2575 continue;
2576 default:
2577 goto handle_unusual;
2578 } // switch
2579 handle_unusual:
2580 if ((tag == 0) || ((tag & 7) == 4)) {
2581 CHK_(ptr);
2582 ctx->SetLastTag(tag);
2583 goto message_done;
2584 }
2585 ptr = UnknownFieldParse(
2586 tag,
2587 _internal_metadata_.mutable_unknown_fields<std::string>(),
2588 ptr, ctx);
2589 CHK_(ptr != nullptr);
2590 } // while
2591 message_done:
2592 return ptr;
2593 failure:
2594 ptr = nullptr;
2595 goto message_done;
2596 #undef CHK_
2597 }
2598
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2599 ::uint8_t* CollectionDef::_InternalSerialize(
2600 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2601 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CollectionDef)
2602 ::uint32_t cached_has_bits = 0;
2603 (void) cached_has_bits;
2604
2605 // .tensorflow.CollectionDef.NodeList node_list = 1;
2606 if (_internal_has_node_list()) {
2607 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2608 InternalWriteMessage(1, _Internal::node_list(this),
2609 _Internal::node_list(this).GetCachedSize(), target, stream);
2610 }
2611
2612 // .tensorflow.CollectionDef.BytesList bytes_list = 2;
2613 if (_internal_has_bytes_list()) {
2614 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2615 InternalWriteMessage(2, _Internal::bytes_list(this),
2616 _Internal::bytes_list(this).GetCachedSize(), target, stream);
2617 }
2618
2619 // .tensorflow.CollectionDef.Int64List int64_list = 3;
2620 if (_internal_has_int64_list()) {
2621 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2622 InternalWriteMessage(3, _Internal::int64_list(this),
2623 _Internal::int64_list(this).GetCachedSize(), target, stream);
2624 }
2625
2626 // .tensorflow.CollectionDef.FloatList float_list = 4;
2627 if (_internal_has_float_list()) {
2628 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2629 InternalWriteMessage(4, _Internal::float_list(this),
2630 _Internal::float_list(this).GetCachedSize(), target, stream);
2631 }
2632
2633 // .tensorflow.CollectionDef.AnyList any_list = 5;
2634 if (_internal_has_any_list()) {
2635 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2636 InternalWriteMessage(5, _Internal::any_list(this),
2637 _Internal::any_list(this).GetCachedSize(), target, stream);
2638 }
2639
2640 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2641 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2642 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2643 }
2644 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CollectionDef)
2645 return target;
2646 }
2647
ByteSizeLong() const2648 size_t CollectionDef::ByteSizeLong() const {
2649 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CollectionDef)
2650 size_t total_size = 0;
2651
2652 switch (kind_case()) {
2653 // .tensorflow.CollectionDef.NodeList node_list = 1;
2654 case kNodeList: {
2655 total_size += 1 +
2656 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2657 *_impl_.kind_.node_list_);
2658 break;
2659 }
2660 // .tensorflow.CollectionDef.BytesList bytes_list = 2;
2661 case kBytesList: {
2662 total_size += 1 +
2663 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2664 *_impl_.kind_.bytes_list_);
2665 break;
2666 }
2667 // .tensorflow.CollectionDef.Int64List int64_list = 3;
2668 case kInt64List: {
2669 total_size += 1 +
2670 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2671 *_impl_.kind_.int64_list_);
2672 break;
2673 }
2674 // .tensorflow.CollectionDef.FloatList float_list = 4;
2675 case kFloatList: {
2676 total_size += 1 +
2677 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2678 *_impl_.kind_.float_list_);
2679 break;
2680 }
2681 // .tensorflow.CollectionDef.AnyList any_list = 5;
2682 case kAnyList: {
2683 total_size += 1 +
2684 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2685 *_impl_.kind_.any_list_);
2686 break;
2687 }
2688 case KIND_NOT_SET: {
2689 break;
2690 }
2691 }
2692 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2693 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2694 }
2695 int cached_size = ::_pbi::ToCachedSize(total_size);
2696 SetCachedSize(cached_size);
2697 return total_size;
2698 }
2699
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2700 void CollectionDef::CheckTypeAndMergeFrom(
2701 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2702 MergeFrom(*::_pbi::DownCast<const CollectionDef*>(
2703 &from));
2704 }
2705
MergeFrom(const CollectionDef & from)2706 void CollectionDef::MergeFrom(const CollectionDef& from) {
2707 CollectionDef* const _this = this;
2708 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CollectionDef)
2709 GOOGLE_DCHECK_NE(&from, _this);
2710 ::uint32_t cached_has_bits = 0;
2711 (void) cached_has_bits;
2712
2713 switch (from.kind_case()) {
2714 case kNodeList: {
2715 _this->_internal_mutable_node_list()->::tensorflow::CollectionDef_NodeList::MergeFrom(
2716 from._internal_node_list());
2717 break;
2718 }
2719 case kBytesList: {
2720 _this->_internal_mutable_bytes_list()->::tensorflow::CollectionDef_BytesList::MergeFrom(
2721 from._internal_bytes_list());
2722 break;
2723 }
2724 case kInt64List: {
2725 _this->_internal_mutable_int64_list()->::tensorflow::CollectionDef_Int64List::MergeFrom(
2726 from._internal_int64_list());
2727 break;
2728 }
2729 case kFloatList: {
2730 _this->_internal_mutable_float_list()->::tensorflow::CollectionDef_FloatList::MergeFrom(
2731 from._internal_float_list());
2732 break;
2733 }
2734 case kAnyList: {
2735 _this->_internal_mutable_any_list()->::tensorflow::CollectionDef_AnyList::MergeFrom(
2736 from._internal_any_list());
2737 break;
2738 }
2739 case KIND_NOT_SET: {
2740 break;
2741 }
2742 }
2743 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2744 }
2745
CopyFrom(const CollectionDef & from)2746 void CollectionDef::CopyFrom(const CollectionDef& from) {
2747 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CollectionDef)
2748 if (&from == this) return;
2749 Clear();
2750 MergeFrom(from);
2751 }
2752
IsInitialized() const2753 bool CollectionDef::IsInitialized() const {
2754 return true;
2755 }
2756
InternalSwap(CollectionDef * other)2757 void CollectionDef::InternalSwap(CollectionDef* other) {
2758 using std::swap;
2759 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2760 swap(_impl_.kind_, other->_impl_.kind_);
2761 swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
2762 }
2763
GetTypeName() const2764 std::string CollectionDef::GetTypeName() const {
2765 return "tensorflow.CollectionDef";
2766 }
2767
2768
2769 // ===================================================================
2770
2771 class TensorInfo_CooSparse::_Internal {
2772 public:
2773 };
2774
TensorInfo_CooSparse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2775 TensorInfo_CooSparse::TensorInfo_CooSparse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2776 bool is_message_owned)
2777 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2778 SharedCtor(arena, is_message_owned);
2779 // @@protoc_insertion_point(arena_constructor:tensorflow.TensorInfo.CooSparse)
2780 }
TensorInfo_CooSparse(const TensorInfo_CooSparse & from)2781 TensorInfo_CooSparse::TensorInfo_CooSparse(const TensorInfo_CooSparse& from)
2782 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2783 TensorInfo_CooSparse* const _this = this; (void)_this;
2784 new (&_impl_) Impl_{
2785 decltype(_impl_.values_tensor_name_){}
2786 , decltype(_impl_.indices_tensor_name_){}
2787 , decltype(_impl_.dense_shape_tensor_name_){}
2788 , /*decltype(_impl_._cached_size_)*/{}};
2789
2790 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2791 _impl_.values_tensor_name_.InitDefault();
2792 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2793 _impl_.values_tensor_name_.Set("", GetArenaForAllocation());
2794 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2795 if (!from._internal_values_tensor_name().empty()) {
2796 _this->_impl_.values_tensor_name_.Set(from._internal_values_tensor_name(),
2797 _this->GetArenaForAllocation());
2798 }
2799 _impl_.indices_tensor_name_.InitDefault();
2800 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2801 _impl_.indices_tensor_name_.Set("", GetArenaForAllocation());
2802 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2803 if (!from._internal_indices_tensor_name().empty()) {
2804 _this->_impl_.indices_tensor_name_.Set(from._internal_indices_tensor_name(),
2805 _this->GetArenaForAllocation());
2806 }
2807 _impl_.dense_shape_tensor_name_.InitDefault();
2808 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2809 _impl_.dense_shape_tensor_name_.Set("", GetArenaForAllocation());
2810 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2811 if (!from._internal_dense_shape_tensor_name().empty()) {
2812 _this->_impl_.dense_shape_tensor_name_.Set(from._internal_dense_shape_tensor_name(),
2813 _this->GetArenaForAllocation());
2814 }
2815 // @@protoc_insertion_point(copy_constructor:tensorflow.TensorInfo.CooSparse)
2816 }
2817
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2818 inline void TensorInfo_CooSparse::SharedCtor(
2819 ::_pb::Arena* arena, bool is_message_owned) {
2820 (void)arena;
2821 (void)is_message_owned;
2822 new (&_impl_) Impl_{
2823 decltype(_impl_.values_tensor_name_){}
2824 , decltype(_impl_.indices_tensor_name_){}
2825 , decltype(_impl_.dense_shape_tensor_name_){}
2826 , /*decltype(_impl_._cached_size_)*/{}
2827 };
2828 _impl_.values_tensor_name_.InitDefault();
2829 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2830 _impl_.values_tensor_name_.Set("", GetArenaForAllocation());
2831 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2832 _impl_.indices_tensor_name_.InitDefault();
2833 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2834 _impl_.indices_tensor_name_.Set("", GetArenaForAllocation());
2835 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2836 _impl_.dense_shape_tensor_name_.InitDefault();
2837 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2838 _impl_.dense_shape_tensor_name_.Set("", GetArenaForAllocation());
2839 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2840 }
2841
~TensorInfo_CooSparse()2842 TensorInfo_CooSparse::~TensorInfo_CooSparse() {
2843 // @@protoc_insertion_point(destructor:tensorflow.TensorInfo.CooSparse)
2844 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2845 (void)arena;
2846 return;
2847 }
2848 SharedDtor();
2849 }
2850
SharedDtor()2851 inline void TensorInfo_CooSparse::SharedDtor() {
2852 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2853 _impl_.values_tensor_name_.Destroy();
2854 _impl_.indices_tensor_name_.Destroy();
2855 _impl_.dense_shape_tensor_name_.Destroy();
2856 }
2857
SetCachedSize(int size) const2858 void TensorInfo_CooSparse::SetCachedSize(int size) const {
2859 _impl_._cached_size_.Set(size);
2860 }
2861
Clear()2862 void TensorInfo_CooSparse::Clear() {
2863 // @@protoc_insertion_point(message_clear_start:tensorflow.TensorInfo.CooSparse)
2864 ::uint32_t cached_has_bits = 0;
2865 // Prevent compiler warnings about cached_has_bits being unused
2866 (void) cached_has_bits;
2867
2868 _impl_.values_tensor_name_.ClearToEmpty();
2869 _impl_.indices_tensor_name_.ClearToEmpty();
2870 _impl_.dense_shape_tensor_name_.ClearToEmpty();
2871 _internal_metadata_.Clear<std::string>();
2872 }
2873
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2874 const char* TensorInfo_CooSparse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2875 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2876 while (!ctx->Done(&ptr)) {
2877 ::uint32_t tag;
2878 ptr = ::_pbi::ReadTag(ptr, &tag);
2879 switch (tag >> 3) {
2880 // string values_tensor_name = 1;
2881 case 1:
2882 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2883 auto str = _internal_mutable_values_tensor_name();
2884 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2885 CHK_(ptr);
2886 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2887 } else {
2888 goto handle_unusual;
2889 }
2890 continue;
2891 // string indices_tensor_name = 2;
2892 case 2:
2893 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2894 auto str = _internal_mutable_indices_tensor_name();
2895 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2896 CHK_(ptr);
2897 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2898 } else {
2899 goto handle_unusual;
2900 }
2901 continue;
2902 // string dense_shape_tensor_name = 3;
2903 case 3:
2904 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2905 auto str = _internal_mutable_dense_shape_tensor_name();
2906 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2907 CHK_(ptr);
2908 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2909 } else {
2910 goto handle_unusual;
2911 }
2912 continue;
2913 default:
2914 goto handle_unusual;
2915 } // switch
2916 handle_unusual:
2917 if ((tag == 0) || ((tag & 7) == 4)) {
2918 CHK_(ptr);
2919 ctx->SetLastTag(tag);
2920 goto message_done;
2921 }
2922 ptr = UnknownFieldParse(
2923 tag,
2924 _internal_metadata_.mutable_unknown_fields<std::string>(),
2925 ptr, ctx);
2926 CHK_(ptr != nullptr);
2927 } // while
2928 message_done:
2929 return ptr;
2930 failure:
2931 ptr = nullptr;
2932 goto message_done;
2933 #undef CHK_
2934 }
2935
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2936 ::uint8_t* TensorInfo_CooSparse::_InternalSerialize(
2937 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2938 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorInfo.CooSparse)
2939 ::uint32_t cached_has_bits = 0;
2940 (void) cached_has_bits;
2941
2942 // string values_tensor_name = 1;
2943 if (!this->_internal_values_tensor_name().empty()) {
2944 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2945 this->_internal_values_tensor_name().data(), static_cast<int>(this->_internal_values_tensor_name().length()),
2946 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2947 "tensorflow.TensorInfo.CooSparse.values_tensor_name");
2948 target = stream->WriteStringMaybeAliased(
2949 1, this->_internal_values_tensor_name(), target);
2950 }
2951
2952 // string indices_tensor_name = 2;
2953 if (!this->_internal_indices_tensor_name().empty()) {
2954 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2955 this->_internal_indices_tensor_name().data(), static_cast<int>(this->_internal_indices_tensor_name().length()),
2956 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2957 "tensorflow.TensorInfo.CooSparse.indices_tensor_name");
2958 target = stream->WriteStringMaybeAliased(
2959 2, this->_internal_indices_tensor_name(), target);
2960 }
2961
2962 // string dense_shape_tensor_name = 3;
2963 if (!this->_internal_dense_shape_tensor_name().empty()) {
2964 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2965 this->_internal_dense_shape_tensor_name().data(), static_cast<int>(this->_internal_dense_shape_tensor_name().length()),
2966 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2967 "tensorflow.TensorInfo.CooSparse.dense_shape_tensor_name");
2968 target = stream->WriteStringMaybeAliased(
2969 3, this->_internal_dense_shape_tensor_name(), target);
2970 }
2971
2972 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2973 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2974 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2975 }
2976 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorInfo.CooSparse)
2977 return target;
2978 }
2979
ByteSizeLong() const2980 size_t TensorInfo_CooSparse::ByteSizeLong() const {
2981 // @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorInfo.CooSparse)
2982 size_t total_size = 0;
2983
2984 ::uint32_t cached_has_bits = 0;
2985 // Prevent compiler warnings about cached_has_bits being unused
2986 (void) cached_has_bits;
2987
2988 // string values_tensor_name = 1;
2989 if (!this->_internal_values_tensor_name().empty()) {
2990 total_size += 1 +
2991 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2992 this->_internal_values_tensor_name());
2993 }
2994
2995 // string indices_tensor_name = 2;
2996 if (!this->_internal_indices_tensor_name().empty()) {
2997 total_size += 1 +
2998 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2999 this->_internal_indices_tensor_name());
3000 }
3001
3002 // string dense_shape_tensor_name = 3;
3003 if (!this->_internal_dense_shape_tensor_name().empty()) {
3004 total_size += 1 +
3005 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3006 this->_internal_dense_shape_tensor_name());
3007 }
3008
3009 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3010 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3011 }
3012 int cached_size = ::_pbi::ToCachedSize(total_size);
3013 SetCachedSize(cached_size);
3014 return total_size;
3015 }
3016
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3017 void TensorInfo_CooSparse::CheckTypeAndMergeFrom(
3018 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3019 MergeFrom(*::_pbi::DownCast<const TensorInfo_CooSparse*>(
3020 &from));
3021 }
3022
MergeFrom(const TensorInfo_CooSparse & from)3023 void TensorInfo_CooSparse::MergeFrom(const TensorInfo_CooSparse& from) {
3024 TensorInfo_CooSparse* const _this = this;
3025 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorInfo.CooSparse)
3026 GOOGLE_DCHECK_NE(&from, _this);
3027 ::uint32_t cached_has_bits = 0;
3028 (void) cached_has_bits;
3029
3030 if (!from._internal_values_tensor_name().empty()) {
3031 _this->_internal_set_values_tensor_name(from._internal_values_tensor_name());
3032 }
3033 if (!from._internal_indices_tensor_name().empty()) {
3034 _this->_internal_set_indices_tensor_name(from._internal_indices_tensor_name());
3035 }
3036 if (!from._internal_dense_shape_tensor_name().empty()) {
3037 _this->_internal_set_dense_shape_tensor_name(from._internal_dense_shape_tensor_name());
3038 }
3039 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3040 }
3041
CopyFrom(const TensorInfo_CooSparse & from)3042 void TensorInfo_CooSparse::CopyFrom(const TensorInfo_CooSparse& from) {
3043 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorInfo.CooSparse)
3044 if (&from == this) return;
3045 Clear();
3046 MergeFrom(from);
3047 }
3048
IsInitialized() const3049 bool TensorInfo_CooSparse::IsInitialized() const {
3050 return true;
3051 }
3052
InternalSwap(TensorInfo_CooSparse * other)3053 void TensorInfo_CooSparse::InternalSwap(TensorInfo_CooSparse* other) {
3054 using std::swap;
3055 auto* lhs_arena = GetArenaForAllocation();
3056 auto* rhs_arena = other->GetArenaForAllocation();
3057 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3058 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3059 &_impl_.values_tensor_name_, lhs_arena,
3060 &other->_impl_.values_tensor_name_, rhs_arena
3061 );
3062 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3063 &_impl_.indices_tensor_name_, lhs_arena,
3064 &other->_impl_.indices_tensor_name_, rhs_arena
3065 );
3066 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3067 &_impl_.dense_shape_tensor_name_, lhs_arena,
3068 &other->_impl_.dense_shape_tensor_name_, rhs_arena
3069 );
3070 }
3071
GetTypeName() const3072 std::string TensorInfo_CooSparse::GetTypeName() const {
3073 return "tensorflow.TensorInfo.CooSparse";
3074 }
3075
3076
3077 // ===================================================================
3078
3079 class TensorInfo_CompositeTensor::_Internal {
3080 public:
3081 static const ::tensorflow::TypeSpecProto& type_spec(const TensorInfo_CompositeTensor* msg);
3082 };
3083
3084 const ::tensorflow::TypeSpecProto&
type_spec(const TensorInfo_CompositeTensor * msg)3085 TensorInfo_CompositeTensor::_Internal::type_spec(const TensorInfo_CompositeTensor* msg) {
3086 return *msg->_impl_.type_spec_;
3087 }
clear_type_spec()3088 void TensorInfo_CompositeTensor::clear_type_spec() {
3089 if (GetArenaForAllocation() == nullptr && _impl_.type_spec_ != nullptr) {
3090 delete _impl_.type_spec_;
3091 }
3092 _impl_.type_spec_ = nullptr;
3093 }
TensorInfo_CompositeTensor(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3094 TensorInfo_CompositeTensor::TensorInfo_CompositeTensor(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3095 bool is_message_owned)
3096 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3097 SharedCtor(arena, is_message_owned);
3098 // @@protoc_insertion_point(arena_constructor:tensorflow.TensorInfo.CompositeTensor)
3099 }
TensorInfo_CompositeTensor(const TensorInfo_CompositeTensor & from)3100 TensorInfo_CompositeTensor::TensorInfo_CompositeTensor(const TensorInfo_CompositeTensor& from)
3101 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3102 TensorInfo_CompositeTensor* const _this = this; (void)_this;
3103 new (&_impl_) Impl_{
3104 decltype(_impl_.components_){from._impl_.components_}
3105 , decltype(_impl_.type_spec_){nullptr}
3106 , /*decltype(_impl_._cached_size_)*/{}};
3107
3108 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3109 if (from._internal_has_type_spec()) {
3110 _this->_impl_.type_spec_ = new ::tensorflow::TypeSpecProto(*from._impl_.type_spec_);
3111 }
3112 // @@protoc_insertion_point(copy_constructor:tensorflow.TensorInfo.CompositeTensor)
3113 }
3114
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3115 inline void TensorInfo_CompositeTensor::SharedCtor(
3116 ::_pb::Arena* arena, bool is_message_owned) {
3117 (void)arena;
3118 (void)is_message_owned;
3119 new (&_impl_) Impl_{
3120 decltype(_impl_.components_){arena}
3121 , decltype(_impl_.type_spec_){nullptr}
3122 , /*decltype(_impl_._cached_size_)*/{}
3123 };
3124 }
3125
~TensorInfo_CompositeTensor()3126 TensorInfo_CompositeTensor::~TensorInfo_CompositeTensor() {
3127 // @@protoc_insertion_point(destructor:tensorflow.TensorInfo.CompositeTensor)
3128 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3129 (void)arena;
3130 return;
3131 }
3132 SharedDtor();
3133 }
3134
SharedDtor()3135 inline void TensorInfo_CompositeTensor::SharedDtor() {
3136 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3137 _impl_.components_.~RepeatedPtrField();
3138 if (this != internal_default_instance()) delete _impl_.type_spec_;
3139 }
3140
SetCachedSize(int size) const3141 void TensorInfo_CompositeTensor::SetCachedSize(int size) const {
3142 _impl_._cached_size_.Set(size);
3143 }
3144
Clear()3145 void TensorInfo_CompositeTensor::Clear() {
3146 // @@protoc_insertion_point(message_clear_start:tensorflow.TensorInfo.CompositeTensor)
3147 ::uint32_t cached_has_bits = 0;
3148 // Prevent compiler warnings about cached_has_bits being unused
3149 (void) cached_has_bits;
3150
3151 _impl_.components_.Clear();
3152 if (GetArenaForAllocation() == nullptr && _impl_.type_spec_ != nullptr) {
3153 delete _impl_.type_spec_;
3154 }
3155 _impl_.type_spec_ = nullptr;
3156 _internal_metadata_.Clear<std::string>();
3157 }
3158
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3159 const char* TensorInfo_CompositeTensor::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3160 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3161 while (!ctx->Done(&ptr)) {
3162 ::uint32_t tag;
3163 ptr = ::_pbi::ReadTag(ptr, &tag);
3164 switch (tag >> 3) {
3165 // .tensorflow.TypeSpecProto type_spec = 1;
3166 case 1:
3167 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3168 ptr = ctx->ParseMessage(_internal_mutable_type_spec(), ptr);
3169 CHK_(ptr);
3170 } else {
3171 goto handle_unusual;
3172 }
3173 continue;
3174 // repeated .tensorflow.TensorInfo components = 2;
3175 case 2:
3176 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3177 ptr -= 1;
3178 do {
3179 ptr += 1;
3180 ptr = ctx->ParseMessage(_internal_add_components(), ptr);
3181 CHK_(ptr);
3182 if (!ctx->DataAvailable(ptr)) break;
3183 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
3184 } else {
3185 goto handle_unusual;
3186 }
3187 continue;
3188 default:
3189 goto handle_unusual;
3190 } // switch
3191 handle_unusual:
3192 if ((tag == 0) || ((tag & 7) == 4)) {
3193 CHK_(ptr);
3194 ctx->SetLastTag(tag);
3195 goto message_done;
3196 }
3197 ptr = UnknownFieldParse(
3198 tag,
3199 _internal_metadata_.mutable_unknown_fields<std::string>(),
3200 ptr, ctx);
3201 CHK_(ptr != nullptr);
3202 } // while
3203 message_done:
3204 return ptr;
3205 failure:
3206 ptr = nullptr;
3207 goto message_done;
3208 #undef CHK_
3209 }
3210
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3211 ::uint8_t* TensorInfo_CompositeTensor::_InternalSerialize(
3212 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3213 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorInfo.CompositeTensor)
3214 ::uint32_t cached_has_bits = 0;
3215 (void) cached_has_bits;
3216
3217 // .tensorflow.TypeSpecProto type_spec = 1;
3218 if (this->_internal_has_type_spec()) {
3219 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3220 InternalWriteMessage(1, _Internal::type_spec(this),
3221 _Internal::type_spec(this).GetCachedSize(), target, stream);
3222 }
3223
3224 // repeated .tensorflow.TensorInfo components = 2;
3225 for (unsigned i = 0,
3226 n = static_cast<unsigned>(this->_internal_components_size()); i < n; i++) {
3227 const auto& repfield = this->_internal_components(i);
3228 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3229 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
3230 }
3231
3232 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3233 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3234 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3235 }
3236 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorInfo.CompositeTensor)
3237 return target;
3238 }
3239
ByteSizeLong() const3240 size_t TensorInfo_CompositeTensor::ByteSizeLong() const {
3241 // @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorInfo.CompositeTensor)
3242 size_t total_size = 0;
3243
3244 ::uint32_t cached_has_bits = 0;
3245 // Prevent compiler warnings about cached_has_bits being unused
3246 (void) cached_has_bits;
3247
3248 // repeated .tensorflow.TensorInfo components = 2;
3249 total_size += 1UL * this->_internal_components_size();
3250 for (const auto& msg : this->_impl_.components_) {
3251 total_size +=
3252 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3253 }
3254
3255 // .tensorflow.TypeSpecProto type_spec = 1;
3256 if (this->_internal_has_type_spec()) {
3257 total_size += 1 +
3258 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3259 *_impl_.type_spec_);
3260 }
3261
3262 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3263 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3264 }
3265 int cached_size = ::_pbi::ToCachedSize(total_size);
3266 SetCachedSize(cached_size);
3267 return total_size;
3268 }
3269
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3270 void TensorInfo_CompositeTensor::CheckTypeAndMergeFrom(
3271 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3272 MergeFrom(*::_pbi::DownCast<const TensorInfo_CompositeTensor*>(
3273 &from));
3274 }
3275
MergeFrom(const TensorInfo_CompositeTensor & from)3276 void TensorInfo_CompositeTensor::MergeFrom(const TensorInfo_CompositeTensor& from) {
3277 TensorInfo_CompositeTensor* const _this = this;
3278 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorInfo.CompositeTensor)
3279 GOOGLE_DCHECK_NE(&from, _this);
3280 ::uint32_t cached_has_bits = 0;
3281 (void) cached_has_bits;
3282
3283 _this->_impl_.components_.MergeFrom(from._impl_.components_);
3284 if (from._internal_has_type_spec()) {
3285 _this->_internal_mutable_type_spec()->::tensorflow::TypeSpecProto::MergeFrom(
3286 from._internal_type_spec());
3287 }
3288 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3289 }
3290
CopyFrom(const TensorInfo_CompositeTensor & from)3291 void TensorInfo_CompositeTensor::CopyFrom(const TensorInfo_CompositeTensor& from) {
3292 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorInfo.CompositeTensor)
3293 if (&from == this) return;
3294 Clear();
3295 MergeFrom(from);
3296 }
3297
IsInitialized() const3298 bool TensorInfo_CompositeTensor::IsInitialized() const {
3299 return true;
3300 }
3301
InternalSwap(TensorInfo_CompositeTensor * other)3302 void TensorInfo_CompositeTensor::InternalSwap(TensorInfo_CompositeTensor* other) {
3303 using std::swap;
3304 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3305 _impl_.components_.InternalSwap(&other->_impl_.components_);
3306 swap(_impl_.type_spec_, other->_impl_.type_spec_);
3307 }
3308
GetTypeName() const3309 std::string TensorInfo_CompositeTensor::GetTypeName() const {
3310 return "tensorflow.TensorInfo.CompositeTensor";
3311 }
3312
3313
3314 // ===================================================================
3315
3316 class TensorInfo::_Internal {
3317 public:
3318 static const ::tensorflow::TensorInfo_CooSparse& coo_sparse(const TensorInfo* msg);
3319 static const ::tensorflow::TensorInfo_CompositeTensor& composite_tensor(const TensorInfo* msg);
3320 static const ::tensorflow::TensorShapeProto& tensor_shape(const TensorInfo* msg);
3321 };
3322
3323 const ::tensorflow::TensorInfo_CooSparse&
coo_sparse(const TensorInfo * msg)3324 TensorInfo::_Internal::coo_sparse(const TensorInfo* msg) {
3325 return *msg->_impl_.encoding_.coo_sparse_;
3326 }
3327 const ::tensorflow::TensorInfo_CompositeTensor&
composite_tensor(const TensorInfo * msg)3328 TensorInfo::_Internal::composite_tensor(const TensorInfo* msg) {
3329 return *msg->_impl_.encoding_.composite_tensor_;
3330 }
3331 const ::tensorflow::TensorShapeProto&
tensor_shape(const TensorInfo * msg)3332 TensorInfo::_Internal::tensor_shape(const TensorInfo* msg) {
3333 return *msg->_impl_.tensor_shape_;
3334 }
set_allocated_coo_sparse(::tensorflow::TensorInfo_CooSparse * coo_sparse)3335 void TensorInfo::set_allocated_coo_sparse(::tensorflow::TensorInfo_CooSparse* coo_sparse) {
3336 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
3337 clear_encoding();
3338 if (coo_sparse) {
3339 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
3340 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(coo_sparse);
3341 if (message_arena != submessage_arena) {
3342 coo_sparse = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
3343 message_arena, coo_sparse, submessage_arena);
3344 }
3345 set_has_coo_sparse();
3346 _impl_.encoding_.coo_sparse_ = coo_sparse;
3347 }
3348 // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorInfo.coo_sparse)
3349 }
set_allocated_composite_tensor(::tensorflow::TensorInfo_CompositeTensor * composite_tensor)3350 void TensorInfo::set_allocated_composite_tensor(::tensorflow::TensorInfo_CompositeTensor* composite_tensor) {
3351 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
3352 clear_encoding();
3353 if (composite_tensor) {
3354 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
3355 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(composite_tensor);
3356 if (message_arena != submessage_arena) {
3357 composite_tensor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
3358 message_arena, composite_tensor, submessage_arena);
3359 }
3360 set_has_composite_tensor();
3361 _impl_.encoding_.composite_tensor_ = composite_tensor;
3362 }
3363 // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorInfo.composite_tensor)
3364 }
clear_tensor_shape()3365 void TensorInfo::clear_tensor_shape() {
3366 if (GetArenaForAllocation() == nullptr && _impl_.tensor_shape_ != nullptr) {
3367 delete _impl_.tensor_shape_;
3368 }
3369 _impl_.tensor_shape_ = nullptr;
3370 }
TensorInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3371 TensorInfo::TensorInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3372 bool is_message_owned)
3373 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3374 SharedCtor(arena, is_message_owned);
3375 // @@protoc_insertion_point(arena_constructor:tensorflow.TensorInfo)
3376 }
TensorInfo(const TensorInfo & from)3377 TensorInfo::TensorInfo(const TensorInfo& from)
3378 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3379 TensorInfo* const _this = this; (void)_this;
3380 new (&_impl_) Impl_{
3381 decltype(_impl_.tensor_shape_){nullptr}
3382 , decltype(_impl_.dtype_){}
3383 , decltype(_impl_.encoding_){}
3384 , /*decltype(_impl_._cached_size_)*/{}
3385 , /*decltype(_impl_._oneof_case_)*/{}};
3386
3387 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3388 if (from._internal_has_tensor_shape()) {
3389 _this->_impl_.tensor_shape_ = new ::tensorflow::TensorShapeProto(*from._impl_.tensor_shape_);
3390 }
3391 _this->_impl_.dtype_ = from._impl_.dtype_;
3392 clear_has_encoding();
3393 switch (from.encoding_case()) {
3394 case kName: {
3395 _this->_internal_set_name(from._internal_name());
3396 break;
3397 }
3398 case kCooSparse: {
3399 _this->_internal_mutable_coo_sparse()->::tensorflow::TensorInfo_CooSparse::MergeFrom(
3400 from._internal_coo_sparse());
3401 break;
3402 }
3403 case kCompositeTensor: {
3404 _this->_internal_mutable_composite_tensor()->::tensorflow::TensorInfo_CompositeTensor::MergeFrom(
3405 from._internal_composite_tensor());
3406 break;
3407 }
3408 case ENCODING_NOT_SET: {
3409 break;
3410 }
3411 }
3412 // @@protoc_insertion_point(copy_constructor:tensorflow.TensorInfo)
3413 }
3414
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3415 inline void TensorInfo::SharedCtor(
3416 ::_pb::Arena* arena, bool is_message_owned) {
3417 (void)arena;
3418 (void)is_message_owned;
3419 new (&_impl_) Impl_{
3420 decltype(_impl_.tensor_shape_){nullptr}
3421 , decltype(_impl_.dtype_){0}
3422 , decltype(_impl_.encoding_){}
3423 , /*decltype(_impl_._cached_size_)*/{}
3424 , /*decltype(_impl_._oneof_case_)*/{}
3425 };
3426 clear_has_encoding();
3427 }
3428
~TensorInfo()3429 TensorInfo::~TensorInfo() {
3430 // @@protoc_insertion_point(destructor:tensorflow.TensorInfo)
3431 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3432 (void)arena;
3433 return;
3434 }
3435 SharedDtor();
3436 }
3437
SharedDtor()3438 inline void TensorInfo::SharedDtor() {
3439 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3440 if (this != internal_default_instance()) delete _impl_.tensor_shape_;
3441 if (has_encoding()) {
3442 clear_encoding();
3443 }
3444 }
3445
SetCachedSize(int size) const3446 void TensorInfo::SetCachedSize(int size) const {
3447 _impl_._cached_size_.Set(size);
3448 }
3449
clear_encoding()3450 void TensorInfo::clear_encoding() {
3451 // @@protoc_insertion_point(one_of_clear_start:tensorflow.TensorInfo)
3452 switch (encoding_case()) {
3453 case kName: {
3454 _impl_.encoding_.name_.Destroy();
3455 break;
3456 }
3457 case kCooSparse: {
3458 if (GetArenaForAllocation() == nullptr) {
3459 delete _impl_.encoding_.coo_sparse_;
3460 }
3461 break;
3462 }
3463 case kCompositeTensor: {
3464 if (GetArenaForAllocation() == nullptr) {
3465 delete _impl_.encoding_.composite_tensor_;
3466 }
3467 break;
3468 }
3469 case ENCODING_NOT_SET: {
3470 break;
3471 }
3472 }
3473 _impl_._oneof_case_[0] = ENCODING_NOT_SET;
3474 }
3475
3476
Clear()3477 void TensorInfo::Clear() {
3478 // @@protoc_insertion_point(message_clear_start:tensorflow.TensorInfo)
3479 ::uint32_t cached_has_bits = 0;
3480 // Prevent compiler warnings about cached_has_bits being unused
3481 (void) cached_has_bits;
3482
3483 if (GetArenaForAllocation() == nullptr && _impl_.tensor_shape_ != nullptr) {
3484 delete _impl_.tensor_shape_;
3485 }
3486 _impl_.tensor_shape_ = nullptr;
3487 _impl_.dtype_ = 0;
3488 clear_encoding();
3489 _internal_metadata_.Clear<std::string>();
3490 }
3491
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3492 const char* TensorInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3493 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3494 while (!ctx->Done(&ptr)) {
3495 ::uint32_t tag;
3496 ptr = ::_pbi::ReadTag(ptr, &tag);
3497 switch (tag >> 3) {
3498 // string name = 1;
3499 case 1:
3500 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3501 auto str = _internal_mutable_name();
3502 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3503 CHK_(ptr);
3504 CHK_(::_pbi::VerifyUTF8(str, nullptr));
3505 } else {
3506 goto handle_unusual;
3507 }
3508 continue;
3509 // .tensorflow.DataType dtype = 2;
3510 case 2:
3511 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3512 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3513 CHK_(ptr);
3514 _internal_set_dtype(static_cast<::tensorflow::DataType>(val));
3515 } else {
3516 goto handle_unusual;
3517 }
3518 continue;
3519 // .tensorflow.TensorShapeProto tensor_shape = 3;
3520 case 3:
3521 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
3522 ptr = ctx->ParseMessage(_internal_mutable_tensor_shape(), ptr);
3523 CHK_(ptr);
3524 } else {
3525 goto handle_unusual;
3526 }
3527 continue;
3528 // .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
3529 case 4:
3530 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
3531 ptr = ctx->ParseMessage(_internal_mutable_coo_sparse(), ptr);
3532 CHK_(ptr);
3533 } else {
3534 goto handle_unusual;
3535 }
3536 continue;
3537 // .tensorflow.TensorInfo.CompositeTensor composite_tensor = 5;
3538 case 5:
3539 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
3540 ptr = ctx->ParseMessage(_internal_mutable_composite_tensor(), ptr);
3541 CHK_(ptr);
3542 } else {
3543 goto handle_unusual;
3544 }
3545 continue;
3546 default:
3547 goto handle_unusual;
3548 } // switch
3549 handle_unusual:
3550 if ((tag == 0) || ((tag & 7) == 4)) {
3551 CHK_(ptr);
3552 ctx->SetLastTag(tag);
3553 goto message_done;
3554 }
3555 ptr = UnknownFieldParse(
3556 tag,
3557 _internal_metadata_.mutable_unknown_fields<std::string>(),
3558 ptr, ctx);
3559 CHK_(ptr != nullptr);
3560 } // while
3561 message_done:
3562 return ptr;
3563 failure:
3564 ptr = nullptr;
3565 goto message_done;
3566 #undef CHK_
3567 }
3568
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3569 ::uint8_t* TensorInfo::_InternalSerialize(
3570 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3571 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorInfo)
3572 ::uint32_t cached_has_bits = 0;
3573 (void) cached_has_bits;
3574
3575 // string name = 1;
3576 if (_internal_has_name()) {
3577 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
3578 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
3579 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
3580 "tensorflow.TensorInfo.name");
3581 target = stream->WriteStringMaybeAliased(
3582 1, this->_internal_name(), target);
3583 }
3584
3585 // .tensorflow.DataType dtype = 2;
3586 if (this->_internal_dtype() != 0) {
3587 target = stream->EnsureSpace(target);
3588 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3589 2, this->_internal_dtype(), target);
3590 }
3591
3592 // .tensorflow.TensorShapeProto tensor_shape = 3;
3593 if (this->_internal_has_tensor_shape()) {
3594 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3595 InternalWriteMessage(3, _Internal::tensor_shape(this),
3596 _Internal::tensor_shape(this).GetCachedSize(), target, stream);
3597 }
3598
3599 // .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
3600 if (_internal_has_coo_sparse()) {
3601 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3602 InternalWriteMessage(4, _Internal::coo_sparse(this),
3603 _Internal::coo_sparse(this).GetCachedSize(), target, stream);
3604 }
3605
3606 // .tensorflow.TensorInfo.CompositeTensor composite_tensor = 5;
3607 if (_internal_has_composite_tensor()) {
3608 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3609 InternalWriteMessage(5, _Internal::composite_tensor(this),
3610 _Internal::composite_tensor(this).GetCachedSize(), target, stream);
3611 }
3612
3613 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3614 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3615 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3616 }
3617 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorInfo)
3618 return target;
3619 }
3620
ByteSizeLong() const3621 size_t TensorInfo::ByteSizeLong() const {
3622 // @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorInfo)
3623 size_t total_size = 0;
3624
3625 ::uint32_t cached_has_bits = 0;
3626 // Prevent compiler warnings about cached_has_bits being unused
3627 (void) cached_has_bits;
3628
3629 // .tensorflow.TensorShapeProto tensor_shape = 3;
3630 if (this->_internal_has_tensor_shape()) {
3631 total_size += 1 +
3632 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3633 *_impl_.tensor_shape_);
3634 }
3635
3636 // .tensorflow.DataType dtype = 2;
3637 if (this->_internal_dtype() != 0) {
3638 total_size += 1 +
3639 ::_pbi::WireFormatLite::EnumSize(this->_internal_dtype());
3640 }
3641
3642 switch (encoding_case()) {
3643 // string name = 1;
3644 case kName: {
3645 total_size += 1 +
3646 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3647 this->_internal_name());
3648 break;
3649 }
3650 // .tensorflow.TensorInfo.CooSparse coo_sparse = 4;
3651 case kCooSparse: {
3652 total_size += 1 +
3653 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3654 *_impl_.encoding_.coo_sparse_);
3655 break;
3656 }
3657 // .tensorflow.TensorInfo.CompositeTensor composite_tensor = 5;
3658 case kCompositeTensor: {
3659 total_size += 1 +
3660 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3661 *_impl_.encoding_.composite_tensor_);
3662 break;
3663 }
3664 case ENCODING_NOT_SET: {
3665 break;
3666 }
3667 }
3668 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3669 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3670 }
3671 int cached_size = ::_pbi::ToCachedSize(total_size);
3672 SetCachedSize(cached_size);
3673 return total_size;
3674 }
3675
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3676 void TensorInfo::CheckTypeAndMergeFrom(
3677 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3678 MergeFrom(*::_pbi::DownCast<const TensorInfo*>(
3679 &from));
3680 }
3681
MergeFrom(const TensorInfo & from)3682 void TensorInfo::MergeFrom(const TensorInfo& from) {
3683 TensorInfo* const _this = this;
3684 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorInfo)
3685 GOOGLE_DCHECK_NE(&from, _this);
3686 ::uint32_t cached_has_bits = 0;
3687 (void) cached_has_bits;
3688
3689 if (from._internal_has_tensor_shape()) {
3690 _this->_internal_mutable_tensor_shape()->::tensorflow::TensorShapeProto::MergeFrom(
3691 from._internal_tensor_shape());
3692 }
3693 if (from._internal_dtype() != 0) {
3694 _this->_internal_set_dtype(from._internal_dtype());
3695 }
3696 switch (from.encoding_case()) {
3697 case kName: {
3698 _this->_internal_set_name(from._internal_name());
3699 break;
3700 }
3701 case kCooSparse: {
3702 _this->_internal_mutable_coo_sparse()->::tensorflow::TensorInfo_CooSparse::MergeFrom(
3703 from._internal_coo_sparse());
3704 break;
3705 }
3706 case kCompositeTensor: {
3707 _this->_internal_mutable_composite_tensor()->::tensorflow::TensorInfo_CompositeTensor::MergeFrom(
3708 from._internal_composite_tensor());
3709 break;
3710 }
3711 case ENCODING_NOT_SET: {
3712 break;
3713 }
3714 }
3715 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3716 }
3717
CopyFrom(const TensorInfo & from)3718 void TensorInfo::CopyFrom(const TensorInfo& from) {
3719 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorInfo)
3720 if (&from == this) return;
3721 Clear();
3722 MergeFrom(from);
3723 }
3724
IsInitialized() const3725 bool TensorInfo::IsInitialized() const {
3726 return true;
3727 }
3728
InternalSwap(TensorInfo * other)3729 void TensorInfo::InternalSwap(TensorInfo* other) {
3730 using std::swap;
3731 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3732 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3733 PROTOBUF_FIELD_OFFSET(TensorInfo, _impl_.dtype_)
3734 + sizeof(TensorInfo::_impl_.dtype_) // NOLINT
3735 - PROTOBUF_FIELD_OFFSET(TensorInfo, _impl_.tensor_shape_)>(
3736 reinterpret_cast<char*>(&_impl_.tensor_shape_),
3737 reinterpret_cast<char*>(&other->_impl_.tensor_shape_));
3738 swap(_impl_.encoding_, other->_impl_.encoding_);
3739 swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
3740 }
3741
GetTypeName() const3742 std::string TensorInfo::GetTypeName() const {
3743 return "tensorflow.TensorInfo";
3744 }
3745
3746
3747 // ===================================================================
3748
SignatureDef_InputsEntry_DoNotUse()3749 SignatureDef_InputsEntry_DoNotUse::SignatureDef_InputsEntry_DoNotUse() {}
SignatureDef_InputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)3750 SignatureDef_InputsEntry_DoNotUse::SignatureDef_InputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
3751 : SuperType(arena) {}
MergeFrom(const SignatureDef_InputsEntry_DoNotUse & other)3752 void SignatureDef_InputsEntry_DoNotUse::MergeFrom(const SignatureDef_InputsEntry_DoNotUse& other) {
3753 MergeFromInternal(other);
3754 }
3755
3756 // ===================================================================
3757
SignatureDef_OutputsEntry_DoNotUse()3758 SignatureDef_OutputsEntry_DoNotUse::SignatureDef_OutputsEntry_DoNotUse() {}
SignatureDef_OutputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)3759 SignatureDef_OutputsEntry_DoNotUse::SignatureDef_OutputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
3760 : SuperType(arena) {}
MergeFrom(const SignatureDef_OutputsEntry_DoNotUse & other)3761 void SignatureDef_OutputsEntry_DoNotUse::MergeFrom(const SignatureDef_OutputsEntry_DoNotUse& other) {
3762 MergeFromInternal(other);
3763 }
3764
3765 // ===================================================================
3766
3767 class SignatureDef::_Internal {
3768 public:
3769 };
3770
SignatureDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3771 SignatureDef::SignatureDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3772 bool is_message_owned)
3773 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3774 SharedCtor(arena, is_message_owned);
3775 // @@protoc_insertion_point(arena_constructor:tensorflow.SignatureDef)
3776 }
SignatureDef(const SignatureDef & from)3777 SignatureDef::SignatureDef(const SignatureDef& from)
3778 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3779 SignatureDef* const _this = this; (void)_this;
3780 new (&_impl_) Impl_{
3781 /*decltype(_impl_.inputs_)*/{}
3782 , /*decltype(_impl_.outputs_)*/{}
3783 , decltype(_impl_.method_name_){}
3784 , /*decltype(_impl_._cached_size_)*/{}};
3785
3786 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3787 _this->_impl_.inputs_.MergeFrom(from._impl_.inputs_);
3788 _this->_impl_.outputs_.MergeFrom(from._impl_.outputs_);
3789 _impl_.method_name_.InitDefault();
3790 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3791 _impl_.method_name_.Set("", GetArenaForAllocation());
3792 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3793 if (!from._internal_method_name().empty()) {
3794 _this->_impl_.method_name_.Set(from._internal_method_name(),
3795 _this->GetArenaForAllocation());
3796 }
3797 // @@protoc_insertion_point(copy_constructor:tensorflow.SignatureDef)
3798 }
3799
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3800 inline void SignatureDef::SharedCtor(
3801 ::_pb::Arena* arena, bool is_message_owned) {
3802 (void)arena;
3803 (void)is_message_owned;
3804 new (&_impl_) Impl_{
3805 /*decltype(_impl_.inputs_)*/{::_pbi::ArenaInitialized(), arena}
3806 , /*decltype(_impl_.outputs_)*/{::_pbi::ArenaInitialized(), arena}
3807 , decltype(_impl_.method_name_){}
3808 , /*decltype(_impl_._cached_size_)*/{}
3809 };
3810 _impl_.method_name_.InitDefault();
3811 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3812 _impl_.method_name_.Set("", GetArenaForAllocation());
3813 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3814 }
3815
~SignatureDef()3816 SignatureDef::~SignatureDef() {
3817 // @@protoc_insertion_point(destructor:tensorflow.SignatureDef)
3818 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3819 (void)arena;
3820 return;
3821 }
3822 SharedDtor();
3823 }
3824
SharedDtor()3825 inline void SignatureDef::SharedDtor() {
3826 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3827 _impl_.inputs_.Destruct();
3828 _impl_.inputs_.~MapFieldLite();
3829 _impl_.outputs_.Destruct();
3830 _impl_.outputs_.~MapFieldLite();
3831 _impl_.method_name_.Destroy();
3832 }
3833
SetCachedSize(int size) const3834 void SignatureDef::SetCachedSize(int size) const {
3835 _impl_._cached_size_.Set(size);
3836 }
3837
Clear()3838 void SignatureDef::Clear() {
3839 // @@protoc_insertion_point(message_clear_start:tensorflow.SignatureDef)
3840 ::uint32_t cached_has_bits = 0;
3841 // Prevent compiler warnings about cached_has_bits being unused
3842 (void) cached_has_bits;
3843
3844 _impl_.inputs_.Clear();
3845 _impl_.outputs_.Clear();
3846 _impl_.method_name_.ClearToEmpty();
3847 _internal_metadata_.Clear<std::string>();
3848 }
3849
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3850 const char* SignatureDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3851 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3852 while (!ctx->Done(&ptr)) {
3853 ::uint32_t tag;
3854 ptr = ::_pbi::ReadTag(ptr, &tag);
3855 switch (tag >> 3) {
3856 // map<string, .tensorflow.TensorInfo> inputs = 1;
3857 case 1:
3858 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3859 ptr -= 1;
3860 do {
3861 ptr += 1;
3862 ptr = ctx->ParseMessage(&_impl_.inputs_, ptr);
3863 CHK_(ptr);
3864 if (!ctx->DataAvailable(ptr)) break;
3865 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
3866 } else {
3867 goto handle_unusual;
3868 }
3869 continue;
3870 // map<string, .tensorflow.TensorInfo> outputs = 2;
3871 case 2:
3872 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3873 ptr -= 1;
3874 do {
3875 ptr += 1;
3876 ptr = ctx->ParseMessage(&_impl_.outputs_, ptr);
3877 CHK_(ptr);
3878 if (!ctx->DataAvailable(ptr)) break;
3879 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
3880 } else {
3881 goto handle_unusual;
3882 }
3883 continue;
3884 // string method_name = 3;
3885 case 3:
3886 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
3887 auto str = _internal_mutable_method_name();
3888 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3889 CHK_(ptr);
3890 CHK_(::_pbi::VerifyUTF8(str, nullptr));
3891 } else {
3892 goto handle_unusual;
3893 }
3894 continue;
3895 default:
3896 goto handle_unusual;
3897 } // switch
3898 handle_unusual:
3899 if ((tag == 0) || ((tag & 7) == 4)) {
3900 CHK_(ptr);
3901 ctx->SetLastTag(tag);
3902 goto message_done;
3903 }
3904 ptr = UnknownFieldParse(
3905 tag,
3906 _internal_metadata_.mutable_unknown_fields<std::string>(),
3907 ptr, ctx);
3908 CHK_(ptr != nullptr);
3909 } // while
3910 message_done:
3911 return ptr;
3912 failure:
3913 ptr = nullptr;
3914 goto message_done;
3915 #undef CHK_
3916 }
3917
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3918 ::uint8_t* SignatureDef::_InternalSerialize(
3919 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3920 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SignatureDef)
3921 ::uint32_t cached_has_bits = 0;
3922 (void) cached_has_bits;
3923
3924 // map<string, .tensorflow.TensorInfo> inputs = 1;
3925 if (!this->_internal_inputs().empty()) {
3926 using MapType = ::_pb::Map<std::string, ::tensorflow::TensorInfo>;
3927 using WireHelper = SignatureDef_InputsEntry_DoNotUse::Funcs;
3928 const auto& map_field = this->_internal_inputs();
3929 auto check_utf8 = [](const MapType::value_type& entry) {
3930 (void)entry;
3931 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
3932 entry.first.data(), static_cast<int>(entry.first.length()),
3933 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
3934 "tensorflow.SignatureDef.InputsEntry.key");
3935 };
3936
3937 if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
3938 for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
3939 target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
3940 check_utf8(entry);
3941 }
3942 } else {
3943 for (const auto& entry : map_field) {
3944 target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
3945 check_utf8(entry);
3946 }
3947 }
3948 }
3949
3950 // map<string, .tensorflow.TensorInfo> outputs = 2;
3951 if (!this->_internal_outputs().empty()) {
3952 using MapType = ::_pb::Map<std::string, ::tensorflow::TensorInfo>;
3953 using WireHelper = SignatureDef_OutputsEntry_DoNotUse::Funcs;
3954 const auto& map_field = this->_internal_outputs();
3955 auto check_utf8 = [](const MapType::value_type& entry) {
3956 (void)entry;
3957 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
3958 entry.first.data(), static_cast<int>(entry.first.length()),
3959 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
3960 "tensorflow.SignatureDef.OutputsEntry.key");
3961 };
3962
3963 if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
3964 for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
3965 target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream);
3966 check_utf8(entry);
3967 }
3968 } else {
3969 for (const auto& entry : map_field) {
3970 target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream);
3971 check_utf8(entry);
3972 }
3973 }
3974 }
3975
3976 // string method_name = 3;
3977 if (!this->_internal_method_name().empty()) {
3978 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
3979 this->_internal_method_name().data(), static_cast<int>(this->_internal_method_name().length()),
3980 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
3981 "tensorflow.SignatureDef.method_name");
3982 target = stream->WriteStringMaybeAliased(
3983 3, this->_internal_method_name(), target);
3984 }
3985
3986 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3987 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3988 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3989 }
3990 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SignatureDef)
3991 return target;
3992 }
3993
ByteSizeLong() const3994 size_t SignatureDef::ByteSizeLong() const {
3995 // @@protoc_insertion_point(message_byte_size_start:tensorflow.SignatureDef)
3996 size_t total_size = 0;
3997
3998 ::uint32_t cached_has_bits = 0;
3999 // Prevent compiler warnings about cached_has_bits being unused
4000 (void) cached_has_bits;
4001
4002 // map<string, .tensorflow.TensorInfo> inputs = 1;
4003 total_size += 1 *
4004 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_inputs_size());
4005 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >::const_iterator
4006 it = this->_internal_inputs().begin();
4007 it != this->_internal_inputs().end(); ++it) {
4008 total_size += SignatureDef_InputsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
4009 }
4010
4011 // map<string, .tensorflow.TensorInfo> outputs = 2;
4012 total_size += 1 *
4013 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_outputs_size());
4014 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorInfo >::const_iterator
4015 it = this->_internal_outputs().begin();
4016 it != this->_internal_outputs().end(); ++it) {
4017 total_size += SignatureDef_OutputsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
4018 }
4019
4020 // string method_name = 3;
4021 if (!this->_internal_method_name().empty()) {
4022 total_size += 1 +
4023 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
4024 this->_internal_method_name());
4025 }
4026
4027 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4028 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4029 }
4030 int cached_size = ::_pbi::ToCachedSize(total_size);
4031 SetCachedSize(cached_size);
4032 return total_size;
4033 }
4034
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4035 void SignatureDef::CheckTypeAndMergeFrom(
4036 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4037 MergeFrom(*::_pbi::DownCast<const SignatureDef*>(
4038 &from));
4039 }
4040
MergeFrom(const SignatureDef & from)4041 void SignatureDef::MergeFrom(const SignatureDef& from) {
4042 SignatureDef* const _this = this;
4043 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SignatureDef)
4044 GOOGLE_DCHECK_NE(&from, _this);
4045 ::uint32_t cached_has_bits = 0;
4046 (void) cached_has_bits;
4047
4048 _this->_impl_.inputs_.MergeFrom(from._impl_.inputs_);
4049 _this->_impl_.outputs_.MergeFrom(from._impl_.outputs_);
4050 if (!from._internal_method_name().empty()) {
4051 _this->_internal_set_method_name(from._internal_method_name());
4052 }
4053 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4054 }
4055
CopyFrom(const SignatureDef & from)4056 void SignatureDef::CopyFrom(const SignatureDef& from) {
4057 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SignatureDef)
4058 if (&from == this) return;
4059 Clear();
4060 MergeFrom(from);
4061 }
4062
IsInitialized() const4063 bool SignatureDef::IsInitialized() const {
4064 return true;
4065 }
4066
InternalSwap(SignatureDef * other)4067 void SignatureDef::InternalSwap(SignatureDef* other) {
4068 using std::swap;
4069 auto* lhs_arena = GetArenaForAllocation();
4070 auto* rhs_arena = other->GetArenaForAllocation();
4071 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4072 _impl_.inputs_.InternalSwap(&other->_impl_.inputs_);
4073 _impl_.outputs_.InternalSwap(&other->_impl_.outputs_);
4074 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4075 &_impl_.method_name_, lhs_arena,
4076 &other->_impl_.method_name_, rhs_arena
4077 );
4078 }
4079
GetTypeName() const4080 std::string SignatureDef::GetTypeName() const {
4081 return "tensorflow.SignatureDef";
4082 }
4083
4084
4085 // ===================================================================
4086
4087 class AssetFileDef::_Internal {
4088 public:
4089 static const ::tensorflow::TensorInfo& tensor_info(const AssetFileDef* msg);
4090 };
4091
4092 const ::tensorflow::TensorInfo&
tensor_info(const AssetFileDef * msg)4093 AssetFileDef::_Internal::tensor_info(const AssetFileDef* msg) {
4094 return *msg->_impl_.tensor_info_;
4095 }
AssetFileDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4096 AssetFileDef::AssetFileDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4097 bool is_message_owned)
4098 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4099 SharedCtor(arena, is_message_owned);
4100 // @@protoc_insertion_point(arena_constructor:tensorflow.AssetFileDef)
4101 }
AssetFileDef(const AssetFileDef & from)4102 AssetFileDef::AssetFileDef(const AssetFileDef& from)
4103 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4104 AssetFileDef* const _this = this; (void)_this;
4105 new (&_impl_) Impl_{
4106 decltype(_impl_.filename_){}
4107 , decltype(_impl_.tensor_info_){nullptr}
4108 , /*decltype(_impl_._cached_size_)*/{}};
4109
4110 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4111 _impl_.filename_.InitDefault();
4112 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
4113 _impl_.filename_.Set("", GetArenaForAllocation());
4114 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
4115 if (!from._internal_filename().empty()) {
4116 _this->_impl_.filename_.Set(from._internal_filename(),
4117 _this->GetArenaForAllocation());
4118 }
4119 if (from._internal_has_tensor_info()) {
4120 _this->_impl_.tensor_info_ = new ::tensorflow::TensorInfo(*from._impl_.tensor_info_);
4121 }
4122 // @@protoc_insertion_point(copy_constructor:tensorflow.AssetFileDef)
4123 }
4124
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4125 inline void AssetFileDef::SharedCtor(
4126 ::_pb::Arena* arena, bool is_message_owned) {
4127 (void)arena;
4128 (void)is_message_owned;
4129 new (&_impl_) Impl_{
4130 decltype(_impl_.filename_){}
4131 , decltype(_impl_.tensor_info_){nullptr}
4132 , /*decltype(_impl_._cached_size_)*/{}
4133 };
4134 _impl_.filename_.InitDefault();
4135 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
4136 _impl_.filename_.Set("", GetArenaForAllocation());
4137 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
4138 }
4139
~AssetFileDef()4140 AssetFileDef::~AssetFileDef() {
4141 // @@protoc_insertion_point(destructor:tensorflow.AssetFileDef)
4142 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4143 (void)arena;
4144 return;
4145 }
4146 SharedDtor();
4147 }
4148
SharedDtor()4149 inline void AssetFileDef::SharedDtor() {
4150 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4151 _impl_.filename_.Destroy();
4152 if (this != internal_default_instance()) delete _impl_.tensor_info_;
4153 }
4154
SetCachedSize(int size) const4155 void AssetFileDef::SetCachedSize(int size) const {
4156 _impl_._cached_size_.Set(size);
4157 }
4158
Clear()4159 void AssetFileDef::Clear() {
4160 // @@protoc_insertion_point(message_clear_start:tensorflow.AssetFileDef)
4161 ::uint32_t cached_has_bits = 0;
4162 // Prevent compiler warnings about cached_has_bits being unused
4163 (void) cached_has_bits;
4164
4165 _impl_.filename_.ClearToEmpty();
4166 if (GetArenaForAllocation() == nullptr && _impl_.tensor_info_ != nullptr) {
4167 delete _impl_.tensor_info_;
4168 }
4169 _impl_.tensor_info_ = nullptr;
4170 _internal_metadata_.Clear<std::string>();
4171 }
4172
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4173 const char* AssetFileDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4174 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4175 while (!ctx->Done(&ptr)) {
4176 ::uint32_t tag;
4177 ptr = ::_pbi::ReadTag(ptr, &tag);
4178 switch (tag >> 3) {
4179 // .tensorflow.TensorInfo tensor_info = 1;
4180 case 1:
4181 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
4182 ptr = ctx->ParseMessage(_internal_mutable_tensor_info(), ptr);
4183 CHK_(ptr);
4184 } else {
4185 goto handle_unusual;
4186 }
4187 continue;
4188 // string filename = 2;
4189 case 2:
4190 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
4191 auto str = _internal_mutable_filename();
4192 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
4193 CHK_(ptr);
4194 CHK_(::_pbi::VerifyUTF8(str, nullptr));
4195 } else {
4196 goto handle_unusual;
4197 }
4198 continue;
4199 default:
4200 goto handle_unusual;
4201 } // switch
4202 handle_unusual:
4203 if ((tag == 0) || ((tag & 7) == 4)) {
4204 CHK_(ptr);
4205 ctx->SetLastTag(tag);
4206 goto message_done;
4207 }
4208 ptr = UnknownFieldParse(
4209 tag,
4210 _internal_metadata_.mutable_unknown_fields<std::string>(),
4211 ptr, ctx);
4212 CHK_(ptr != nullptr);
4213 } // while
4214 message_done:
4215 return ptr;
4216 failure:
4217 ptr = nullptr;
4218 goto message_done;
4219 #undef CHK_
4220 }
4221
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4222 ::uint8_t* AssetFileDef::_InternalSerialize(
4223 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4224 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.AssetFileDef)
4225 ::uint32_t cached_has_bits = 0;
4226 (void) cached_has_bits;
4227
4228 // .tensorflow.TensorInfo tensor_info = 1;
4229 if (this->_internal_has_tensor_info()) {
4230 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4231 InternalWriteMessage(1, _Internal::tensor_info(this),
4232 _Internal::tensor_info(this).GetCachedSize(), target, stream);
4233 }
4234
4235 // string filename = 2;
4236 if (!this->_internal_filename().empty()) {
4237 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
4238 this->_internal_filename().data(), static_cast<int>(this->_internal_filename().length()),
4239 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
4240 "tensorflow.AssetFileDef.filename");
4241 target = stream->WriteStringMaybeAliased(
4242 2, this->_internal_filename(), target);
4243 }
4244
4245 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4246 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4247 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4248 }
4249 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.AssetFileDef)
4250 return target;
4251 }
4252
ByteSizeLong() const4253 size_t AssetFileDef::ByteSizeLong() const {
4254 // @@protoc_insertion_point(message_byte_size_start:tensorflow.AssetFileDef)
4255 size_t total_size = 0;
4256
4257 ::uint32_t cached_has_bits = 0;
4258 // Prevent compiler warnings about cached_has_bits being unused
4259 (void) cached_has_bits;
4260
4261 // string filename = 2;
4262 if (!this->_internal_filename().empty()) {
4263 total_size += 1 +
4264 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
4265 this->_internal_filename());
4266 }
4267
4268 // .tensorflow.TensorInfo tensor_info = 1;
4269 if (this->_internal_has_tensor_info()) {
4270 total_size += 1 +
4271 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4272 *_impl_.tensor_info_);
4273 }
4274
4275 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4276 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4277 }
4278 int cached_size = ::_pbi::ToCachedSize(total_size);
4279 SetCachedSize(cached_size);
4280 return total_size;
4281 }
4282
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4283 void AssetFileDef::CheckTypeAndMergeFrom(
4284 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4285 MergeFrom(*::_pbi::DownCast<const AssetFileDef*>(
4286 &from));
4287 }
4288
MergeFrom(const AssetFileDef & from)4289 void AssetFileDef::MergeFrom(const AssetFileDef& from) {
4290 AssetFileDef* const _this = this;
4291 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.AssetFileDef)
4292 GOOGLE_DCHECK_NE(&from, _this);
4293 ::uint32_t cached_has_bits = 0;
4294 (void) cached_has_bits;
4295
4296 if (!from._internal_filename().empty()) {
4297 _this->_internal_set_filename(from._internal_filename());
4298 }
4299 if (from._internal_has_tensor_info()) {
4300 _this->_internal_mutable_tensor_info()->::tensorflow::TensorInfo::MergeFrom(
4301 from._internal_tensor_info());
4302 }
4303 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4304 }
4305
CopyFrom(const AssetFileDef & from)4306 void AssetFileDef::CopyFrom(const AssetFileDef& from) {
4307 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.AssetFileDef)
4308 if (&from == this) return;
4309 Clear();
4310 MergeFrom(from);
4311 }
4312
IsInitialized() const4313 bool AssetFileDef::IsInitialized() const {
4314 return true;
4315 }
4316
InternalSwap(AssetFileDef * other)4317 void AssetFileDef::InternalSwap(AssetFileDef* other) {
4318 using std::swap;
4319 auto* lhs_arena = GetArenaForAllocation();
4320 auto* rhs_arena = other->GetArenaForAllocation();
4321 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4322 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4323 &_impl_.filename_, lhs_arena,
4324 &other->_impl_.filename_, rhs_arena
4325 );
4326 swap(_impl_.tensor_info_, other->_impl_.tensor_info_);
4327 }
4328
GetTypeName() const4329 std::string AssetFileDef::GetTypeName() const {
4330 return "tensorflow.AssetFileDef";
4331 }
4332
4333
4334 // @@protoc_insertion_point(namespace_scope)
4335 } // namespace tensorflow
4336 PROTOBUF_NAMESPACE_OPEN
4337 template<> PROTOBUF_NOINLINE ::tensorflow::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse*
CreateMaybeMessage(Arena * arena)4338 Arena::CreateMaybeMessage< ::tensorflow::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse >(Arena* arena) {
4339 return Arena::CreateMessageInternal< ::tensorflow::MetaGraphDef_MetaInfoDef_FunctionAliasesEntry_DoNotUse >(arena);
4340 }
4341 template<> PROTOBUF_NOINLINE ::tensorflow::MetaGraphDef_MetaInfoDef*
CreateMaybeMessage(Arena * arena)4342 Arena::CreateMaybeMessage< ::tensorflow::MetaGraphDef_MetaInfoDef >(Arena* arena) {
4343 return Arena::CreateMessageInternal< ::tensorflow::MetaGraphDef_MetaInfoDef >(arena);
4344 }
4345 template<> PROTOBUF_NOINLINE ::tensorflow::MetaGraphDef_CollectionDefEntry_DoNotUse*
CreateMaybeMessage(Arena * arena)4346 Arena::CreateMaybeMessage< ::tensorflow::MetaGraphDef_CollectionDefEntry_DoNotUse >(Arena* arena) {
4347 return Arena::CreateMessageInternal< ::tensorflow::MetaGraphDef_CollectionDefEntry_DoNotUse >(arena);
4348 }
4349 template<> PROTOBUF_NOINLINE ::tensorflow::MetaGraphDef_SignatureDefEntry_DoNotUse*
CreateMaybeMessage(Arena * arena)4350 Arena::CreateMaybeMessage< ::tensorflow::MetaGraphDef_SignatureDefEntry_DoNotUse >(Arena* arena) {
4351 return Arena::CreateMessageInternal< ::tensorflow::MetaGraphDef_SignatureDefEntry_DoNotUse >(arena);
4352 }
4353 template<> PROTOBUF_NOINLINE ::tensorflow::MetaGraphDef*
CreateMaybeMessage(Arena * arena)4354 Arena::CreateMaybeMessage< ::tensorflow::MetaGraphDef >(Arena* arena) {
4355 return Arena::CreateMessageInternal< ::tensorflow::MetaGraphDef >(arena);
4356 }
4357 template<> PROTOBUF_NOINLINE ::tensorflow::CollectionDef_NodeList*
CreateMaybeMessage(Arena * arena)4358 Arena::CreateMaybeMessage< ::tensorflow::CollectionDef_NodeList >(Arena* arena) {
4359 return Arena::CreateMessageInternal< ::tensorflow::CollectionDef_NodeList >(arena);
4360 }
4361 template<> PROTOBUF_NOINLINE ::tensorflow::CollectionDef_BytesList*
CreateMaybeMessage(Arena * arena)4362 Arena::CreateMaybeMessage< ::tensorflow::CollectionDef_BytesList >(Arena* arena) {
4363 return Arena::CreateMessageInternal< ::tensorflow::CollectionDef_BytesList >(arena);
4364 }
4365 template<> PROTOBUF_NOINLINE ::tensorflow::CollectionDef_Int64List*
CreateMaybeMessage(Arena * arena)4366 Arena::CreateMaybeMessage< ::tensorflow::CollectionDef_Int64List >(Arena* arena) {
4367 return Arena::CreateMessageInternal< ::tensorflow::CollectionDef_Int64List >(arena);
4368 }
4369 template<> PROTOBUF_NOINLINE ::tensorflow::CollectionDef_FloatList*
CreateMaybeMessage(Arena * arena)4370 Arena::CreateMaybeMessage< ::tensorflow::CollectionDef_FloatList >(Arena* arena) {
4371 return Arena::CreateMessageInternal< ::tensorflow::CollectionDef_FloatList >(arena);
4372 }
4373 template<> PROTOBUF_NOINLINE ::tensorflow::CollectionDef_AnyList*
CreateMaybeMessage(Arena * arena)4374 Arena::CreateMaybeMessage< ::tensorflow::CollectionDef_AnyList >(Arena* arena) {
4375 return Arena::CreateMessageInternal< ::tensorflow::CollectionDef_AnyList >(arena);
4376 }
4377 template<> PROTOBUF_NOINLINE ::tensorflow::CollectionDef*
CreateMaybeMessage(Arena * arena)4378 Arena::CreateMaybeMessage< ::tensorflow::CollectionDef >(Arena* arena) {
4379 return Arena::CreateMessageInternal< ::tensorflow::CollectionDef >(arena);
4380 }
4381 template<> PROTOBUF_NOINLINE ::tensorflow::TensorInfo_CooSparse*
CreateMaybeMessage(Arena * arena)4382 Arena::CreateMaybeMessage< ::tensorflow::TensorInfo_CooSparse >(Arena* arena) {
4383 return Arena::CreateMessageInternal< ::tensorflow::TensorInfo_CooSparse >(arena);
4384 }
4385 template<> PROTOBUF_NOINLINE ::tensorflow::TensorInfo_CompositeTensor*
CreateMaybeMessage(Arena * arena)4386 Arena::CreateMaybeMessage< ::tensorflow::TensorInfo_CompositeTensor >(Arena* arena) {
4387 return Arena::CreateMessageInternal< ::tensorflow::TensorInfo_CompositeTensor >(arena);
4388 }
4389 template<> PROTOBUF_NOINLINE ::tensorflow::TensorInfo*
CreateMaybeMessage(Arena * arena)4390 Arena::CreateMaybeMessage< ::tensorflow::TensorInfo >(Arena* arena) {
4391 return Arena::CreateMessageInternal< ::tensorflow::TensorInfo >(arena);
4392 }
4393 template<> PROTOBUF_NOINLINE ::tensorflow::SignatureDef_InputsEntry_DoNotUse*
CreateMaybeMessage(Arena * arena)4394 Arena::CreateMaybeMessage< ::tensorflow::SignatureDef_InputsEntry_DoNotUse >(Arena* arena) {
4395 return Arena::CreateMessageInternal< ::tensorflow::SignatureDef_InputsEntry_DoNotUse >(arena);
4396 }
4397 template<> PROTOBUF_NOINLINE ::tensorflow::SignatureDef_OutputsEntry_DoNotUse*
CreateMaybeMessage(Arena * arena)4398 Arena::CreateMaybeMessage< ::tensorflow::SignatureDef_OutputsEntry_DoNotUse >(Arena* arena) {
4399 return Arena::CreateMessageInternal< ::tensorflow::SignatureDef_OutputsEntry_DoNotUse >(arena);
4400 }
4401 template<> PROTOBUF_NOINLINE ::tensorflow::SignatureDef*
CreateMaybeMessage(Arena * arena)4402 Arena::CreateMaybeMessage< ::tensorflow::SignatureDef >(Arena* arena) {
4403 return Arena::CreateMessageInternal< ::tensorflow::SignatureDef >(arena);
4404 }
4405 template<> PROTOBUF_NOINLINE ::tensorflow::AssetFileDef*
CreateMaybeMessage(Arena * arena)4406 Arena::CreateMaybeMessage< ::tensorflow::AssetFileDef >(Arena* arena) {
4407 return Arena::CreateMessageInternal< ::tensorflow::AssetFileDef >(arena);
4408 }
4409 PROTOBUF_NAMESPACE_CLOSE
4410
4411 // @@protoc_insertion_point(global_scope)
4412 #include <google/protobuf/port_undef.inc>
4413