1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: tensorflow/core/framework/tensor_shape.proto
3
4 #ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto
5 #define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto
6
7 #include <cstdint>
8 #include <limits>
9 #include <string>
10
11 #include <google/protobuf/port_def.inc>
12 #if PROTOBUF_VERSION < 3021000
13 #error This file was generated by a newer version of protoc which is
14 #error incompatible with your Protocol Buffer headers. Please update
15 #error your headers.
16 #endif
17 #if 3021012 < PROTOBUF_MIN_PROTOC_VERSION
18 #error This file was generated by an older version of protoc which is
19 #error incompatible with your Protocol Buffer headers. Please
20 #error regenerate this file with a newer version of protoc.
21 #endif
22
23 #include <google/protobuf/port_undef.inc>
24 #include <google/protobuf/io/coded_stream.h>
25 #include <google/protobuf/arena.h>
26 #include <google/protobuf/arenastring.h>
27 #include <google/protobuf/generated_message_util.h>
28 #include <google/protobuf/metadata_lite.h>
29 #include <google/protobuf/message_lite.h>
30 #include <google/protobuf/repeated_field.h> // IWYU pragma: export
31 #include <google/protobuf/extension_set.h> // IWYU pragma: export
32 // @@protoc_insertion_point(includes)
33 #include <google/protobuf/port_def.inc>
34 #define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto
35 PROTOBUF_NAMESPACE_OPEN
36 namespace internal {
37 class AnyMetadata;
38 } // namespace internal
39 PROTOBUF_NAMESPACE_CLOSE
40
41 // Internal implementation detail -- do not use these members.
42 struct TableStruct_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto {
43 static const ::uint32_t offsets[];
44 };
45 namespace tensorflow {
46 class TensorShapeProto;
47 struct TensorShapeProtoDefaultTypeInternal;
48 extern TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_;
49 class TensorShapeProto_Dim;
50 struct TensorShapeProto_DimDefaultTypeInternal;
51 extern TensorShapeProto_DimDefaultTypeInternal _TensorShapeProto_Dim_default_instance_;
52 } // namespace tensorflow
53 PROTOBUF_NAMESPACE_OPEN
54 template<> ::tensorflow::TensorShapeProto* Arena::CreateMaybeMessage<::tensorflow::TensorShapeProto>(Arena*);
55 template<> ::tensorflow::TensorShapeProto_Dim* Arena::CreateMaybeMessage<::tensorflow::TensorShapeProto_Dim>(Arena*);
56 PROTOBUF_NAMESPACE_CLOSE
57 namespace tensorflow {
58
59 // ===================================================================
60
61 class TensorShapeProto_Dim final :
62 public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:tensorflow.TensorShapeProto.Dim) */ {
63 public:
TensorShapeProto_Dim()64 inline TensorShapeProto_Dim() : TensorShapeProto_Dim(nullptr) {}
65 ~TensorShapeProto_Dim() override;
66 explicit PROTOBUF_CONSTEXPR TensorShapeProto_Dim(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
67
68 TensorShapeProto_Dim(const TensorShapeProto_Dim& from);
TensorShapeProto_Dim(TensorShapeProto_Dim && from)69 TensorShapeProto_Dim(TensorShapeProto_Dim&& from) noexcept
70 : TensorShapeProto_Dim() {
71 *this = ::std::move(from);
72 }
73
74 inline TensorShapeProto_Dim& operator=(const TensorShapeProto_Dim& from) {
75 if (this == &from) return *this;
76 CopyFrom(from);
77 return *this;
78 }
79 inline TensorShapeProto_Dim& operator=(TensorShapeProto_Dim&& from) noexcept {
80 if (this == &from) return *this;
81 if (GetOwningArena() == from.GetOwningArena()
82 #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
83 && GetOwningArena() != nullptr
84 #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
85 ) {
86 InternalSwap(&from);
87 } else {
88 CopyFrom(from);
89 }
90 return *this;
91 }
92
default_instance()93 static const TensorShapeProto_Dim& default_instance() {
94 return *internal_default_instance();
95 }
internal_default_instance()96 static inline const TensorShapeProto_Dim* internal_default_instance() {
97 return reinterpret_cast<const TensorShapeProto_Dim*>(
98 &_TensorShapeProto_Dim_default_instance_);
99 }
100 static constexpr int kIndexInFileMessages =
101 0;
102
swap(TensorShapeProto_Dim & a,TensorShapeProto_Dim & b)103 friend void swap(TensorShapeProto_Dim& a, TensorShapeProto_Dim& b) {
104 a.Swap(&b);
105 }
Swap(TensorShapeProto_Dim * other)106 inline void Swap(TensorShapeProto_Dim* other) {
107 if (other == this) return;
108 #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
109 if (GetOwningArena() != nullptr &&
110 GetOwningArena() == other->GetOwningArena()) {
111 #else // PROTOBUF_FORCE_COPY_IN_SWAP
112 if (GetOwningArena() == other->GetOwningArena()) {
113 #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
114 InternalSwap(other);
115 } else {
116 ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
117 }
118 }
119 void UnsafeArenaSwap(TensorShapeProto_Dim* other) {
120 if (other == this) return;
121 GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
122 InternalSwap(other);
123 }
124
125 // implements Message ----------------------------------------------
126
127 TensorShapeProto_Dim* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
128 return CreateMaybeMessage<TensorShapeProto_Dim>(arena);
129 }
130 TensorShapeProto_Dim* New() const {
131 return New(nullptr);
132 }
133 void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final;
134 void CopyFrom(const TensorShapeProto_Dim& from);
135 void MergeFrom(const TensorShapeProto_Dim& from);
136 PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
137 bool IsInitialized() const final;
138
139 size_t ByteSizeLong() const final;
140 const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
141 ::uint8_t* _InternalSerialize(
142 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
143 int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
144
145 private:
146 void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
147 void SharedDtor();
148 void SetCachedSize(int size) const;
149 void InternalSwap(TensorShapeProto_Dim* other);
150
151 private:
152 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
153 static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
154 return "tensorflow.TensorShapeProto.Dim";
155 }
156 protected:
157 explicit TensorShapeProto_Dim(::PROTOBUF_NAMESPACE_ID::Arena* arena,
158 bool is_message_owned = false);
159 public:
160
161 std::string GetTypeName() const final;
162
163 // nested types ----------------------------------------------------
164
165 // accessors -------------------------------------------------------
166
167 enum : int {
168 kNameFieldNumber = 2,
169 kSizeFieldNumber = 1,
170 };
171 // string name = 2;
172 void clear_name();
173 const std::string& name() const;
174 template <typename ArgT0 = const std::string&, typename... ArgT>
175 void set_name(ArgT0&& arg0, ArgT... args);
176 std::string* mutable_name();
177 PROTOBUF_NODISCARD std::string* release_name();
178 void set_allocated_name(std::string* name);
179 private:
180 const std::string& _internal_name() const;
181 inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value);
182 std::string* _internal_mutable_name();
183 public:
184
185 // int64 size = 1;
186 void clear_size();
187 ::int64_t size() const;
188 void set_size(::int64_t value);
189 private:
190 ::int64_t _internal_size() const;
191 void _internal_set_size(::int64_t value);
192 public:
193
194 // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto.Dim)
195 private:
196 class _Internal;
197
198 template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
199 typedef void InternalArenaConstructable_;
200 typedef void DestructorSkippable_;
201 struct Impl_ {
202 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
203 ::int64_t size_;
204 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
205 };
206 union { Impl_ _impl_; };
207 friend struct ::TableStruct_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto;
208 };
209 // -------------------------------------------------------------------
210
211 class TensorShapeProto final :
212 public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:tensorflow.TensorShapeProto) */ {
213 public:
TensorShapeProto()214 inline TensorShapeProto() : TensorShapeProto(nullptr) {}
215 ~TensorShapeProto() override;
216 explicit PROTOBUF_CONSTEXPR TensorShapeProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
217
218 TensorShapeProto(const TensorShapeProto& from);
TensorShapeProto(TensorShapeProto && from)219 TensorShapeProto(TensorShapeProto&& from) noexcept
220 : TensorShapeProto() {
221 *this = ::std::move(from);
222 }
223
224 inline TensorShapeProto& operator=(const TensorShapeProto& from) {
225 if (this == &from) return *this;
226 CopyFrom(from);
227 return *this;
228 }
229 inline TensorShapeProto& operator=(TensorShapeProto&& from) noexcept {
230 if (this == &from) return *this;
231 if (GetOwningArena() == from.GetOwningArena()
232 #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
233 && GetOwningArena() != nullptr
234 #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
235 ) {
236 InternalSwap(&from);
237 } else {
238 CopyFrom(from);
239 }
240 return *this;
241 }
242
default_instance()243 static const TensorShapeProto& default_instance() {
244 return *internal_default_instance();
245 }
internal_default_instance()246 static inline const TensorShapeProto* internal_default_instance() {
247 return reinterpret_cast<const TensorShapeProto*>(
248 &_TensorShapeProto_default_instance_);
249 }
250 static constexpr int kIndexInFileMessages =
251 1;
252
swap(TensorShapeProto & a,TensorShapeProto & b)253 friend void swap(TensorShapeProto& a, TensorShapeProto& b) {
254 a.Swap(&b);
255 }
Swap(TensorShapeProto * other)256 inline void Swap(TensorShapeProto* other) {
257 if (other == this) return;
258 #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
259 if (GetOwningArena() != nullptr &&
260 GetOwningArena() == other->GetOwningArena()) {
261 #else // PROTOBUF_FORCE_COPY_IN_SWAP
262 if (GetOwningArena() == other->GetOwningArena()) {
263 #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
264 InternalSwap(other);
265 } else {
266 ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
267 }
268 }
269 void UnsafeArenaSwap(TensorShapeProto* other) {
270 if (other == this) return;
271 GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
272 InternalSwap(other);
273 }
274
275 // implements Message ----------------------------------------------
276
277 TensorShapeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
278 return CreateMaybeMessage<TensorShapeProto>(arena);
279 }
280 TensorShapeProto* New() const {
281 return New(nullptr);
282 }
283 void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final;
284 void CopyFrom(const TensorShapeProto& from);
285 void MergeFrom(const TensorShapeProto& from);
286 PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
287 bool IsInitialized() const final;
288
289 size_t ByteSizeLong() const final;
290 const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
291 ::uint8_t* _InternalSerialize(
292 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
293 int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
294
295 private:
296 void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
297 void SharedDtor();
298 void SetCachedSize(int size) const;
299 void InternalSwap(TensorShapeProto* other);
300
301 private:
302 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
303 static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
304 return "tensorflow.TensorShapeProto";
305 }
306 protected:
307 explicit TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
308 bool is_message_owned = false);
309 public:
310
311 std::string GetTypeName() const final;
312
313 // nested types ----------------------------------------------------
314
315 typedef TensorShapeProto_Dim Dim;
316
317 // accessors -------------------------------------------------------
318
319 enum : int {
320 kDimFieldNumber = 2,
321 kUnknownRankFieldNumber = 3,
322 };
323 // repeated .tensorflow.TensorShapeProto.Dim dim = 2;
324 int dim_size() const;
325 private:
326 int _internal_dim_size() const;
327 public:
328 void clear_dim();
329 ::tensorflow::TensorShapeProto_Dim* mutable_dim(int index);
330 ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >*
331 mutable_dim();
332 private:
333 const ::tensorflow::TensorShapeProto_Dim& _internal_dim(int index) const;
334 ::tensorflow::TensorShapeProto_Dim* _internal_add_dim();
335 public:
336 const ::tensorflow::TensorShapeProto_Dim& dim(int index) const;
337 ::tensorflow::TensorShapeProto_Dim* add_dim();
338 const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >&
339 dim() const;
340
341 // bool unknown_rank = 3;
342 void clear_unknown_rank();
343 bool unknown_rank() const;
344 void set_unknown_rank(bool value);
345 private:
346 bool _internal_unknown_rank() const;
347 void _internal_set_unknown_rank(bool value);
348 public:
349
350 // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto)
351 private:
352 class _Internal;
353
354 template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
355 typedef void InternalArenaConstructable_;
356 typedef void DestructorSkippable_;
357 struct Impl_ {
358 ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim > dim_;
359 bool unknown_rank_;
360 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
361 };
362 union { Impl_ _impl_; };
363 friend struct ::TableStruct_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto;
364 };
365 // ===================================================================
366
367
368 // ===================================================================
369
370 #ifdef __GNUC__
371 #pragma GCC diagnostic push
372 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
373 #endif // __GNUC__
374 // TensorShapeProto_Dim
375
376 // int64 size = 1;
clear_size()377 inline void TensorShapeProto_Dim::clear_size() {
378 _impl_.size_ = ::int64_t{0};
379 }
_internal_size()380 inline ::int64_t TensorShapeProto_Dim::_internal_size() const {
381 return _impl_.size_;
382 }
size()383 inline ::int64_t TensorShapeProto_Dim::size() const {
384 // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.size)
385 return _internal_size();
386 }
_internal_set_size(::int64_t value)387 inline void TensorShapeProto_Dim::_internal_set_size(::int64_t value) {
388
389 _impl_.size_ = value;
390 }
set_size(::int64_t value)391 inline void TensorShapeProto_Dim::set_size(::int64_t value) {
392 _internal_set_size(value);
393 // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.size)
394 }
395
396 // string name = 2;
clear_name()397 inline void TensorShapeProto_Dim::clear_name() {
398 _impl_.name_.ClearToEmpty();
399 }
name()400 inline const std::string& TensorShapeProto_Dim::name() const {
401 // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.name)
402 return _internal_name();
403 }
404 template <typename ArgT0, typename... ArgT>
405 inline PROTOBUF_ALWAYS_INLINE
set_name(ArgT0 && arg0,ArgT...args)406 void TensorShapeProto_Dim::set_name(ArgT0&& arg0, ArgT... args) {
407
408 _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
409 // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.name)
410 }
mutable_name()411 inline std::string* TensorShapeProto_Dim::mutable_name() {
412 std::string* _s = _internal_mutable_name();
413 // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.Dim.name)
414 return _s;
415 }
_internal_name()416 inline const std::string& TensorShapeProto_Dim::_internal_name() const {
417 return _impl_.name_.Get();
418 }
_internal_set_name(const std::string & value)419 inline void TensorShapeProto_Dim::_internal_set_name(const std::string& value) {
420
421 _impl_.name_.Set(value, GetArenaForAllocation());
422 }
_internal_mutable_name()423 inline std::string* TensorShapeProto_Dim::_internal_mutable_name() {
424
425 return _impl_.name_.Mutable(GetArenaForAllocation());
426 }
release_name()427 inline std::string* TensorShapeProto_Dim::release_name() {
428 // @@protoc_insertion_point(field_release:tensorflow.TensorShapeProto.Dim.name)
429 return _impl_.name_.Release();
430 }
set_allocated_name(std::string * name)431 inline void TensorShapeProto_Dim::set_allocated_name(std::string* name) {
432 _impl_.name_.SetAllocated(name, GetArenaForAllocation());
433 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
434 if (_impl_.name_.IsDefault()) {
435 _impl_.name_.Set("", GetArenaForAllocation());
436 }
437 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
438 // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorShapeProto.Dim.name)
439 }
440
441 // -------------------------------------------------------------------
442
443 // TensorShapeProto
444
445 // repeated .tensorflow.TensorShapeProto.Dim dim = 2;
_internal_dim_size()446 inline int TensorShapeProto::_internal_dim_size() const {
447 return _impl_.dim_.size();
448 }
dim_size()449 inline int TensorShapeProto::dim_size() const {
450 return _internal_dim_size();
451 }
clear_dim()452 inline void TensorShapeProto::clear_dim() {
453 _impl_.dim_.Clear();
454 }
mutable_dim(int index)455 inline ::tensorflow::TensorShapeProto_Dim* TensorShapeProto::mutable_dim(int index) {
456 // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.dim)
457 return _impl_.dim_.Mutable(index);
458 }
459 inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >*
mutable_dim()460 TensorShapeProto::mutable_dim() {
461 // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorShapeProto.dim)
462 return &_impl_.dim_;
463 }
_internal_dim(int index)464 inline const ::tensorflow::TensorShapeProto_Dim& TensorShapeProto::_internal_dim(int index) const {
465 return _impl_.dim_.Get(index);
466 }
dim(int index)467 inline const ::tensorflow::TensorShapeProto_Dim& TensorShapeProto::dim(int index) const {
468 // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.dim)
469 return _internal_dim(index);
470 }
_internal_add_dim()471 inline ::tensorflow::TensorShapeProto_Dim* TensorShapeProto::_internal_add_dim() {
472 return _impl_.dim_.Add();
473 }
add_dim()474 inline ::tensorflow::TensorShapeProto_Dim* TensorShapeProto::add_dim() {
475 ::tensorflow::TensorShapeProto_Dim* _add = _internal_add_dim();
476 // @@protoc_insertion_point(field_add:tensorflow.TensorShapeProto.dim)
477 return _add;
478 }
479 inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >&
dim()480 TensorShapeProto::dim() const {
481 // @@protoc_insertion_point(field_list:tensorflow.TensorShapeProto.dim)
482 return _impl_.dim_;
483 }
484
485 // bool unknown_rank = 3;
clear_unknown_rank()486 inline void TensorShapeProto::clear_unknown_rank() {
487 _impl_.unknown_rank_ = false;
488 }
_internal_unknown_rank()489 inline bool TensorShapeProto::_internal_unknown_rank() const {
490 return _impl_.unknown_rank_;
491 }
unknown_rank()492 inline bool TensorShapeProto::unknown_rank() const {
493 // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.unknown_rank)
494 return _internal_unknown_rank();
495 }
_internal_set_unknown_rank(bool value)496 inline void TensorShapeProto::_internal_set_unknown_rank(bool value) {
497
498 _impl_.unknown_rank_ = value;
499 }
set_unknown_rank(bool value)500 inline void TensorShapeProto::set_unknown_rank(bool value) {
501 _internal_set_unknown_rank(value);
502 // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.unknown_rank)
503 }
504
505 #ifdef __GNUC__
506 #pragma GCC diagnostic pop
507 #endif // __GNUC__
508 // -------------------------------------------------------------------
509
510
511 // @@protoc_insertion_point(namespace_scope)
512
513 } // namespace tensorflow
514
515 // @@protoc_insertion_point(global_scope)
516
517 #include <google/protobuf/port_undef.inc>
518 #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto
519