1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: tensorflow/core/framework/versions.proto
3
4 #include "tensorflow/core/framework/versions.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 {
VersionDef(::_pbi::ConstantInitialized)22 PROTOBUF_CONSTEXPR VersionDef::VersionDef(
23 ::_pbi::ConstantInitialized): _impl_{
24 /*decltype(_impl_.bad_consumers_)*/{}
25 , /*decltype(_impl_._bad_consumers_cached_byte_size_)*/{0}
26 , /*decltype(_impl_.producer_)*/0
27 , /*decltype(_impl_.min_consumer_)*/0
28 , /*decltype(_impl_._cached_size_)*/{}} {}
29 struct VersionDefDefaultTypeInternal {
VersionDefDefaultTypeInternaltensorflow::VersionDefDefaultTypeInternal30 PROTOBUF_CONSTEXPR VersionDefDefaultTypeInternal()
31 : _instance(::_pbi::ConstantInitialized{}) {}
~VersionDefDefaultTypeInternaltensorflow::VersionDefDefaultTypeInternal32 ~VersionDefDefaultTypeInternal() {}
33 union { // NOLINT(misc-non-private-member-variables-in-classes)
34 VersionDef _instance;
35 };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VersionDefDefaultTypeInternal _VersionDef_default_instance_;
38 } // namespace tensorflow
39 namespace tensorflow {
40
41 // ===================================================================
42
43 class VersionDef::_Internal {
44 public:
45 };
46
VersionDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)47 VersionDef::VersionDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
48 bool is_message_owned)
49 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
50 SharedCtor(arena, is_message_owned);
51 // @@protoc_insertion_point(arena_constructor:tensorflow.VersionDef)
52 }
VersionDef(const VersionDef & from)53 VersionDef::VersionDef(const VersionDef& from)
54 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
55 VersionDef* const _this = this; (void)_this;
56 new (&_impl_) Impl_{
57 decltype(_impl_.bad_consumers_){from._impl_.bad_consumers_}
58 , /*decltype(_impl_._bad_consumers_cached_byte_size_)*/{0}
59 , decltype(_impl_.producer_){}
60 , decltype(_impl_.min_consumer_){}
61 , /*decltype(_impl_._cached_size_)*/{}};
62
63 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
64 ::memcpy(&_impl_.producer_, &from._impl_.producer_,
65 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.min_consumer_) -
66 reinterpret_cast<char*>(&_impl_.producer_)) + sizeof(_impl_.min_consumer_));
67 // @@protoc_insertion_point(copy_constructor:tensorflow.VersionDef)
68 }
69
SharedCtor(::_pb::Arena * arena,bool is_message_owned)70 inline void VersionDef::SharedCtor(
71 ::_pb::Arena* arena, bool is_message_owned) {
72 (void)arena;
73 (void)is_message_owned;
74 new (&_impl_) Impl_{
75 decltype(_impl_.bad_consumers_){arena}
76 , /*decltype(_impl_._bad_consumers_cached_byte_size_)*/{0}
77 , decltype(_impl_.producer_){0}
78 , decltype(_impl_.min_consumer_){0}
79 , /*decltype(_impl_._cached_size_)*/{}
80 };
81 }
82
~VersionDef()83 VersionDef::~VersionDef() {
84 // @@protoc_insertion_point(destructor:tensorflow.VersionDef)
85 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
86 (void)arena;
87 return;
88 }
89 SharedDtor();
90 }
91
SharedDtor()92 inline void VersionDef::SharedDtor() {
93 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
94 _impl_.bad_consumers_.~RepeatedField();
95 }
96
SetCachedSize(int size) const97 void VersionDef::SetCachedSize(int size) const {
98 _impl_._cached_size_.Set(size);
99 }
100
Clear()101 void VersionDef::Clear() {
102 // @@protoc_insertion_point(message_clear_start:tensorflow.VersionDef)
103 ::uint32_t cached_has_bits = 0;
104 // Prevent compiler warnings about cached_has_bits being unused
105 (void) cached_has_bits;
106
107 _impl_.bad_consumers_.Clear();
108 ::memset(&_impl_.producer_, 0, static_cast<size_t>(
109 reinterpret_cast<char*>(&_impl_.min_consumer_) -
110 reinterpret_cast<char*>(&_impl_.producer_)) + sizeof(_impl_.min_consumer_));
111 _internal_metadata_.Clear<std::string>();
112 }
113
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)114 const char* VersionDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
115 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
116 while (!ctx->Done(&ptr)) {
117 ::uint32_t tag;
118 ptr = ::_pbi::ReadTag(ptr, &tag);
119 switch (tag >> 3) {
120 // int32 producer = 1;
121 case 1:
122 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
123 _impl_.producer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
124 CHK_(ptr);
125 } else {
126 goto handle_unusual;
127 }
128 continue;
129 // int32 min_consumer = 2;
130 case 2:
131 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
132 _impl_.min_consumer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
133 CHK_(ptr);
134 } else {
135 goto handle_unusual;
136 }
137 continue;
138 // repeated int32 bad_consumers = 3;
139 case 3:
140 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
141 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_bad_consumers(), ptr, ctx);
142 CHK_(ptr);
143 } else if (static_cast<::uint8_t>(tag) == 24) {
144 _internal_add_bad_consumers(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
145 CHK_(ptr);
146 } else {
147 goto handle_unusual;
148 }
149 continue;
150 default:
151 goto handle_unusual;
152 } // switch
153 handle_unusual:
154 if ((tag == 0) || ((tag & 7) == 4)) {
155 CHK_(ptr);
156 ctx->SetLastTag(tag);
157 goto message_done;
158 }
159 ptr = UnknownFieldParse(
160 tag,
161 _internal_metadata_.mutable_unknown_fields<std::string>(),
162 ptr, ctx);
163 CHK_(ptr != nullptr);
164 } // while
165 message_done:
166 return ptr;
167 failure:
168 ptr = nullptr;
169 goto message_done;
170 #undef CHK_
171 }
172
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const173 ::uint8_t* VersionDef::_InternalSerialize(
174 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
175 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.VersionDef)
176 ::uint32_t cached_has_bits = 0;
177 (void) cached_has_bits;
178
179 // int32 producer = 1;
180 if (this->_internal_producer() != 0) {
181 target = stream->EnsureSpace(target);
182 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_producer(), target);
183 }
184
185 // int32 min_consumer = 2;
186 if (this->_internal_min_consumer() != 0) {
187 target = stream->EnsureSpace(target);
188 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_min_consumer(), target);
189 }
190
191 // repeated int32 bad_consumers = 3;
192 {
193 int byte_size = _impl_._bad_consumers_cached_byte_size_.load(std::memory_order_relaxed);
194 if (byte_size > 0) {
195 target = stream->WriteInt32Packed(
196 3, _internal_bad_consumers(), byte_size, target);
197 }
198 }
199
200 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
201 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
202 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
203 }
204 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.VersionDef)
205 return target;
206 }
207
ByteSizeLong() const208 size_t VersionDef::ByteSizeLong() const {
209 // @@protoc_insertion_point(message_byte_size_start:tensorflow.VersionDef)
210 size_t total_size = 0;
211
212 ::uint32_t cached_has_bits = 0;
213 // Prevent compiler warnings about cached_has_bits being unused
214 (void) cached_has_bits;
215
216 // repeated int32 bad_consumers = 3;
217 {
218 size_t data_size = ::_pbi::WireFormatLite::
219 Int32Size(this->_impl_.bad_consumers_);
220 if (data_size > 0) {
221 total_size += 1 +
222 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
223 }
224 int cached_size = ::_pbi::ToCachedSize(data_size);
225 _impl_._bad_consumers_cached_byte_size_.store(cached_size,
226 std::memory_order_relaxed);
227 total_size += data_size;
228 }
229
230 // int32 producer = 1;
231 if (this->_internal_producer() != 0) {
232 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_producer());
233 }
234
235 // int32 min_consumer = 2;
236 if (this->_internal_min_consumer() != 0) {
237 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_min_consumer());
238 }
239
240 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
241 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
242 }
243 int cached_size = ::_pbi::ToCachedSize(total_size);
244 SetCachedSize(cached_size);
245 return total_size;
246 }
247
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)248 void VersionDef::CheckTypeAndMergeFrom(
249 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
250 MergeFrom(*::_pbi::DownCast<const VersionDef*>(
251 &from));
252 }
253
MergeFrom(const VersionDef & from)254 void VersionDef::MergeFrom(const VersionDef& from) {
255 VersionDef* const _this = this;
256 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.VersionDef)
257 GOOGLE_DCHECK_NE(&from, _this);
258 ::uint32_t cached_has_bits = 0;
259 (void) cached_has_bits;
260
261 _this->_impl_.bad_consumers_.MergeFrom(from._impl_.bad_consumers_);
262 if (from._internal_producer() != 0) {
263 _this->_internal_set_producer(from._internal_producer());
264 }
265 if (from._internal_min_consumer() != 0) {
266 _this->_internal_set_min_consumer(from._internal_min_consumer());
267 }
268 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
269 }
270
CopyFrom(const VersionDef & from)271 void VersionDef::CopyFrom(const VersionDef& from) {
272 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.VersionDef)
273 if (&from == this) return;
274 Clear();
275 MergeFrom(from);
276 }
277
IsInitialized() const278 bool VersionDef::IsInitialized() const {
279 return true;
280 }
281
InternalSwap(VersionDef * other)282 void VersionDef::InternalSwap(VersionDef* other) {
283 using std::swap;
284 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
285 _impl_.bad_consumers_.InternalSwap(&other->_impl_.bad_consumers_);
286 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
287 PROTOBUF_FIELD_OFFSET(VersionDef, _impl_.min_consumer_)
288 + sizeof(VersionDef::_impl_.min_consumer_) // NOLINT
289 - PROTOBUF_FIELD_OFFSET(VersionDef, _impl_.producer_)>(
290 reinterpret_cast<char*>(&_impl_.producer_),
291 reinterpret_cast<char*>(&other->_impl_.producer_));
292 }
293
GetTypeName() const294 std::string VersionDef::GetTypeName() const {
295 return "tensorflow.VersionDef";
296 }
297
298
299 // @@protoc_insertion_point(namespace_scope)
300 } // namespace tensorflow
301 PROTOBUF_NAMESPACE_OPEN
302 template<> PROTOBUF_NOINLINE ::tensorflow::VersionDef*
CreateMaybeMessage(Arena * arena)303 Arena::CreateMaybeMessage< ::tensorflow::VersionDef >(Arena* arena) {
304 return Arena::CreateMessageInternal< ::tensorflow::VersionDef >(arena);
305 }
306 PROTOBUF_NAMESPACE_CLOSE
307
308 // @@protoc_insertion_point(global_scope)
309 #include <google/protobuf/port_undef.inc>
310