1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: tensorflow/core/framework/tensor_description.proto
3
4#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fframework_2ftensor_5fdescription_2eproto
5#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fframework_2ftensor_5fdescription_2eproto
6
7#include <limits>
8#include <string>
9
10#include <google/protobuf/port_def.inc>
11#if PROTOBUF_VERSION < 3009000
12#error This file was generated by a newer version of protoc which is
13#error incompatible with your Protocol Buffer headers. Please update
14#error your headers.
15#endif
16#if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
17#error This file was generated by an older version of protoc which is
18#error incompatible with your Protocol Buffer headers. Please
19#error regenerate this file with a newer version of protoc.
20#endif
21
22#include <google/protobuf/port_undef.inc>
23#include <google/protobuf/io/coded_stream.h>
24#include <google/protobuf/arena.h>
25#include <google/protobuf/arenastring.h>
26#include <google/protobuf/generated_message_table_driven.h>
27#include <google/protobuf/generated_message_util.h>
28#include <google/protobuf/inlined_string_field.h>
29#include <google/protobuf/metadata.h>
30#include <google/protobuf/generated_message_reflection.h>
31#include <google/protobuf/message.h>
32#include <google/protobuf/repeated_field.h> // IWYU pragma: export
33#include <google/protobuf/extension_set.h> // IWYU pragma: export
34#include <google/protobuf/unknown_field_set.h>
35#include "tensorflow/core/framework/allocation_description.pb.h"
36#include "tensorflow/core/framework/tensor_shape.pb.h"
37#include "tensorflow/core/framework/types.pb.h"
38// @@protoc_insertion_point(includes)
39#include <google/protobuf/port_def.inc>
40#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_5fdescription_2eproto
41PROTOBUF_NAMESPACE_OPEN
42namespace internal {
43class AnyMetadata;
44} // namespace internal
45PROTOBUF_NAMESPACE_CLOSE
46
47// Internal implementation detail -- do not use these members.
48struct TableStruct_tensorflow_2fcore_2fframework_2ftensor_5fdescription_2eproto {
49 static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
50 PROTOBUF_SECTION_VARIABLE(protodesc_cold);
51 static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
52 PROTOBUF_SECTION_VARIABLE(protodesc_cold);
53 static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
54 PROTOBUF_SECTION_VARIABLE(protodesc_cold);
55 static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
56 static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
57 static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
58};
59extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fdescription_2eproto;
60namespace tensorflow {
61class TensorDescription;
62class TensorDescriptionDefaultTypeInternal;
63extern TensorDescriptionDefaultTypeInternal _TensorDescription_default_instance_;
64} // namespace tensorflow
65PROTOBUF_NAMESPACE_OPEN
66template<> ::tensorflow::TensorDescription* Arena::CreateMaybeMessage<::tensorflow::TensorDescription>(Arena*);
67PROTOBUF_NAMESPACE_CLOSE
68namespace tensorflow {
69
70// ===================================================================
71
72class TensorDescription :
73 public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorDescription) */ {
74 public:
75 TensorDescription();
76 virtual ~TensorDescription();
77
78 TensorDescription(const TensorDescription& from);
79 TensorDescription(TensorDescription&& from) noexcept
80 : TensorDescription() {
81 *this = ::std::move(from);
82 }
83
84 inline TensorDescription& operator=(const TensorDescription& from) {
85 CopyFrom(from);
86 return *this;
87 }
88 inline TensorDescription& operator=(TensorDescription&& from) noexcept {
89 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
90 if (this != &from) InternalSwap(&from);
91 } else {
92 CopyFrom(from);
93 }
94 return *this;
95 }
96
97 inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final {
98 return GetArenaNoVirtual();
99 }
100 inline void* GetMaybeArenaPointer() const final {
101 return MaybeArenaPtr();
102 }
103 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
104 return GetDescriptor();
105 }
106 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
107 return GetMetadataStatic().descriptor;
108 }
109 static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
110 return GetMetadataStatic().reflection;
111 }
112 static const TensorDescription& default_instance();
113
114 static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
115 static inline const TensorDescription* internal_default_instance() {
116 return reinterpret_cast<const TensorDescription*>(
117 &_TensorDescription_default_instance_);
118 }
119 static constexpr int kIndexInFileMessages =
120 0;
121
122 friend void swap(TensorDescription& a, TensorDescription& b) {
123 a.Swap(&b);
124 }
125 inline void Swap(TensorDescription* other) {
126 if (other == this) return;
127 if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
128 InternalSwap(other);
129 } else {
130 ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
131 }
132 }
133 void UnsafeArenaSwap(TensorDescription* other) {
134 if (other == this) return;
135 GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
136 InternalSwap(other);
137 }
138
139 // implements Message ----------------------------------------------
140
141 inline TensorDescription* New() const final {
142 return CreateMaybeMessage<TensorDescription>(nullptr);
143 }
144
145 TensorDescription* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
146 return CreateMaybeMessage<TensorDescription>(arena);
147 }
148 void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
149 void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
150 void CopyFrom(const TensorDescription& from);
151 void MergeFrom(const TensorDescription& from);
152 PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
153 bool IsInitialized() const final;
154
155 size_t ByteSizeLong() const final;
156 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
157 const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
158 #else
159 bool MergePartialFromCodedStream(
160 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
161 #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
162 void SerializeWithCachedSizes(
163 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
164 ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
165 ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
166 int GetCachedSize() const final { return _cached_size_.Get(); }
167
168 private:
169 inline void SharedCtor();
170 inline void SharedDtor();
171 void SetCachedSize(int size) const final;
172 void InternalSwap(TensorDescription* other);
173 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
174 static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
175 return "tensorflow.TensorDescription";
176 }
177 protected:
178 explicit TensorDescription(::PROTOBUF_NAMESPACE_ID::Arena* arena);
179 private:
180 static void ArenaDtor(void* object);
181 inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
182 private:
183 inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
184 return _internal_metadata_.arena();
185 }
186 inline void* MaybeArenaPtr() const {
187 return _internal_metadata_.raw_arena_ptr();
188 }
189 public:
190
191 ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
192 private:
193 static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
194 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fdescription_2eproto);
195 return ::descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fdescription_2eproto.file_level_metadata[kIndexInFileMessages];
196 }
197
198 public:
199
200 // nested types ----------------------------------------------------
201
202 // accessors -------------------------------------------------------
203
204 enum : int {
205 kShapeFieldNumber = 2,
206 kAllocationDescriptionFieldNumber = 4,
207 kDtypeFieldNumber = 1,
208 };
209 // .tensorflow.TensorShapeProto shape = 2;
210 bool has_shape() const;
211 void clear_shape();
212 const ::tensorflow::TensorShapeProto& shape() const;
213 ::tensorflow::TensorShapeProto* release_shape();
214 ::tensorflow::TensorShapeProto* mutable_shape();
215 void set_allocated_shape(::tensorflow::TensorShapeProto* shape);
216 void unsafe_arena_set_allocated_shape(
217 ::tensorflow::TensorShapeProto* shape);
218 ::tensorflow::TensorShapeProto* unsafe_arena_release_shape();
219
220 // .tensorflow.AllocationDescription allocation_description = 4;
221 bool has_allocation_description() const;
222 void clear_allocation_description();
223 const ::tensorflow::AllocationDescription& allocation_description() const;
224 ::tensorflow::AllocationDescription* release_allocation_description();
225 ::tensorflow::AllocationDescription* mutable_allocation_description();
226 void set_allocated_allocation_description(::tensorflow::AllocationDescription* allocation_description);
227 void unsafe_arena_set_allocated_allocation_description(
228 ::tensorflow::AllocationDescription* allocation_description);
229 ::tensorflow::AllocationDescription* unsafe_arena_release_allocation_description();
230
231 // .tensorflow.DataType dtype = 1;
232 void clear_dtype();
233 ::tensorflow::DataType dtype() const;
234 void set_dtype(::tensorflow::DataType value);
235
236 // @@protoc_insertion_point(class_scope:tensorflow.TensorDescription)
237 private:
238 class _Internal;
239
240 ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
241 template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
242 typedef void InternalArenaConstructable_;
243 typedef void DestructorSkippable_;
244 ::tensorflow::TensorShapeProto* shape_;
245 ::tensorflow::AllocationDescription* allocation_description_;
246 int dtype_;
247 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
248 friend struct ::TableStruct_tensorflow_2fcore_2fframework_2ftensor_5fdescription_2eproto;
249};
250// ===================================================================
251
252
253// ===================================================================
254
255#ifdef __GNUC__
256 #pragma GCC diagnostic push
257 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
258#endif // __GNUC__
259// TensorDescription
260
261// .tensorflow.DataType dtype = 1;
262inline void TensorDescription::clear_dtype() {
263 dtype_ = 0;
264}
265inline ::tensorflow::DataType TensorDescription::dtype() const {
266 // @@protoc_insertion_point(field_get:tensorflow.TensorDescription.dtype)
267 return static_cast< ::tensorflow::DataType >(dtype_);
268}
269inline void TensorDescription::set_dtype(::tensorflow::DataType value) {
270
271 dtype_ = value;
272 // @@protoc_insertion_point(field_set:tensorflow.TensorDescription.dtype)
273}
274
275// .tensorflow.TensorShapeProto shape = 2;
276inline bool TensorDescription::has_shape() const {
277 return this != internal_default_instance() && shape_ != nullptr;
278}
279inline const ::tensorflow::TensorShapeProto& TensorDescription::shape() const {
280 const ::tensorflow::TensorShapeProto* p = shape_;
281 // @@protoc_insertion_point(field_get:tensorflow.TensorDescription.shape)
282 return p != nullptr ? *p : *reinterpret_cast<const ::tensorflow::TensorShapeProto*>(
283 &::tensorflow::_TensorShapeProto_default_instance_);
284}
285inline ::tensorflow::TensorShapeProto* TensorDescription::release_shape() {
286 // @@protoc_insertion_point(field_release:tensorflow.TensorDescription.shape)
287
288 ::tensorflow::TensorShapeProto* temp = shape_;
289 if (GetArenaNoVirtual() != nullptr) {
290 temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
291 }
292 shape_ = nullptr;
293 return temp;
294}
295inline ::tensorflow::TensorShapeProto* TensorDescription::unsafe_arena_release_shape() {
296 // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorDescription.shape)
297
298 ::tensorflow::TensorShapeProto* temp = shape_;
299 shape_ = nullptr;
300 return temp;
301}
302inline ::tensorflow::TensorShapeProto* TensorDescription::mutable_shape() {
303
304 if (shape_ == nullptr) {
305 auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaNoVirtual());
306 shape_ = p;
307 }
308 // @@protoc_insertion_point(field_mutable:tensorflow.TensorDescription.shape)
309 return shape_;
310}
311inline void TensorDescription::set_allocated_shape(::tensorflow::TensorShapeProto* shape) {
312 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
313 if (message_arena == nullptr) {
314 delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape_);
315 }
316 if (shape) {
317 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
318 reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape)->GetArena();
319 if (message_arena != submessage_arena) {
320 shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
321 message_arena, shape, submessage_arena);
322 }
323
324 } else {
325
326 }
327 shape_ = shape;
328 // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorDescription.shape)
329}
330
331// .tensorflow.AllocationDescription allocation_description = 4;
332inline bool TensorDescription::has_allocation_description() const {
333 return this != internal_default_instance() && allocation_description_ != nullptr;
334}
335inline const ::tensorflow::AllocationDescription& TensorDescription::allocation_description() const {
336 const ::tensorflow::AllocationDescription* p = allocation_description_;
337 // @@protoc_insertion_point(field_get:tensorflow.TensorDescription.allocation_description)
338 return p != nullptr ? *p : *reinterpret_cast<const ::tensorflow::AllocationDescription*>(
339 &::tensorflow::_AllocationDescription_default_instance_);
340}
341inline ::tensorflow::AllocationDescription* TensorDescription::release_allocation_description() {
342 // @@protoc_insertion_point(field_release:tensorflow.TensorDescription.allocation_description)
343
344 ::tensorflow::AllocationDescription* temp = allocation_description_;
345 if (GetArenaNoVirtual() != nullptr) {
346 temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
347 }
348 allocation_description_ = nullptr;
349 return temp;
350}
351inline ::tensorflow::AllocationDescription* TensorDescription::unsafe_arena_release_allocation_description() {
352 // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorDescription.allocation_description)
353
354 ::tensorflow::AllocationDescription* temp = allocation_description_;
355 allocation_description_ = nullptr;
356 return temp;
357}
358inline ::tensorflow::AllocationDescription* TensorDescription::mutable_allocation_description() {
359
360 if (allocation_description_ == nullptr) {
361 auto* p = CreateMaybeMessage<::tensorflow::AllocationDescription>(GetArenaNoVirtual());
362 allocation_description_ = p;
363 }
364 // @@protoc_insertion_point(field_mutable:tensorflow.TensorDescription.allocation_description)
365 return allocation_description_;
366}
367inline void TensorDescription::set_allocated_allocation_description(::tensorflow::AllocationDescription* allocation_description) {
368 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
369 if (message_arena == nullptr) {
370 delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(allocation_description_);
371 }
372 if (allocation_description) {
373 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
374 reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(allocation_description)->GetArena();
375 if (message_arena != submessage_arena) {
376 allocation_description = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
377 message_arena, allocation_description, submessage_arena);
378 }
379
380 } else {
381
382 }
383 allocation_description_ = allocation_description;
384 // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorDescription.allocation_description)
385}
386
387#ifdef __GNUC__
388 #pragma GCC diagnostic pop
389#endif // __GNUC__
390
391// @@protoc_insertion_point(namespace_scope)
392
393} // namespace tensorflow
394
395// @@protoc_insertion_point(global_scope)
396
397#include <google/protobuf/port_undef.inc>
398#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fframework_2ftensor_5fdescription_2eproto
399