1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/framework/dataset_options.proto |
3 | |
4 | #include "tensorflow/core/framework/dataset_options.pb.h" |
5 | |
6 | #include <algorithm> |
7 | |
8 | #include <google/protobuf/stubs/common.h> |
9 | #include <google/protobuf/io/coded_stream.h> |
10 | #include <google/protobuf/extension_set.h> |
11 | #include <google/protobuf/wire_format_lite.h> |
12 | #include <google/protobuf/descriptor.h> |
13 | #include <google/protobuf/generated_message_reflection.h> |
14 | #include <google/protobuf/reflection_ops.h> |
15 | #include <google/protobuf/wire_format.h> |
16 | // @@protoc_insertion_point(includes) |
17 | #include <google/protobuf/port_def.inc> |
18 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AutotuneOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DistributeOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_OptimizationOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto; |
21 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ThreadingOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto; |
22 | namespace tensorflow { |
23 | namespace data { |
24 | class AutotuneOptionsDefaultTypeInternal { |
25 | public: |
26 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<AutotuneOptions> _instance; |
27 | bool enabled_; |
28 | ::PROTOBUF_NAMESPACE_ID::int32 cpu_budget_; |
29 | ::PROTOBUF_NAMESPACE_ID::int64 ram_budget_; |
30 | int autotune_algorithm_; |
31 | } _AutotuneOptions_default_instance_; |
32 | class CardinalityOptionsDefaultTypeInternal { |
33 | public: |
34 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CardinalityOptions> _instance; |
35 | } _CardinalityOptions_default_instance_; |
36 | class DistributeOptionsDefaultTypeInternal { |
37 | public: |
38 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DistributeOptions> _instance; |
39 | ::PROTOBUF_NAMESPACE_ID::int32 num_devices_; |
40 | } _DistributeOptions_default_instance_; |
41 | class OptimizationOptionsDefaultTypeInternal { |
42 | public: |
43 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<OptimizationOptions> _instance; |
44 | bool apply_default_optimizations_; |
45 | bool filter_fusion_; |
46 | bool map_and_batch_fusion_; |
47 | bool map_and_filter_fusion_; |
48 | bool map_fusion_; |
49 | bool map_parallelization_; |
50 | bool noop_elimination_; |
51 | bool parallel_batch_; |
52 | bool shuffle_and_repeat_fusion_; |
53 | bool filter_parallelization_; |
54 | bool inject_prefetch_; |
55 | } _OptimizationOptions_default_instance_; |
56 | class ThreadingOptionsDefaultTypeInternal { |
57 | public: |
58 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ThreadingOptions> _instance; |
59 | ::PROTOBUF_NAMESPACE_ID::int32 max_intra_op_parallelism_; |
60 | ::PROTOBUF_NAMESPACE_ID::int32 private_threadpool_size_; |
61 | } _ThreadingOptions_default_instance_; |
62 | class OptionsDefaultTypeInternal { |
63 | public: |
64 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Options> _instance; |
65 | bool deterministic_; |
66 | bool slack_; |
67 | int external_state_policy_; |
68 | } _Options_default_instance_; |
69 | } // namespace data |
70 | } // namespace tensorflow |
71 | static void InitDefaultsscc_info_AutotuneOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto() { |
72 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
73 | |
74 | { |
75 | void* ptr = &::tensorflow::data::_AutotuneOptions_default_instance_; |
76 | new (ptr) ::tensorflow::data::AutotuneOptions(); |
77 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
78 | } |
79 | ::tensorflow::data::AutotuneOptions::InitAsDefaultInstance(); |
80 | } |
81 | |
82 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AutotuneOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto = |
83 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_AutotuneOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto}, {}}; |
84 | |
85 | static void InitDefaultsscc_info_CardinalityOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto() { |
86 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
87 | |
88 | { |
89 | void* ptr = &::tensorflow::data::_CardinalityOptions_default_instance_; |
90 | new (ptr) ::tensorflow::data::CardinalityOptions(); |
91 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
92 | } |
93 | ::tensorflow::data::CardinalityOptions::InitAsDefaultInstance(); |
94 | } |
95 | |
96 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CardinalityOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto = |
97 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_CardinalityOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto}, {}}; |
98 | |
99 | static void InitDefaultsscc_info_DistributeOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto() { |
100 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
101 | |
102 | { |
103 | void* ptr = &::tensorflow::data::_DistributeOptions_default_instance_; |
104 | new (ptr) ::tensorflow::data::DistributeOptions(); |
105 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
106 | } |
107 | ::tensorflow::data::DistributeOptions::InitAsDefaultInstance(); |
108 | } |
109 | |
110 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DistributeOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto = |
111 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_DistributeOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto}, {}}; |
112 | |
113 | static void InitDefaultsscc_info_OptimizationOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto() { |
114 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
115 | |
116 | { |
117 | void* ptr = &::tensorflow::data::_OptimizationOptions_default_instance_; |
118 | new (ptr) ::tensorflow::data::OptimizationOptions(); |
119 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
120 | } |
121 | ::tensorflow::data::OptimizationOptions::InitAsDefaultInstance(); |
122 | } |
123 | |
124 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_OptimizationOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto = |
125 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_OptimizationOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto}, {}}; |
126 | |
127 | static void InitDefaultsscc_info_Options_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto() { |
128 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
129 | |
130 | { |
131 | void* ptr = &::tensorflow::data::_Options_default_instance_; |
132 | new (ptr) ::tensorflow::data::Options(); |
133 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
134 | } |
135 | ::tensorflow::data::Options::InitAsDefaultInstance(); |
136 | } |
137 | |
138 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_Options_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto = |
139 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsscc_info_Options_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto}, { |
140 | &scc_info_AutotuneOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base, |
141 | &scc_info_DistributeOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base, |
142 | &scc_info_OptimizationOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base, |
143 | &scc_info_ThreadingOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base,}}; |
144 | |
145 | static void InitDefaultsscc_info_ThreadingOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto() { |
146 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
147 | |
148 | { |
149 | void* ptr = &::tensorflow::data::_ThreadingOptions_default_instance_; |
150 | new (ptr) ::tensorflow::data::ThreadingOptions(); |
151 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
152 | } |
153 | ::tensorflow::data::ThreadingOptions::InitAsDefaultInstance(); |
154 | } |
155 | |
156 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ThreadingOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto = |
157 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ThreadingOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto}, {}}; |
158 | |
159 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto[6]; |
160 | static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto[3]; |
161 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto = nullptr; |
162 | |
163 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
164 | ~0u, // no _has_bits_ |
165 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::AutotuneOptions, _internal_metadata_), |
166 | ~0u, // no _extensions_ |
167 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::AutotuneOptions, _oneof_case_[0]), |
168 | ~0u, // no _weak_field_map_ |
169 | offsetof(::tensorflow::data::AutotuneOptionsDefaultTypeInternal, enabled_), |
170 | offsetof(::tensorflow::data::AutotuneOptionsDefaultTypeInternal, cpu_budget_), |
171 | offsetof(::tensorflow::data::AutotuneOptionsDefaultTypeInternal, ram_budget_), |
172 | offsetof(::tensorflow::data::AutotuneOptionsDefaultTypeInternal, autotune_algorithm_), |
173 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::AutotuneOptions, optional_enabled_), |
174 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::AutotuneOptions, optional_cpu_budget_), |
175 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::AutotuneOptions, optional_ram_budget_), |
176 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::AutotuneOptions, optional_autotune_algorithm_), |
177 | ~0u, // no _has_bits_ |
178 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::CardinalityOptions, _internal_metadata_), |
179 | ~0u, // no _extensions_ |
180 | ~0u, // no _oneof_case_ |
181 | ~0u, // no _weak_field_map_ |
182 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::CardinalityOptions, compute_level_), |
183 | ~0u, // no _has_bits_ |
184 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DistributeOptions, _internal_metadata_), |
185 | ~0u, // no _extensions_ |
186 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DistributeOptions, _oneof_case_[0]), |
187 | ~0u, // no _weak_field_map_ |
188 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DistributeOptions, auto_shard_policy_), |
189 | offsetof(::tensorflow::data::DistributeOptionsDefaultTypeInternal, num_devices_), |
190 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::DistributeOptions, optional_num_devices_), |
191 | ~0u, // no _has_bits_ |
192 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, _internal_metadata_), |
193 | ~0u, // no _extensions_ |
194 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, _oneof_case_[0]), |
195 | ~0u, // no _weak_field_map_ |
196 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, apply_default_optimizations_), |
197 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, filter_fusion_), |
198 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, map_and_batch_fusion_), |
199 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, map_and_filter_fusion_), |
200 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, map_fusion_), |
201 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, map_parallelization_), |
202 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, noop_elimination_), |
203 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, parallel_batch_), |
204 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, shuffle_and_repeat_fusion_), |
205 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, filter_parallelization_), |
206 | offsetof(::tensorflow::data::OptimizationOptionsDefaultTypeInternal, inject_prefetch_), |
207 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_apply_default_optimizations_), |
208 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_filter_fusion_), |
209 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_map_and_batch_fusion_), |
210 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_map_and_filter_fusion_), |
211 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_map_fusion_), |
212 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_map_parallelization_), |
213 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_noop_elimination_), |
214 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_parallel_batch_), |
215 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_shuffle_and_repeat_fusion_), |
216 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_filter_parallelization_), |
217 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::OptimizationOptions, optional_inject_prefetch_), |
218 | ~0u, // no _has_bits_ |
219 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::ThreadingOptions, _internal_metadata_), |
220 | ~0u, // no _extensions_ |
221 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::ThreadingOptions, _oneof_case_[0]), |
222 | ~0u, // no _weak_field_map_ |
223 | offsetof(::tensorflow::data::ThreadingOptionsDefaultTypeInternal, max_intra_op_parallelism_), |
224 | offsetof(::tensorflow::data::ThreadingOptionsDefaultTypeInternal, private_threadpool_size_), |
225 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::ThreadingOptions, optional_max_intra_op_parallelism_), |
226 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::ThreadingOptions, optional_private_threadpool_size_), |
227 | ~0u, // no _has_bits_ |
228 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Options, _internal_metadata_), |
229 | ~0u, // no _extensions_ |
230 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Options, _oneof_case_[0]), |
231 | ~0u, // no _weak_field_map_ |
232 | offsetof(::tensorflow::data::OptionsDefaultTypeInternal, deterministic_), |
233 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Options, autotune_options_), |
234 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Options, distribute_options_), |
235 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Options, optimization_options_), |
236 | offsetof(::tensorflow::data::OptionsDefaultTypeInternal, slack_), |
237 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Options, threading_options_), |
238 | offsetof(::tensorflow::data::OptionsDefaultTypeInternal, external_state_policy_), |
239 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Options, optional_deterministic_), |
240 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Options, optional_slack_), |
241 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::Options, optional_external_state_policy_), |
242 | }; |
243 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
244 | { 0, -1, sizeof(::tensorflow::data::AutotuneOptions)}, |
245 | { 13, -1, sizeof(::tensorflow::data::CardinalityOptions)}, |
246 | { 19, -1, sizeof(::tensorflow::data::DistributeOptions)}, |
247 | { 27, -1, sizeof(::tensorflow::data::OptimizationOptions)}, |
248 | { 54, -1, sizeof(::tensorflow::data::ThreadingOptions)}, |
249 | { 63, -1, sizeof(::tensorflow::data::Options)}, |
250 | }; |
251 | |
252 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
253 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_AutotuneOptions_default_instance_), |
254 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_CardinalityOptions_default_instance_), |
255 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_DistributeOptions_default_instance_), |
256 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_OptimizationOptions_default_instance_), |
257 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_ThreadingOptions_default_instance_), |
258 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::_Options_default_instance_), |
259 | }; |
260 | |
261 | const char descriptor_table_protodef_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
262 | "\n/tensorflow/core/framework/dataset_opti" |
263 | "ons.proto\022\017tensorflow.data\032%tensorflow/c" |
264 | "ore/framework/model.proto\"\371\001\n\017AutotuneOp" |
265 | "tions\022\021\n\007enabled\030\001 \001(\010H\000\022\024\n\ncpu_budget\030\002" |
266 | " \001(\005H\001\022\024\n\nram_budget\030\003 \001(\003H\002\022F\n\022autotune" |
267 | "_algorithm\030\004 \001(\0162(.tensorflow.data.model" |
268 | ".AutotuneAlgorithmH\003B\022\n\020optional_enabled" |
269 | "B\025\n\023optional_cpu_budgetB\025\n\023optional_ram_" |
270 | "budgetB\035\n\033optional_autotune_algorithm\"\321\001" |
271 | "\n\022CardinalityOptions\022G\n\rcompute_level\030\001 " |
272 | "\001(\01620.tensorflow.data.CardinalityOptions" |
273 | ".ComputeLevel\"r\n\014ComputeLevel\022#\n\037CARDINA" |
274 | "LITY_COMPUTE_UNSPECIFIED\020\000\022\033\n\027CARDINALIT" |
275 | "Y_COMPUTE_LOW\020\001\022 \n\034CARDINALITY_COMPUTE_M" |
276 | "ODERATE\020\002\"\177\n\021DistributeOptions\022;\n\021auto_s" |
277 | "hard_policy\030\001 \001(\0162 .tensorflow.data.Auto" |
278 | "ShardPolicy\022\025\n\013num_devices\030\002 \001(\005H\000B\026\n\024op" |
279 | "tional_num_devices\"\354\005\n\023OptimizationOptio" |
280 | "ns\022%\n\033apply_default_optimizations\030\001 \001(\010H" |
281 | "\000\022\027\n\rfilter_fusion\030\006 \001(\010H\001\022\036\n\024map_and_ba" |
282 | "tch_fusion\030\t \001(\010H\002\022\037\n\025map_and_filter_fus" |
283 | "ion\030\n \001(\010H\003\022\024\n\nmap_fusion\030\013 \001(\010H\004\022\035\n\023map" |
284 | "_parallelization\030\014 \001(\010H\005\022\032\n\020noop_elimina" |
285 | "tion\030\016 \001(\010H\006\022\030\n\016parallel_batch\030\017 \001(\010H\007\022#" |
286 | "\n\031shuffle_and_repeat_fusion\030\021 \001(\010H\010\022 \n\026f" |
287 | "ilter_parallelization\030\022 \001(\010H\t\022\031\n\017inject_" |
288 | "prefetch\030\023 \001(\010H\nB&\n$optional_apply_defau" |
289 | "lt_optimizationsB\030\n\026optional_filter_fusi" |
290 | "onB\037\n\035optional_map_and_batch_fusionB \n\036o" |
291 | "ptional_map_and_filter_fusionB\025\n\023optiona" |
292 | "l_map_fusionB\036\n\034optional_map_paralleliza" |
293 | "tionB\033\n\031optional_noop_eliminationB\031\n\027opt" |
294 | "ional_parallel_batchB$\n\"optional_shuffle" |
295 | "_and_repeat_fusionB!\n\037optional_filter_pa" |
296 | "rallelizationB\032\n\030optional_inject_prefetc" |
297 | "hJ\004\010\002\020\003J\004\010\003\020\004J\004\010\004\020\005J\004\010\005\020\006J\004\010\007\020\010J\004\010\010\020\tJ\004\010" |
298 | "\r\020\016J\004\010\020\020\021\"\242\001\n\020ThreadingOptions\022\"\n\030max_in" |
299 | "tra_op_parallelism\030\001 \001(\005H\000\022!\n\027private_th" |
300 | "readpool_size\030\002 \001(\005H\001B#\n!optional_max_in" |
301 | "tra_op_parallelismB\"\n optional_private_t" |
302 | "hreadpool_size\"\306\003\n\007Options\022\027\n\rdeterminis" |
303 | "tic\030\001 \001(\010H\000\022:\n\020autotune_options\030\007 \001(\0132 ." |
304 | "tensorflow.data.AutotuneOptions\022>\n\022distr" |
305 | "ibute_options\030\002 \001(\0132\".tensorflow.data.Di" |
306 | "stributeOptions\022B\n\024optimization_options\030" |
307 | "\003 \001(\0132$.tensorflow.data.OptimizationOpti" |
308 | "ons\022\017\n\005slack\030\004 \001(\010H\001\022<\n\021threading_option" |
309 | "s\030\005 \001(\0132!.tensorflow.data.ThreadingOptio" |
310 | "ns\022E\n\025external_state_policy\030\006 \001(\0162$.tens" |
311 | "orflow.data.ExternalStatePolicyH\002B\030\n\026opt" |
312 | "ional_deterministicB\020\n\016optional_slackB \n" |
313 | "\036optional_external_state_policy*K\n\017AutoS" |
314 | "hardPolicy\022\010\n\004AUTO\020\000\022\010\n\004FILE\020\001\022\010\n\004DATA\020\002" |
315 | "\022\010\n\004HINT\020\003\022\020\n\003OFF\020\377\377\377\377\377\377\377\377\377\001*J\n\023External" |
316 | "StatePolicy\022\017\n\013POLICY_WARN\020\000\022\021\n\rPOLICY_I" |
317 | "GNORE\020\001\022\017\n\013POLICY_FAIL\020\002BXZVgithub.com/t" |
318 | "ensorflow/tensorflow/tensorflow/go/core/" |
319 | "framework/dataset_options_go_protob\006prot" |
320 | "o3" |
321 | ; |
322 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto_deps[1] = { |
323 | &::descriptor_table_tensorflow_2fcore_2fframework_2fmodel_2eproto, |
324 | }; |
325 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto_sccs[6] = { |
326 | &scc_info_AutotuneOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base, |
327 | &scc_info_CardinalityOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base, |
328 | &scc_info_DistributeOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base, |
329 | &scc_info_OptimizationOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base, |
330 | &scc_info_Options_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base, |
331 | &scc_info_ThreadingOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base, |
332 | }; |
333 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto_once; |
334 | static bool descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto_initialized = false; |
335 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto = { |
336 | &descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto, "tensorflow/core/framework/dataset_options.proto" , 2322, |
337 | &descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto_once, descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto_deps, 6, 1, |
338 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto::offsets, |
339 | file_level_metadata_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto, 6, file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto, |
340 | }; |
341 | |
342 | // Force running AddDescriptors() at dynamic initialization time. |
343 | static bool dynamic_init_dummy_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto), true); |
344 | namespace tensorflow { |
345 | namespace data { |
346 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CardinalityOptions_ComputeLevel_descriptor() { |
347 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto); |
348 | return file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto[0]; |
349 | } |
350 | bool CardinalityOptions_ComputeLevel_IsValid(int value) { |
351 | switch (value) { |
352 | case 0: |
353 | case 1: |
354 | case 2: |
355 | return true; |
356 | default: |
357 | return false; |
358 | } |
359 | } |
360 | |
361 | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
362 | constexpr CardinalityOptions_ComputeLevel CardinalityOptions::CARDINALITY_COMPUTE_UNSPECIFIED; |
363 | constexpr CardinalityOptions_ComputeLevel CardinalityOptions::CARDINALITY_COMPUTE_LOW; |
364 | constexpr CardinalityOptions_ComputeLevel CardinalityOptions::CARDINALITY_COMPUTE_MODERATE; |
365 | constexpr CardinalityOptions_ComputeLevel CardinalityOptions::ComputeLevel_MIN; |
366 | constexpr CardinalityOptions_ComputeLevel CardinalityOptions::ComputeLevel_MAX; |
367 | constexpr int CardinalityOptions::ComputeLevel_ARRAYSIZE; |
368 | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
369 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AutoShardPolicy_descriptor() { |
370 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto); |
371 | return file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto[1]; |
372 | } |
373 | bool AutoShardPolicy_IsValid(int value) { |
374 | switch (value) { |
375 | case -1: |
376 | case 0: |
377 | case 1: |
378 | case 2: |
379 | case 3: |
380 | return true; |
381 | default: |
382 | return false; |
383 | } |
384 | } |
385 | |
386 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ExternalStatePolicy_descriptor() { |
387 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto); |
388 | return file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto[2]; |
389 | } |
390 | bool ExternalStatePolicy_IsValid(int value) { |
391 | switch (value) { |
392 | case 0: |
393 | case 1: |
394 | case 2: |
395 | return true; |
396 | default: |
397 | return false; |
398 | } |
399 | } |
400 | |
401 | |
402 | // =================================================================== |
403 | |
404 | void AutotuneOptions::InitAsDefaultInstance() { |
405 | ::tensorflow::data::_AutotuneOptions_default_instance_.enabled_ = false; |
406 | ::tensorflow::data::_AutotuneOptions_default_instance_.cpu_budget_ = 0; |
407 | ::tensorflow::data::_AutotuneOptions_default_instance_.ram_budget_ = PROTOBUF_LONGLONG(0); |
408 | ::tensorflow::data::_AutotuneOptions_default_instance_.autotune_algorithm_ = 0; |
409 | } |
410 | class AutotuneOptions::_Internal { |
411 | public: |
412 | }; |
413 | |
414 | AutotuneOptions::AutotuneOptions() |
415 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
416 | SharedCtor(); |
417 | // @@protoc_insertion_point(constructor:tensorflow.data.AutotuneOptions) |
418 | } |
419 | AutotuneOptions::AutotuneOptions(const AutotuneOptions& from) |
420 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
421 | _internal_metadata_(nullptr) { |
422 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
423 | clear_has_optional_enabled(); |
424 | switch (from.optional_enabled_case()) { |
425 | case kEnabled: { |
426 | set_enabled(from.enabled()); |
427 | break; |
428 | } |
429 | case OPTIONAL_ENABLED_NOT_SET: { |
430 | break; |
431 | } |
432 | } |
433 | clear_has_optional_cpu_budget(); |
434 | switch (from.optional_cpu_budget_case()) { |
435 | case kCpuBudget: { |
436 | set_cpu_budget(from.cpu_budget()); |
437 | break; |
438 | } |
439 | case OPTIONAL_CPU_BUDGET_NOT_SET: { |
440 | break; |
441 | } |
442 | } |
443 | clear_has_optional_ram_budget(); |
444 | switch (from.optional_ram_budget_case()) { |
445 | case kRamBudget: { |
446 | set_ram_budget(from.ram_budget()); |
447 | break; |
448 | } |
449 | case OPTIONAL_RAM_BUDGET_NOT_SET: { |
450 | break; |
451 | } |
452 | } |
453 | clear_has_optional_autotune_algorithm(); |
454 | switch (from.optional_autotune_algorithm_case()) { |
455 | case kAutotuneAlgorithm: { |
456 | set_autotune_algorithm(from.autotune_algorithm()); |
457 | break; |
458 | } |
459 | case OPTIONAL_AUTOTUNE_ALGORITHM_NOT_SET: { |
460 | break; |
461 | } |
462 | } |
463 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.AutotuneOptions) |
464 | } |
465 | |
466 | void AutotuneOptions::SharedCtor() { |
467 | clear_has_optional_enabled(); |
468 | clear_has_optional_cpu_budget(); |
469 | clear_has_optional_ram_budget(); |
470 | clear_has_optional_autotune_algorithm(); |
471 | } |
472 | |
473 | AutotuneOptions::~AutotuneOptions() { |
474 | // @@protoc_insertion_point(destructor:tensorflow.data.AutotuneOptions) |
475 | SharedDtor(); |
476 | } |
477 | |
478 | void AutotuneOptions::SharedDtor() { |
479 | if (has_optional_enabled()) { |
480 | clear_optional_enabled(); |
481 | } |
482 | if (has_optional_cpu_budget()) { |
483 | clear_optional_cpu_budget(); |
484 | } |
485 | if (has_optional_ram_budget()) { |
486 | clear_optional_ram_budget(); |
487 | } |
488 | if (has_optional_autotune_algorithm()) { |
489 | clear_optional_autotune_algorithm(); |
490 | } |
491 | } |
492 | |
493 | void AutotuneOptions::SetCachedSize(int size) const { |
494 | _cached_size_.Set(size); |
495 | } |
496 | const AutotuneOptions& AutotuneOptions::default_instance() { |
497 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_AutotuneOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base); |
498 | return *internal_default_instance(); |
499 | } |
500 | |
501 | |
502 | void AutotuneOptions::clear_optional_enabled() { |
503 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.AutotuneOptions) |
504 | switch (optional_enabled_case()) { |
505 | case kEnabled: { |
506 | // No need to clear |
507 | break; |
508 | } |
509 | case OPTIONAL_ENABLED_NOT_SET: { |
510 | break; |
511 | } |
512 | } |
513 | _oneof_case_[0] = OPTIONAL_ENABLED_NOT_SET; |
514 | } |
515 | |
516 | void AutotuneOptions::clear_optional_cpu_budget() { |
517 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.AutotuneOptions) |
518 | switch (optional_cpu_budget_case()) { |
519 | case kCpuBudget: { |
520 | // No need to clear |
521 | break; |
522 | } |
523 | case OPTIONAL_CPU_BUDGET_NOT_SET: { |
524 | break; |
525 | } |
526 | } |
527 | _oneof_case_[1] = OPTIONAL_CPU_BUDGET_NOT_SET; |
528 | } |
529 | |
530 | void AutotuneOptions::clear_optional_ram_budget() { |
531 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.AutotuneOptions) |
532 | switch (optional_ram_budget_case()) { |
533 | case kRamBudget: { |
534 | // No need to clear |
535 | break; |
536 | } |
537 | case OPTIONAL_RAM_BUDGET_NOT_SET: { |
538 | break; |
539 | } |
540 | } |
541 | _oneof_case_[2] = OPTIONAL_RAM_BUDGET_NOT_SET; |
542 | } |
543 | |
544 | void AutotuneOptions::clear_optional_autotune_algorithm() { |
545 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.AutotuneOptions) |
546 | switch (optional_autotune_algorithm_case()) { |
547 | case kAutotuneAlgorithm: { |
548 | // No need to clear |
549 | break; |
550 | } |
551 | case OPTIONAL_AUTOTUNE_ALGORITHM_NOT_SET: { |
552 | break; |
553 | } |
554 | } |
555 | _oneof_case_[3] = OPTIONAL_AUTOTUNE_ALGORITHM_NOT_SET; |
556 | } |
557 | |
558 | |
559 | void AutotuneOptions::Clear() { |
560 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.AutotuneOptions) |
561 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
562 | // Prevent compiler warnings about cached_has_bits being unused |
563 | (void) cached_has_bits; |
564 | |
565 | clear_optional_enabled(); |
566 | clear_optional_cpu_budget(); |
567 | clear_optional_ram_budget(); |
568 | clear_optional_autotune_algorithm(); |
569 | _internal_metadata_.Clear(); |
570 | } |
571 | |
572 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
573 | const char* AutotuneOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
574 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
575 | while (!ctx->Done(&ptr)) { |
576 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
577 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
578 | CHK_(ptr); |
579 | switch (tag >> 3) { |
580 | // bool enabled = 1; |
581 | case 1: |
582 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
583 | set_enabled(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
584 | CHK_(ptr); |
585 | } else goto handle_unusual; |
586 | continue; |
587 | // int32 cpu_budget = 2; |
588 | case 2: |
589 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
590 | set_cpu_budget(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
591 | CHK_(ptr); |
592 | } else goto handle_unusual; |
593 | continue; |
594 | // int64 ram_budget = 3; |
595 | case 3: |
596 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
597 | set_ram_budget(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
598 | CHK_(ptr); |
599 | } else goto handle_unusual; |
600 | continue; |
601 | // .tensorflow.data.model.AutotuneAlgorithm autotune_algorithm = 4; |
602 | case 4: |
603 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
604 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
605 | CHK_(ptr); |
606 | set_autotune_algorithm(static_cast<::tensorflow::data::model::AutotuneAlgorithm>(val)); |
607 | } else goto handle_unusual; |
608 | continue; |
609 | default: { |
610 | handle_unusual: |
611 | if ((tag & 7) == 4 || tag == 0) { |
612 | ctx->SetLastTag(tag); |
613 | goto success; |
614 | } |
615 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
616 | CHK_(ptr != nullptr); |
617 | continue; |
618 | } |
619 | } // switch |
620 | } // while |
621 | success: |
622 | return ptr; |
623 | failure: |
624 | ptr = nullptr; |
625 | goto success; |
626 | #undef CHK_ |
627 | } |
628 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
629 | bool AutotuneOptions::MergePartialFromCodedStream( |
630 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
631 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
632 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
633 | // @@protoc_insertion_point(parse_start:tensorflow.data.AutotuneOptions) |
634 | for (;;) { |
635 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
636 | tag = p.first; |
637 | if (!p.second) goto handle_unusual; |
638 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
639 | // bool enabled = 1; |
640 | case 1: { |
641 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
642 | clear_optional_enabled(); |
643 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
644 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
645 | input, &optional_enabled_.enabled_))); |
646 | set_has_enabled(); |
647 | } else { |
648 | goto handle_unusual; |
649 | } |
650 | break; |
651 | } |
652 | |
653 | // int32 cpu_budget = 2; |
654 | case 2: { |
655 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
656 | clear_optional_cpu_budget(); |
657 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
658 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
659 | input, &optional_cpu_budget_.cpu_budget_))); |
660 | set_has_cpu_budget(); |
661 | } else { |
662 | goto handle_unusual; |
663 | } |
664 | break; |
665 | } |
666 | |
667 | // int64 ram_budget = 3; |
668 | case 3: { |
669 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
670 | clear_optional_ram_budget(); |
671 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
672 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
673 | input, &optional_ram_budget_.ram_budget_))); |
674 | set_has_ram_budget(); |
675 | } else { |
676 | goto handle_unusual; |
677 | } |
678 | break; |
679 | } |
680 | |
681 | // .tensorflow.data.model.AutotuneAlgorithm autotune_algorithm = 4; |
682 | case 4: { |
683 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
684 | int value = 0; |
685 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
686 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
687 | input, &value))); |
688 | set_autotune_algorithm(static_cast< ::tensorflow::data::model::AutotuneAlgorithm >(value)); |
689 | } else { |
690 | goto handle_unusual; |
691 | } |
692 | break; |
693 | } |
694 | |
695 | default: { |
696 | handle_unusual: |
697 | if (tag == 0) { |
698 | goto success; |
699 | } |
700 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
701 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
702 | break; |
703 | } |
704 | } |
705 | } |
706 | success: |
707 | // @@protoc_insertion_point(parse_success:tensorflow.data.AutotuneOptions) |
708 | return true; |
709 | failure: |
710 | // @@protoc_insertion_point(parse_failure:tensorflow.data.AutotuneOptions) |
711 | return false; |
712 | #undef DO_ |
713 | } |
714 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
715 | |
716 | void AutotuneOptions::SerializeWithCachedSizes( |
717 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
718 | // @@protoc_insertion_point(serialize_start:tensorflow.data.AutotuneOptions) |
719 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
720 | (void) cached_has_bits; |
721 | |
722 | // bool enabled = 1; |
723 | if (has_enabled()) { |
724 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->enabled(), output); |
725 | } |
726 | |
727 | // int32 cpu_budget = 2; |
728 | if (has_cpu_budget()) { |
729 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->cpu_budget(), output); |
730 | } |
731 | |
732 | // int64 ram_budget = 3; |
733 | if (has_ram_budget()) { |
734 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->ram_budget(), output); |
735 | } |
736 | |
737 | // .tensorflow.data.model.AutotuneAlgorithm autotune_algorithm = 4; |
738 | if (has_autotune_algorithm()) { |
739 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
740 | 4, this->autotune_algorithm(), output); |
741 | } |
742 | |
743 | if (_internal_metadata_.have_unknown_fields()) { |
744 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
745 | _internal_metadata_.unknown_fields(), output); |
746 | } |
747 | // @@protoc_insertion_point(serialize_end:tensorflow.data.AutotuneOptions) |
748 | } |
749 | |
750 | ::PROTOBUF_NAMESPACE_ID::uint8* AutotuneOptions::InternalSerializeWithCachedSizesToArray( |
751 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
752 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.AutotuneOptions) |
753 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
754 | (void) cached_has_bits; |
755 | |
756 | // bool enabled = 1; |
757 | if (has_enabled()) { |
758 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->enabled(), target); |
759 | } |
760 | |
761 | // int32 cpu_budget = 2; |
762 | if (has_cpu_budget()) { |
763 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->cpu_budget(), target); |
764 | } |
765 | |
766 | // int64 ram_budget = 3; |
767 | if (has_ram_budget()) { |
768 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->ram_budget(), target); |
769 | } |
770 | |
771 | // .tensorflow.data.model.AutotuneAlgorithm autotune_algorithm = 4; |
772 | if (has_autotune_algorithm()) { |
773 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
774 | 4, this->autotune_algorithm(), target); |
775 | } |
776 | |
777 | if (_internal_metadata_.have_unknown_fields()) { |
778 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
779 | _internal_metadata_.unknown_fields(), target); |
780 | } |
781 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.AutotuneOptions) |
782 | return target; |
783 | } |
784 | |
785 | size_t AutotuneOptions::ByteSizeLong() const { |
786 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.AutotuneOptions) |
787 | size_t total_size = 0; |
788 | |
789 | if (_internal_metadata_.have_unknown_fields()) { |
790 | total_size += |
791 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
792 | _internal_metadata_.unknown_fields()); |
793 | } |
794 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
795 | // Prevent compiler warnings about cached_has_bits being unused |
796 | (void) cached_has_bits; |
797 | |
798 | switch (optional_enabled_case()) { |
799 | // bool enabled = 1; |
800 | case kEnabled: { |
801 | total_size += 1 + 1; |
802 | break; |
803 | } |
804 | case OPTIONAL_ENABLED_NOT_SET: { |
805 | break; |
806 | } |
807 | } |
808 | switch (optional_cpu_budget_case()) { |
809 | // int32 cpu_budget = 2; |
810 | case kCpuBudget: { |
811 | total_size += 1 + |
812 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
813 | this->cpu_budget()); |
814 | break; |
815 | } |
816 | case OPTIONAL_CPU_BUDGET_NOT_SET: { |
817 | break; |
818 | } |
819 | } |
820 | switch (optional_ram_budget_case()) { |
821 | // int64 ram_budget = 3; |
822 | case kRamBudget: { |
823 | total_size += 1 + |
824 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
825 | this->ram_budget()); |
826 | break; |
827 | } |
828 | case OPTIONAL_RAM_BUDGET_NOT_SET: { |
829 | break; |
830 | } |
831 | } |
832 | switch (optional_autotune_algorithm_case()) { |
833 | // .tensorflow.data.model.AutotuneAlgorithm autotune_algorithm = 4; |
834 | case kAutotuneAlgorithm: { |
835 | total_size += 1 + |
836 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->autotune_algorithm()); |
837 | break; |
838 | } |
839 | case OPTIONAL_AUTOTUNE_ALGORITHM_NOT_SET: { |
840 | break; |
841 | } |
842 | } |
843 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
844 | SetCachedSize(cached_size); |
845 | return total_size; |
846 | } |
847 | |
848 | void AutotuneOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
849 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.AutotuneOptions) |
850 | GOOGLE_DCHECK_NE(&from, this); |
851 | const AutotuneOptions* source = |
852 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<AutotuneOptions>( |
853 | &from); |
854 | if (source == nullptr) { |
855 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.AutotuneOptions) |
856 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
857 | } else { |
858 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.AutotuneOptions) |
859 | MergeFrom(*source); |
860 | } |
861 | } |
862 | |
863 | void AutotuneOptions::MergeFrom(const AutotuneOptions& from) { |
864 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.AutotuneOptions) |
865 | GOOGLE_DCHECK_NE(&from, this); |
866 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
867 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
868 | (void) cached_has_bits; |
869 | |
870 | switch (from.optional_enabled_case()) { |
871 | case kEnabled: { |
872 | set_enabled(from.enabled()); |
873 | break; |
874 | } |
875 | case OPTIONAL_ENABLED_NOT_SET: { |
876 | break; |
877 | } |
878 | } |
879 | switch (from.optional_cpu_budget_case()) { |
880 | case kCpuBudget: { |
881 | set_cpu_budget(from.cpu_budget()); |
882 | break; |
883 | } |
884 | case OPTIONAL_CPU_BUDGET_NOT_SET: { |
885 | break; |
886 | } |
887 | } |
888 | switch (from.optional_ram_budget_case()) { |
889 | case kRamBudget: { |
890 | set_ram_budget(from.ram_budget()); |
891 | break; |
892 | } |
893 | case OPTIONAL_RAM_BUDGET_NOT_SET: { |
894 | break; |
895 | } |
896 | } |
897 | switch (from.optional_autotune_algorithm_case()) { |
898 | case kAutotuneAlgorithm: { |
899 | set_autotune_algorithm(from.autotune_algorithm()); |
900 | break; |
901 | } |
902 | case OPTIONAL_AUTOTUNE_ALGORITHM_NOT_SET: { |
903 | break; |
904 | } |
905 | } |
906 | } |
907 | |
908 | void AutotuneOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
909 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.AutotuneOptions) |
910 | if (&from == this) return; |
911 | Clear(); |
912 | MergeFrom(from); |
913 | } |
914 | |
915 | void AutotuneOptions::CopyFrom(const AutotuneOptions& from) { |
916 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.AutotuneOptions) |
917 | if (&from == this) return; |
918 | Clear(); |
919 | MergeFrom(from); |
920 | } |
921 | |
922 | bool AutotuneOptions::IsInitialized() const { |
923 | return true; |
924 | } |
925 | |
926 | void AutotuneOptions::InternalSwap(AutotuneOptions* other) { |
927 | using std::swap; |
928 | _internal_metadata_.Swap(&other->_internal_metadata_); |
929 | swap(optional_enabled_, other->optional_enabled_); |
930 | swap(optional_cpu_budget_, other->optional_cpu_budget_); |
931 | swap(optional_ram_budget_, other->optional_ram_budget_); |
932 | swap(optional_autotune_algorithm_, other->optional_autotune_algorithm_); |
933 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
934 | swap(_oneof_case_[1], other->_oneof_case_[1]); |
935 | swap(_oneof_case_[2], other->_oneof_case_[2]); |
936 | swap(_oneof_case_[3], other->_oneof_case_[3]); |
937 | } |
938 | |
939 | ::PROTOBUF_NAMESPACE_ID::Metadata AutotuneOptions::GetMetadata() const { |
940 | return GetMetadataStatic(); |
941 | } |
942 | |
943 | |
944 | // =================================================================== |
945 | |
946 | void CardinalityOptions::InitAsDefaultInstance() { |
947 | } |
948 | class CardinalityOptions::_Internal { |
949 | public: |
950 | }; |
951 | |
952 | CardinalityOptions::CardinalityOptions() |
953 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
954 | SharedCtor(); |
955 | // @@protoc_insertion_point(constructor:tensorflow.data.CardinalityOptions) |
956 | } |
957 | CardinalityOptions::CardinalityOptions(const CardinalityOptions& from) |
958 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
959 | _internal_metadata_(nullptr) { |
960 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
961 | compute_level_ = from.compute_level_; |
962 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.CardinalityOptions) |
963 | } |
964 | |
965 | void CardinalityOptions::SharedCtor() { |
966 | compute_level_ = 0; |
967 | } |
968 | |
969 | CardinalityOptions::~CardinalityOptions() { |
970 | // @@protoc_insertion_point(destructor:tensorflow.data.CardinalityOptions) |
971 | SharedDtor(); |
972 | } |
973 | |
974 | void CardinalityOptions::SharedDtor() { |
975 | } |
976 | |
977 | void CardinalityOptions::SetCachedSize(int size) const { |
978 | _cached_size_.Set(size); |
979 | } |
980 | const CardinalityOptions& CardinalityOptions::default_instance() { |
981 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CardinalityOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base); |
982 | return *internal_default_instance(); |
983 | } |
984 | |
985 | |
986 | void CardinalityOptions::Clear() { |
987 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.CardinalityOptions) |
988 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
989 | // Prevent compiler warnings about cached_has_bits being unused |
990 | (void) cached_has_bits; |
991 | |
992 | compute_level_ = 0; |
993 | _internal_metadata_.Clear(); |
994 | } |
995 | |
996 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
997 | const char* CardinalityOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
998 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
999 | while (!ctx->Done(&ptr)) { |
1000 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1001 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1002 | CHK_(ptr); |
1003 | switch (tag >> 3) { |
1004 | // .tensorflow.data.CardinalityOptions.ComputeLevel compute_level = 1; |
1005 | case 1: |
1006 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
1007 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1008 | CHK_(ptr); |
1009 | set_compute_level(static_cast<::tensorflow::data::CardinalityOptions_ComputeLevel>(val)); |
1010 | } else goto handle_unusual; |
1011 | continue; |
1012 | default: { |
1013 | handle_unusual: |
1014 | if ((tag & 7) == 4 || tag == 0) { |
1015 | ctx->SetLastTag(tag); |
1016 | goto success; |
1017 | } |
1018 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1019 | CHK_(ptr != nullptr); |
1020 | continue; |
1021 | } |
1022 | } // switch |
1023 | } // while |
1024 | success: |
1025 | return ptr; |
1026 | failure: |
1027 | ptr = nullptr; |
1028 | goto success; |
1029 | #undef CHK_ |
1030 | } |
1031 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1032 | bool CardinalityOptions::MergePartialFromCodedStream( |
1033 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1034 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1035 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1036 | // @@protoc_insertion_point(parse_start:tensorflow.data.CardinalityOptions) |
1037 | for (;;) { |
1038 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1039 | tag = p.first; |
1040 | if (!p.second) goto handle_unusual; |
1041 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1042 | // .tensorflow.data.CardinalityOptions.ComputeLevel compute_level = 1; |
1043 | case 1: { |
1044 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
1045 | int value = 0; |
1046 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1047 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
1048 | input, &value))); |
1049 | set_compute_level(static_cast< ::tensorflow::data::CardinalityOptions_ComputeLevel >(value)); |
1050 | } else { |
1051 | goto handle_unusual; |
1052 | } |
1053 | break; |
1054 | } |
1055 | |
1056 | default: { |
1057 | handle_unusual: |
1058 | if (tag == 0) { |
1059 | goto success; |
1060 | } |
1061 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1062 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1063 | break; |
1064 | } |
1065 | } |
1066 | } |
1067 | success: |
1068 | // @@protoc_insertion_point(parse_success:tensorflow.data.CardinalityOptions) |
1069 | return true; |
1070 | failure: |
1071 | // @@protoc_insertion_point(parse_failure:tensorflow.data.CardinalityOptions) |
1072 | return false; |
1073 | #undef DO_ |
1074 | } |
1075 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1076 | |
1077 | void CardinalityOptions::SerializeWithCachedSizes( |
1078 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1079 | // @@protoc_insertion_point(serialize_start:tensorflow.data.CardinalityOptions) |
1080 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1081 | (void) cached_has_bits; |
1082 | |
1083 | // .tensorflow.data.CardinalityOptions.ComputeLevel compute_level = 1; |
1084 | if (this->compute_level() != 0) { |
1085 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
1086 | 1, this->compute_level(), output); |
1087 | } |
1088 | |
1089 | if (_internal_metadata_.have_unknown_fields()) { |
1090 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1091 | _internal_metadata_.unknown_fields(), output); |
1092 | } |
1093 | // @@protoc_insertion_point(serialize_end:tensorflow.data.CardinalityOptions) |
1094 | } |
1095 | |
1096 | ::PROTOBUF_NAMESPACE_ID::uint8* CardinalityOptions::InternalSerializeWithCachedSizesToArray( |
1097 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1098 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.CardinalityOptions) |
1099 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1100 | (void) cached_has_bits; |
1101 | |
1102 | // .tensorflow.data.CardinalityOptions.ComputeLevel compute_level = 1; |
1103 | if (this->compute_level() != 0) { |
1104 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
1105 | 1, this->compute_level(), target); |
1106 | } |
1107 | |
1108 | if (_internal_metadata_.have_unknown_fields()) { |
1109 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1110 | _internal_metadata_.unknown_fields(), target); |
1111 | } |
1112 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.CardinalityOptions) |
1113 | return target; |
1114 | } |
1115 | |
1116 | size_t CardinalityOptions::ByteSizeLong() const { |
1117 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.CardinalityOptions) |
1118 | size_t total_size = 0; |
1119 | |
1120 | if (_internal_metadata_.have_unknown_fields()) { |
1121 | total_size += |
1122 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1123 | _internal_metadata_.unknown_fields()); |
1124 | } |
1125 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1126 | // Prevent compiler warnings about cached_has_bits being unused |
1127 | (void) cached_has_bits; |
1128 | |
1129 | // .tensorflow.data.CardinalityOptions.ComputeLevel compute_level = 1; |
1130 | if (this->compute_level() != 0) { |
1131 | total_size += 1 + |
1132 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->compute_level()); |
1133 | } |
1134 | |
1135 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1136 | SetCachedSize(cached_size); |
1137 | return total_size; |
1138 | } |
1139 | |
1140 | void CardinalityOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1141 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.CardinalityOptions) |
1142 | GOOGLE_DCHECK_NE(&from, this); |
1143 | const CardinalityOptions* source = |
1144 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CardinalityOptions>( |
1145 | &from); |
1146 | if (source == nullptr) { |
1147 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.CardinalityOptions) |
1148 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1149 | } else { |
1150 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.CardinalityOptions) |
1151 | MergeFrom(*source); |
1152 | } |
1153 | } |
1154 | |
1155 | void CardinalityOptions::MergeFrom(const CardinalityOptions& from) { |
1156 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.CardinalityOptions) |
1157 | GOOGLE_DCHECK_NE(&from, this); |
1158 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1159 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1160 | (void) cached_has_bits; |
1161 | |
1162 | if (from.compute_level() != 0) { |
1163 | set_compute_level(from.compute_level()); |
1164 | } |
1165 | } |
1166 | |
1167 | void CardinalityOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1168 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.CardinalityOptions) |
1169 | if (&from == this) return; |
1170 | Clear(); |
1171 | MergeFrom(from); |
1172 | } |
1173 | |
1174 | void CardinalityOptions::CopyFrom(const CardinalityOptions& from) { |
1175 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.CardinalityOptions) |
1176 | if (&from == this) return; |
1177 | Clear(); |
1178 | MergeFrom(from); |
1179 | } |
1180 | |
1181 | bool CardinalityOptions::IsInitialized() const { |
1182 | return true; |
1183 | } |
1184 | |
1185 | void CardinalityOptions::InternalSwap(CardinalityOptions* other) { |
1186 | using std::swap; |
1187 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1188 | swap(compute_level_, other->compute_level_); |
1189 | } |
1190 | |
1191 | ::PROTOBUF_NAMESPACE_ID::Metadata CardinalityOptions::GetMetadata() const { |
1192 | return GetMetadataStatic(); |
1193 | } |
1194 | |
1195 | |
1196 | // =================================================================== |
1197 | |
1198 | void DistributeOptions::InitAsDefaultInstance() { |
1199 | ::tensorflow::data::_DistributeOptions_default_instance_.num_devices_ = 0; |
1200 | } |
1201 | class DistributeOptions::_Internal { |
1202 | public: |
1203 | }; |
1204 | |
1205 | DistributeOptions::DistributeOptions() |
1206 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1207 | SharedCtor(); |
1208 | // @@protoc_insertion_point(constructor:tensorflow.data.DistributeOptions) |
1209 | } |
1210 | DistributeOptions::DistributeOptions(const DistributeOptions& from) |
1211 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1212 | _internal_metadata_(nullptr) { |
1213 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1214 | auto_shard_policy_ = from.auto_shard_policy_; |
1215 | clear_has_optional_num_devices(); |
1216 | switch (from.optional_num_devices_case()) { |
1217 | case kNumDevices: { |
1218 | set_num_devices(from.num_devices()); |
1219 | break; |
1220 | } |
1221 | case OPTIONAL_NUM_DEVICES_NOT_SET: { |
1222 | break; |
1223 | } |
1224 | } |
1225 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.DistributeOptions) |
1226 | } |
1227 | |
1228 | void DistributeOptions::SharedCtor() { |
1229 | auto_shard_policy_ = 0; |
1230 | clear_has_optional_num_devices(); |
1231 | } |
1232 | |
1233 | DistributeOptions::~DistributeOptions() { |
1234 | // @@protoc_insertion_point(destructor:tensorflow.data.DistributeOptions) |
1235 | SharedDtor(); |
1236 | } |
1237 | |
1238 | void DistributeOptions::SharedDtor() { |
1239 | if (has_optional_num_devices()) { |
1240 | clear_optional_num_devices(); |
1241 | } |
1242 | } |
1243 | |
1244 | void DistributeOptions::SetCachedSize(int size) const { |
1245 | _cached_size_.Set(size); |
1246 | } |
1247 | const DistributeOptions& DistributeOptions::default_instance() { |
1248 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DistributeOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base); |
1249 | return *internal_default_instance(); |
1250 | } |
1251 | |
1252 | |
1253 | void DistributeOptions::clear_optional_num_devices() { |
1254 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.DistributeOptions) |
1255 | switch (optional_num_devices_case()) { |
1256 | case kNumDevices: { |
1257 | // No need to clear |
1258 | break; |
1259 | } |
1260 | case OPTIONAL_NUM_DEVICES_NOT_SET: { |
1261 | break; |
1262 | } |
1263 | } |
1264 | _oneof_case_[0] = OPTIONAL_NUM_DEVICES_NOT_SET; |
1265 | } |
1266 | |
1267 | |
1268 | void DistributeOptions::Clear() { |
1269 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.DistributeOptions) |
1270 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1271 | // Prevent compiler warnings about cached_has_bits being unused |
1272 | (void) cached_has_bits; |
1273 | |
1274 | auto_shard_policy_ = 0; |
1275 | clear_optional_num_devices(); |
1276 | _internal_metadata_.Clear(); |
1277 | } |
1278 | |
1279 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1280 | const char* DistributeOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1281 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1282 | while (!ctx->Done(&ptr)) { |
1283 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1284 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1285 | CHK_(ptr); |
1286 | switch (tag >> 3) { |
1287 | // .tensorflow.data.AutoShardPolicy auto_shard_policy = 1; |
1288 | case 1: |
1289 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
1290 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1291 | CHK_(ptr); |
1292 | set_auto_shard_policy(static_cast<::tensorflow::data::AutoShardPolicy>(val)); |
1293 | } else goto handle_unusual; |
1294 | continue; |
1295 | // int32 num_devices = 2; |
1296 | case 2: |
1297 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
1298 | set_num_devices(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1299 | CHK_(ptr); |
1300 | } else goto handle_unusual; |
1301 | continue; |
1302 | default: { |
1303 | handle_unusual: |
1304 | if ((tag & 7) == 4 || tag == 0) { |
1305 | ctx->SetLastTag(tag); |
1306 | goto success; |
1307 | } |
1308 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1309 | CHK_(ptr != nullptr); |
1310 | continue; |
1311 | } |
1312 | } // switch |
1313 | } // while |
1314 | success: |
1315 | return ptr; |
1316 | failure: |
1317 | ptr = nullptr; |
1318 | goto success; |
1319 | #undef CHK_ |
1320 | } |
1321 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1322 | bool DistributeOptions::MergePartialFromCodedStream( |
1323 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1324 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1325 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1326 | // @@protoc_insertion_point(parse_start:tensorflow.data.DistributeOptions) |
1327 | for (;;) { |
1328 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1329 | tag = p.first; |
1330 | if (!p.second) goto handle_unusual; |
1331 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1332 | // .tensorflow.data.AutoShardPolicy auto_shard_policy = 1; |
1333 | case 1: { |
1334 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
1335 | int value = 0; |
1336 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1337 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
1338 | input, &value))); |
1339 | set_auto_shard_policy(static_cast< ::tensorflow::data::AutoShardPolicy >(value)); |
1340 | } else { |
1341 | goto handle_unusual; |
1342 | } |
1343 | break; |
1344 | } |
1345 | |
1346 | // int32 num_devices = 2; |
1347 | case 2: { |
1348 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
1349 | clear_optional_num_devices(); |
1350 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1351 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
1352 | input, &optional_num_devices_.num_devices_))); |
1353 | set_has_num_devices(); |
1354 | } else { |
1355 | goto handle_unusual; |
1356 | } |
1357 | break; |
1358 | } |
1359 | |
1360 | default: { |
1361 | handle_unusual: |
1362 | if (tag == 0) { |
1363 | goto success; |
1364 | } |
1365 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1366 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1367 | break; |
1368 | } |
1369 | } |
1370 | } |
1371 | success: |
1372 | // @@protoc_insertion_point(parse_success:tensorflow.data.DistributeOptions) |
1373 | return true; |
1374 | failure: |
1375 | // @@protoc_insertion_point(parse_failure:tensorflow.data.DistributeOptions) |
1376 | return false; |
1377 | #undef DO_ |
1378 | } |
1379 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1380 | |
1381 | void DistributeOptions::SerializeWithCachedSizes( |
1382 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1383 | // @@protoc_insertion_point(serialize_start:tensorflow.data.DistributeOptions) |
1384 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1385 | (void) cached_has_bits; |
1386 | |
1387 | // .tensorflow.data.AutoShardPolicy auto_shard_policy = 1; |
1388 | if (this->auto_shard_policy() != 0) { |
1389 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
1390 | 1, this->auto_shard_policy(), output); |
1391 | } |
1392 | |
1393 | // int32 num_devices = 2; |
1394 | if (has_num_devices()) { |
1395 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->num_devices(), output); |
1396 | } |
1397 | |
1398 | if (_internal_metadata_.have_unknown_fields()) { |
1399 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1400 | _internal_metadata_.unknown_fields(), output); |
1401 | } |
1402 | // @@protoc_insertion_point(serialize_end:tensorflow.data.DistributeOptions) |
1403 | } |
1404 | |
1405 | ::PROTOBUF_NAMESPACE_ID::uint8* DistributeOptions::InternalSerializeWithCachedSizesToArray( |
1406 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1407 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.DistributeOptions) |
1408 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1409 | (void) cached_has_bits; |
1410 | |
1411 | // .tensorflow.data.AutoShardPolicy auto_shard_policy = 1; |
1412 | if (this->auto_shard_policy() != 0) { |
1413 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
1414 | 1, this->auto_shard_policy(), target); |
1415 | } |
1416 | |
1417 | // int32 num_devices = 2; |
1418 | if (has_num_devices()) { |
1419 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->num_devices(), target); |
1420 | } |
1421 | |
1422 | if (_internal_metadata_.have_unknown_fields()) { |
1423 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1424 | _internal_metadata_.unknown_fields(), target); |
1425 | } |
1426 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.DistributeOptions) |
1427 | return target; |
1428 | } |
1429 | |
1430 | size_t DistributeOptions::ByteSizeLong() const { |
1431 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.DistributeOptions) |
1432 | size_t total_size = 0; |
1433 | |
1434 | if (_internal_metadata_.have_unknown_fields()) { |
1435 | total_size += |
1436 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1437 | _internal_metadata_.unknown_fields()); |
1438 | } |
1439 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1440 | // Prevent compiler warnings about cached_has_bits being unused |
1441 | (void) cached_has_bits; |
1442 | |
1443 | // .tensorflow.data.AutoShardPolicy auto_shard_policy = 1; |
1444 | if (this->auto_shard_policy() != 0) { |
1445 | total_size += 1 + |
1446 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->auto_shard_policy()); |
1447 | } |
1448 | |
1449 | switch (optional_num_devices_case()) { |
1450 | // int32 num_devices = 2; |
1451 | case kNumDevices: { |
1452 | total_size += 1 + |
1453 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1454 | this->num_devices()); |
1455 | break; |
1456 | } |
1457 | case OPTIONAL_NUM_DEVICES_NOT_SET: { |
1458 | break; |
1459 | } |
1460 | } |
1461 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1462 | SetCachedSize(cached_size); |
1463 | return total_size; |
1464 | } |
1465 | |
1466 | void DistributeOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1467 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.DistributeOptions) |
1468 | GOOGLE_DCHECK_NE(&from, this); |
1469 | const DistributeOptions* source = |
1470 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DistributeOptions>( |
1471 | &from); |
1472 | if (source == nullptr) { |
1473 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.DistributeOptions) |
1474 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1475 | } else { |
1476 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.DistributeOptions) |
1477 | MergeFrom(*source); |
1478 | } |
1479 | } |
1480 | |
1481 | void DistributeOptions::MergeFrom(const DistributeOptions& from) { |
1482 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.DistributeOptions) |
1483 | GOOGLE_DCHECK_NE(&from, this); |
1484 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1485 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1486 | (void) cached_has_bits; |
1487 | |
1488 | if (from.auto_shard_policy() != 0) { |
1489 | set_auto_shard_policy(from.auto_shard_policy()); |
1490 | } |
1491 | switch (from.optional_num_devices_case()) { |
1492 | case kNumDevices: { |
1493 | set_num_devices(from.num_devices()); |
1494 | break; |
1495 | } |
1496 | case OPTIONAL_NUM_DEVICES_NOT_SET: { |
1497 | break; |
1498 | } |
1499 | } |
1500 | } |
1501 | |
1502 | void DistributeOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1503 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.DistributeOptions) |
1504 | if (&from == this) return; |
1505 | Clear(); |
1506 | MergeFrom(from); |
1507 | } |
1508 | |
1509 | void DistributeOptions::CopyFrom(const DistributeOptions& from) { |
1510 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.DistributeOptions) |
1511 | if (&from == this) return; |
1512 | Clear(); |
1513 | MergeFrom(from); |
1514 | } |
1515 | |
1516 | bool DistributeOptions::IsInitialized() const { |
1517 | return true; |
1518 | } |
1519 | |
1520 | void DistributeOptions::InternalSwap(DistributeOptions* other) { |
1521 | using std::swap; |
1522 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1523 | swap(auto_shard_policy_, other->auto_shard_policy_); |
1524 | swap(optional_num_devices_, other->optional_num_devices_); |
1525 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
1526 | } |
1527 | |
1528 | ::PROTOBUF_NAMESPACE_ID::Metadata DistributeOptions::GetMetadata() const { |
1529 | return GetMetadataStatic(); |
1530 | } |
1531 | |
1532 | |
1533 | // =================================================================== |
1534 | |
1535 | void OptimizationOptions::InitAsDefaultInstance() { |
1536 | ::tensorflow::data::_OptimizationOptions_default_instance_.apply_default_optimizations_ = false; |
1537 | ::tensorflow::data::_OptimizationOptions_default_instance_.filter_fusion_ = false; |
1538 | ::tensorflow::data::_OptimizationOptions_default_instance_.map_and_batch_fusion_ = false; |
1539 | ::tensorflow::data::_OptimizationOptions_default_instance_.map_and_filter_fusion_ = false; |
1540 | ::tensorflow::data::_OptimizationOptions_default_instance_.map_fusion_ = false; |
1541 | ::tensorflow::data::_OptimizationOptions_default_instance_.map_parallelization_ = false; |
1542 | ::tensorflow::data::_OptimizationOptions_default_instance_.noop_elimination_ = false; |
1543 | ::tensorflow::data::_OptimizationOptions_default_instance_.parallel_batch_ = false; |
1544 | ::tensorflow::data::_OptimizationOptions_default_instance_.shuffle_and_repeat_fusion_ = false; |
1545 | ::tensorflow::data::_OptimizationOptions_default_instance_.filter_parallelization_ = false; |
1546 | ::tensorflow::data::_OptimizationOptions_default_instance_.inject_prefetch_ = false; |
1547 | } |
1548 | class OptimizationOptions::_Internal { |
1549 | public: |
1550 | }; |
1551 | |
1552 | OptimizationOptions::OptimizationOptions() |
1553 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1554 | SharedCtor(); |
1555 | // @@protoc_insertion_point(constructor:tensorflow.data.OptimizationOptions) |
1556 | } |
1557 | OptimizationOptions::OptimizationOptions(const OptimizationOptions& from) |
1558 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1559 | _internal_metadata_(nullptr) { |
1560 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1561 | clear_has_optional_apply_default_optimizations(); |
1562 | switch (from.optional_apply_default_optimizations_case()) { |
1563 | case kApplyDefaultOptimizations: { |
1564 | set_apply_default_optimizations(from.apply_default_optimizations()); |
1565 | break; |
1566 | } |
1567 | case OPTIONAL_APPLY_DEFAULT_OPTIMIZATIONS_NOT_SET: { |
1568 | break; |
1569 | } |
1570 | } |
1571 | clear_has_optional_filter_fusion(); |
1572 | switch (from.optional_filter_fusion_case()) { |
1573 | case kFilterFusion: { |
1574 | set_filter_fusion(from.filter_fusion()); |
1575 | break; |
1576 | } |
1577 | case OPTIONAL_FILTER_FUSION_NOT_SET: { |
1578 | break; |
1579 | } |
1580 | } |
1581 | clear_has_optional_map_and_batch_fusion(); |
1582 | switch (from.optional_map_and_batch_fusion_case()) { |
1583 | case kMapAndBatchFusion: { |
1584 | set_map_and_batch_fusion(from.map_and_batch_fusion()); |
1585 | break; |
1586 | } |
1587 | case OPTIONAL_MAP_AND_BATCH_FUSION_NOT_SET: { |
1588 | break; |
1589 | } |
1590 | } |
1591 | clear_has_optional_map_and_filter_fusion(); |
1592 | switch (from.optional_map_and_filter_fusion_case()) { |
1593 | case kMapAndFilterFusion: { |
1594 | set_map_and_filter_fusion(from.map_and_filter_fusion()); |
1595 | break; |
1596 | } |
1597 | case OPTIONAL_MAP_AND_FILTER_FUSION_NOT_SET: { |
1598 | break; |
1599 | } |
1600 | } |
1601 | clear_has_optional_map_fusion(); |
1602 | switch (from.optional_map_fusion_case()) { |
1603 | case kMapFusion: { |
1604 | set_map_fusion(from.map_fusion()); |
1605 | break; |
1606 | } |
1607 | case OPTIONAL_MAP_FUSION_NOT_SET: { |
1608 | break; |
1609 | } |
1610 | } |
1611 | clear_has_optional_map_parallelization(); |
1612 | switch (from.optional_map_parallelization_case()) { |
1613 | case kMapParallelization: { |
1614 | set_map_parallelization(from.map_parallelization()); |
1615 | break; |
1616 | } |
1617 | case OPTIONAL_MAP_PARALLELIZATION_NOT_SET: { |
1618 | break; |
1619 | } |
1620 | } |
1621 | clear_has_optional_noop_elimination(); |
1622 | switch (from.optional_noop_elimination_case()) { |
1623 | case kNoopElimination: { |
1624 | set_noop_elimination(from.noop_elimination()); |
1625 | break; |
1626 | } |
1627 | case OPTIONAL_NOOP_ELIMINATION_NOT_SET: { |
1628 | break; |
1629 | } |
1630 | } |
1631 | clear_has_optional_parallel_batch(); |
1632 | switch (from.optional_parallel_batch_case()) { |
1633 | case kParallelBatch: { |
1634 | set_parallel_batch(from.parallel_batch()); |
1635 | break; |
1636 | } |
1637 | case OPTIONAL_PARALLEL_BATCH_NOT_SET: { |
1638 | break; |
1639 | } |
1640 | } |
1641 | clear_has_optional_shuffle_and_repeat_fusion(); |
1642 | switch (from.optional_shuffle_and_repeat_fusion_case()) { |
1643 | case kShuffleAndRepeatFusion: { |
1644 | set_shuffle_and_repeat_fusion(from.shuffle_and_repeat_fusion()); |
1645 | break; |
1646 | } |
1647 | case OPTIONAL_SHUFFLE_AND_REPEAT_FUSION_NOT_SET: { |
1648 | break; |
1649 | } |
1650 | } |
1651 | clear_has_optional_filter_parallelization(); |
1652 | switch (from.optional_filter_parallelization_case()) { |
1653 | case kFilterParallelization: { |
1654 | set_filter_parallelization(from.filter_parallelization()); |
1655 | break; |
1656 | } |
1657 | case OPTIONAL_FILTER_PARALLELIZATION_NOT_SET: { |
1658 | break; |
1659 | } |
1660 | } |
1661 | clear_has_optional_inject_prefetch(); |
1662 | switch (from.optional_inject_prefetch_case()) { |
1663 | case kInjectPrefetch: { |
1664 | set_inject_prefetch(from.inject_prefetch()); |
1665 | break; |
1666 | } |
1667 | case OPTIONAL_INJECT_PREFETCH_NOT_SET: { |
1668 | break; |
1669 | } |
1670 | } |
1671 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.OptimizationOptions) |
1672 | } |
1673 | |
1674 | void OptimizationOptions::SharedCtor() { |
1675 | clear_has_optional_apply_default_optimizations(); |
1676 | clear_has_optional_filter_fusion(); |
1677 | clear_has_optional_map_and_batch_fusion(); |
1678 | clear_has_optional_map_and_filter_fusion(); |
1679 | clear_has_optional_map_fusion(); |
1680 | clear_has_optional_map_parallelization(); |
1681 | clear_has_optional_noop_elimination(); |
1682 | clear_has_optional_parallel_batch(); |
1683 | clear_has_optional_shuffle_and_repeat_fusion(); |
1684 | clear_has_optional_filter_parallelization(); |
1685 | clear_has_optional_inject_prefetch(); |
1686 | } |
1687 | |
1688 | OptimizationOptions::~OptimizationOptions() { |
1689 | // @@protoc_insertion_point(destructor:tensorflow.data.OptimizationOptions) |
1690 | SharedDtor(); |
1691 | } |
1692 | |
1693 | void OptimizationOptions::SharedDtor() { |
1694 | if (has_optional_apply_default_optimizations()) { |
1695 | clear_optional_apply_default_optimizations(); |
1696 | } |
1697 | if (has_optional_filter_fusion()) { |
1698 | clear_optional_filter_fusion(); |
1699 | } |
1700 | if (has_optional_map_and_batch_fusion()) { |
1701 | clear_optional_map_and_batch_fusion(); |
1702 | } |
1703 | if (has_optional_map_and_filter_fusion()) { |
1704 | clear_optional_map_and_filter_fusion(); |
1705 | } |
1706 | if (has_optional_map_fusion()) { |
1707 | clear_optional_map_fusion(); |
1708 | } |
1709 | if (has_optional_map_parallelization()) { |
1710 | clear_optional_map_parallelization(); |
1711 | } |
1712 | if (has_optional_noop_elimination()) { |
1713 | clear_optional_noop_elimination(); |
1714 | } |
1715 | if (has_optional_parallel_batch()) { |
1716 | clear_optional_parallel_batch(); |
1717 | } |
1718 | if (has_optional_shuffle_and_repeat_fusion()) { |
1719 | clear_optional_shuffle_and_repeat_fusion(); |
1720 | } |
1721 | if (has_optional_filter_parallelization()) { |
1722 | clear_optional_filter_parallelization(); |
1723 | } |
1724 | if (has_optional_inject_prefetch()) { |
1725 | clear_optional_inject_prefetch(); |
1726 | } |
1727 | } |
1728 | |
1729 | void OptimizationOptions::SetCachedSize(int size) const { |
1730 | _cached_size_.Set(size); |
1731 | } |
1732 | const OptimizationOptions& OptimizationOptions::default_instance() { |
1733 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_OptimizationOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base); |
1734 | return *internal_default_instance(); |
1735 | } |
1736 | |
1737 | |
1738 | void OptimizationOptions::clear_optional_apply_default_optimizations() { |
1739 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1740 | switch (optional_apply_default_optimizations_case()) { |
1741 | case kApplyDefaultOptimizations: { |
1742 | // No need to clear |
1743 | break; |
1744 | } |
1745 | case OPTIONAL_APPLY_DEFAULT_OPTIMIZATIONS_NOT_SET: { |
1746 | break; |
1747 | } |
1748 | } |
1749 | _oneof_case_[0] = OPTIONAL_APPLY_DEFAULT_OPTIMIZATIONS_NOT_SET; |
1750 | } |
1751 | |
1752 | void OptimizationOptions::clear_optional_filter_fusion() { |
1753 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1754 | switch (optional_filter_fusion_case()) { |
1755 | case kFilterFusion: { |
1756 | // No need to clear |
1757 | break; |
1758 | } |
1759 | case OPTIONAL_FILTER_FUSION_NOT_SET: { |
1760 | break; |
1761 | } |
1762 | } |
1763 | _oneof_case_[1] = OPTIONAL_FILTER_FUSION_NOT_SET; |
1764 | } |
1765 | |
1766 | void OptimizationOptions::clear_optional_map_and_batch_fusion() { |
1767 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1768 | switch (optional_map_and_batch_fusion_case()) { |
1769 | case kMapAndBatchFusion: { |
1770 | // No need to clear |
1771 | break; |
1772 | } |
1773 | case OPTIONAL_MAP_AND_BATCH_FUSION_NOT_SET: { |
1774 | break; |
1775 | } |
1776 | } |
1777 | _oneof_case_[2] = OPTIONAL_MAP_AND_BATCH_FUSION_NOT_SET; |
1778 | } |
1779 | |
1780 | void OptimizationOptions::clear_optional_map_and_filter_fusion() { |
1781 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1782 | switch (optional_map_and_filter_fusion_case()) { |
1783 | case kMapAndFilterFusion: { |
1784 | // No need to clear |
1785 | break; |
1786 | } |
1787 | case OPTIONAL_MAP_AND_FILTER_FUSION_NOT_SET: { |
1788 | break; |
1789 | } |
1790 | } |
1791 | _oneof_case_[3] = OPTIONAL_MAP_AND_FILTER_FUSION_NOT_SET; |
1792 | } |
1793 | |
1794 | void OptimizationOptions::clear_optional_map_fusion() { |
1795 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1796 | switch (optional_map_fusion_case()) { |
1797 | case kMapFusion: { |
1798 | // No need to clear |
1799 | break; |
1800 | } |
1801 | case OPTIONAL_MAP_FUSION_NOT_SET: { |
1802 | break; |
1803 | } |
1804 | } |
1805 | _oneof_case_[4] = OPTIONAL_MAP_FUSION_NOT_SET; |
1806 | } |
1807 | |
1808 | void OptimizationOptions::clear_optional_map_parallelization() { |
1809 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1810 | switch (optional_map_parallelization_case()) { |
1811 | case kMapParallelization: { |
1812 | // No need to clear |
1813 | break; |
1814 | } |
1815 | case OPTIONAL_MAP_PARALLELIZATION_NOT_SET: { |
1816 | break; |
1817 | } |
1818 | } |
1819 | _oneof_case_[5] = OPTIONAL_MAP_PARALLELIZATION_NOT_SET; |
1820 | } |
1821 | |
1822 | void OptimizationOptions::clear_optional_noop_elimination() { |
1823 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1824 | switch (optional_noop_elimination_case()) { |
1825 | case kNoopElimination: { |
1826 | // No need to clear |
1827 | break; |
1828 | } |
1829 | case OPTIONAL_NOOP_ELIMINATION_NOT_SET: { |
1830 | break; |
1831 | } |
1832 | } |
1833 | _oneof_case_[6] = OPTIONAL_NOOP_ELIMINATION_NOT_SET; |
1834 | } |
1835 | |
1836 | void OptimizationOptions::clear_optional_parallel_batch() { |
1837 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1838 | switch (optional_parallel_batch_case()) { |
1839 | case kParallelBatch: { |
1840 | // No need to clear |
1841 | break; |
1842 | } |
1843 | case OPTIONAL_PARALLEL_BATCH_NOT_SET: { |
1844 | break; |
1845 | } |
1846 | } |
1847 | _oneof_case_[7] = OPTIONAL_PARALLEL_BATCH_NOT_SET; |
1848 | } |
1849 | |
1850 | void OptimizationOptions::clear_optional_shuffle_and_repeat_fusion() { |
1851 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1852 | switch (optional_shuffle_and_repeat_fusion_case()) { |
1853 | case kShuffleAndRepeatFusion: { |
1854 | // No need to clear |
1855 | break; |
1856 | } |
1857 | case OPTIONAL_SHUFFLE_AND_REPEAT_FUSION_NOT_SET: { |
1858 | break; |
1859 | } |
1860 | } |
1861 | _oneof_case_[8] = OPTIONAL_SHUFFLE_AND_REPEAT_FUSION_NOT_SET; |
1862 | } |
1863 | |
1864 | void OptimizationOptions::clear_optional_filter_parallelization() { |
1865 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1866 | switch (optional_filter_parallelization_case()) { |
1867 | case kFilterParallelization: { |
1868 | // No need to clear |
1869 | break; |
1870 | } |
1871 | case OPTIONAL_FILTER_PARALLELIZATION_NOT_SET: { |
1872 | break; |
1873 | } |
1874 | } |
1875 | _oneof_case_[9] = OPTIONAL_FILTER_PARALLELIZATION_NOT_SET; |
1876 | } |
1877 | |
1878 | void OptimizationOptions::clear_optional_inject_prefetch() { |
1879 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.OptimizationOptions) |
1880 | switch (optional_inject_prefetch_case()) { |
1881 | case kInjectPrefetch: { |
1882 | // No need to clear |
1883 | break; |
1884 | } |
1885 | case OPTIONAL_INJECT_PREFETCH_NOT_SET: { |
1886 | break; |
1887 | } |
1888 | } |
1889 | _oneof_case_[10] = OPTIONAL_INJECT_PREFETCH_NOT_SET; |
1890 | } |
1891 | |
1892 | |
1893 | void OptimizationOptions::Clear() { |
1894 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.OptimizationOptions) |
1895 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1896 | // Prevent compiler warnings about cached_has_bits being unused |
1897 | (void) cached_has_bits; |
1898 | |
1899 | clear_optional_apply_default_optimizations(); |
1900 | clear_optional_filter_fusion(); |
1901 | clear_optional_map_and_batch_fusion(); |
1902 | clear_optional_map_and_filter_fusion(); |
1903 | clear_optional_map_fusion(); |
1904 | clear_optional_map_parallelization(); |
1905 | clear_optional_noop_elimination(); |
1906 | clear_optional_parallel_batch(); |
1907 | clear_optional_shuffle_and_repeat_fusion(); |
1908 | clear_optional_filter_parallelization(); |
1909 | clear_optional_inject_prefetch(); |
1910 | _internal_metadata_.Clear(); |
1911 | } |
1912 | |
1913 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1914 | const char* OptimizationOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1915 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1916 | while (!ctx->Done(&ptr)) { |
1917 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1918 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1919 | CHK_(ptr); |
1920 | switch (tag >> 3) { |
1921 | // bool apply_default_optimizations = 1; |
1922 | case 1: |
1923 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
1924 | set_apply_default_optimizations(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1925 | CHK_(ptr); |
1926 | } else goto handle_unusual; |
1927 | continue; |
1928 | // bool filter_fusion = 6; |
1929 | case 6: |
1930 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
1931 | set_filter_fusion(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1932 | CHK_(ptr); |
1933 | } else goto handle_unusual; |
1934 | continue; |
1935 | // bool map_and_batch_fusion = 9; |
1936 | case 9: |
1937 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { |
1938 | set_map_and_batch_fusion(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1939 | CHK_(ptr); |
1940 | } else goto handle_unusual; |
1941 | continue; |
1942 | // bool map_and_filter_fusion = 10; |
1943 | case 10: |
1944 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { |
1945 | set_map_and_filter_fusion(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1946 | CHK_(ptr); |
1947 | } else goto handle_unusual; |
1948 | continue; |
1949 | // bool map_fusion = 11; |
1950 | case 11: |
1951 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { |
1952 | set_map_fusion(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1953 | CHK_(ptr); |
1954 | } else goto handle_unusual; |
1955 | continue; |
1956 | // bool map_parallelization = 12; |
1957 | case 12: |
1958 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { |
1959 | set_map_parallelization(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1960 | CHK_(ptr); |
1961 | } else goto handle_unusual; |
1962 | continue; |
1963 | // bool noop_elimination = 14; |
1964 | case 14: |
1965 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { |
1966 | set_noop_elimination(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1967 | CHK_(ptr); |
1968 | } else goto handle_unusual; |
1969 | continue; |
1970 | // bool parallel_batch = 15; |
1971 | case 15: |
1972 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { |
1973 | set_parallel_batch(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1974 | CHK_(ptr); |
1975 | } else goto handle_unusual; |
1976 | continue; |
1977 | // bool shuffle_and_repeat_fusion = 17; |
1978 | case 17: |
1979 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { |
1980 | set_shuffle_and_repeat_fusion(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1981 | CHK_(ptr); |
1982 | } else goto handle_unusual; |
1983 | continue; |
1984 | // bool filter_parallelization = 18; |
1985 | case 18: |
1986 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { |
1987 | set_filter_parallelization(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1988 | CHK_(ptr); |
1989 | } else goto handle_unusual; |
1990 | continue; |
1991 | // bool inject_prefetch = 19; |
1992 | case 19: |
1993 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { |
1994 | set_inject_prefetch(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1995 | CHK_(ptr); |
1996 | } else goto handle_unusual; |
1997 | continue; |
1998 | default: { |
1999 | handle_unusual: |
2000 | if ((tag & 7) == 4 || tag == 0) { |
2001 | ctx->SetLastTag(tag); |
2002 | goto success; |
2003 | } |
2004 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2005 | CHK_(ptr != nullptr); |
2006 | continue; |
2007 | } |
2008 | } // switch |
2009 | } // while |
2010 | success: |
2011 | return ptr; |
2012 | failure: |
2013 | ptr = nullptr; |
2014 | goto success; |
2015 | #undef CHK_ |
2016 | } |
2017 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2018 | bool OptimizationOptions::MergePartialFromCodedStream( |
2019 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2020 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2021 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2022 | // @@protoc_insertion_point(parse_start:tensorflow.data.OptimizationOptions) |
2023 | for (;;) { |
2024 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); |
2025 | tag = p.first; |
2026 | if (!p.second) goto handle_unusual; |
2027 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2028 | // bool apply_default_optimizations = 1; |
2029 | case 1: { |
2030 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
2031 | clear_optional_apply_default_optimizations(); |
2032 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2033 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2034 | input, &optional_apply_default_optimizations_.apply_default_optimizations_))); |
2035 | set_has_apply_default_optimizations(); |
2036 | } else { |
2037 | goto handle_unusual; |
2038 | } |
2039 | break; |
2040 | } |
2041 | |
2042 | // bool filter_fusion = 6; |
2043 | case 6: { |
2044 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { |
2045 | clear_optional_filter_fusion(); |
2046 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2047 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2048 | input, &optional_filter_fusion_.filter_fusion_))); |
2049 | set_has_filter_fusion(); |
2050 | } else { |
2051 | goto handle_unusual; |
2052 | } |
2053 | break; |
2054 | } |
2055 | |
2056 | // bool map_and_batch_fusion = 9; |
2057 | case 9: { |
2058 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { |
2059 | clear_optional_map_and_batch_fusion(); |
2060 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2061 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2062 | input, &optional_map_and_batch_fusion_.map_and_batch_fusion_))); |
2063 | set_has_map_and_batch_fusion(); |
2064 | } else { |
2065 | goto handle_unusual; |
2066 | } |
2067 | break; |
2068 | } |
2069 | |
2070 | // bool map_and_filter_fusion = 10; |
2071 | case 10: { |
2072 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { |
2073 | clear_optional_map_and_filter_fusion(); |
2074 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2075 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2076 | input, &optional_map_and_filter_fusion_.map_and_filter_fusion_))); |
2077 | set_has_map_and_filter_fusion(); |
2078 | } else { |
2079 | goto handle_unusual; |
2080 | } |
2081 | break; |
2082 | } |
2083 | |
2084 | // bool map_fusion = 11; |
2085 | case 11: { |
2086 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (88 & 0xFF)) { |
2087 | clear_optional_map_fusion(); |
2088 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2089 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2090 | input, &optional_map_fusion_.map_fusion_))); |
2091 | set_has_map_fusion(); |
2092 | } else { |
2093 | goto handle_unusual; |
2094 | } |
2095 | break; |
2096 | } |
2097 | |
2098 | // bool map_parallelization = 12; |
2099 | case 12: { |
2100 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (96 & 0xFF)) { |
2101 | clear_optional_map_parallelization(); |
2102 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2103 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2104 | input, &optional_map_parallelization_.map_parallelization_))); |
2105 | set_has_map_parallelization(); |
2106 | } else { |
2107 | goto handle_unusual; |
2108 | } |
2109 | break; |
2110 | } |
2111 | |
2112 | // bool noop_elimination = 14; |
2113 | case 14: { |
2114 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (112 & 0xFF)) { |
2115 | clear_optional_noop_elimination(); |
2116 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2117 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2118 | input, &optional_noop_elimination_.noop_elimination_))); |
2119 | set_has_noop_elimination(); |
2120 | } else { |
2121 | goto handle_unusual; |
2122 | } |
2123 | break; |
2124 | } |
2125 | |
2126 | // bool parallel_batch = 15; |
2127 | case 15: { |
2128 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (120 & 0xFF)) { |
2129 | clear_optional_parallel_batch(); |
2130 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2131 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2132 | input, &optional_parallel_batch_.parallel_batch_))); |
2133 | set_has_parallel_batch(); |
2134 | } else { |
2135 | goto handle_unusual; |
2136 | } |
2137 | break; |
2138 | } |
2139 | |
2140 | // bool shuffle_and_repeat_fusion = 17; |
2141 | case 17: { |
2142 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (136 & 0xFF)) { |
2143 | clear_optional_shuffle_and_repeat_fusion(); |
2144 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2145 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2146 | input, &optional_shuffle_and_repeat_fusion_.shuffle_and_repeat_fusion_))); |
2147 | set_has_shuffle_and_repeat_fusion(); |
2148 | } else { |
2149 | goto handle_unusual; |
2150 | } |
2151 | break; |
2152 | } |
2153 | |
2154 | // bool filter_parallelization = 18; |
2155 | case 18: { |
2156 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (144 & 0xFF)) { |
2157 | clear_optional_filter_parallelization(); |
2158 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2159 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2160 | input, &optional_filter_parallelization_.filter_parallelization_))); |
2161 | set_has_filter_parallelization(); |
2162 | } else { |
2163 | goto handle_unusual; |
2164 | } |
2165 | break; |
2166 | } |
2167 | |
2168 | // bool inject_prefetch = 19; |
2169 | case 19: { |
2170 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (152 & 0xFF)) { |
2171 | clear_optional_inject_prefetch(); |
2172 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2173 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2174 | input, &optional_inject_prefetch_.inject_prefetch_))); |
2175 | set_has_inject_prefetch(); |
2176 | } else { |
2177 | goto handle_unusual; |
2178 | } |
2179 | break; |
2180 | } |
2181 | |
2182 | default: { |
2183 | handle_unusual: |
2184 | if (tag == 0) { |
2185 | goto success; |
2186 | } |
2187 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2188 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2189 | break; |
2190 | } |
2191 | } |
2192 | } |
2193 | success: |
2194 | // @@protoc_insertion_point(parse_success:tensorflow.data.OptimizationOptions) |
2195 | return true; |
2196 | failure: |
2197 | // @@protoc_insertion_point(parse_failure:tensorflow.data.OptimizationOptions) |
2198 | return false; |
2199 | #undef DO_ |
2200 | } |
2201 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2202 | |
2203 | void OptimizationOptions::SerializeWithCachedSizes( |
2204 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2205 | // @@protoc_insertion_point(serialize_start:tensorflow.data.OptimizationOptions) |
2206 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2207 | (void) cached_has_bits; |
2208 | |
2209 | // bool apply_default_optimizations = 1; |
2210 | if (has_apply_default_optimizations()) { |
2211 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->apply_default_optimizations(), output); |
2212 | } |
2213 | |
2214 | // bool filter_fusion = 6; |
2215 | if (has_filter_fusion()) { |
2216 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(6, this->filter_fusion(), output); |
2217 | } |
2218 | |
2219 | // bool map_and_batch_fusion = 9; |
2220 | if (has_map_and_batch_fusion()) { |
2221 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(9, this->map_and_batch_fusion(), output); |
2222 | } |
2223 | |
2224 | // bool map_and_filter_fusion = 10; |
2225 | if (has_map_and_filter_fusion()) { |
2226 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(10, this->map_and_filter_fusion(), output); |
2227 | } |
2228 | |
2229 | // bool map_fusion = 11; |
2230 | if (has_map_fusion()) { |
2231 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(11, this->map_fusion(), output); |
2232 | } |
2233 | |
2234 | // bool map_parallelization = 12; |
2235 | if (has_map_parallelization()) { |
2236 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(12, this->map_parallelization(), output); |
2237 | } |
2238 | |
2239 | // bool noop_elimination = 14; |
2240 | if (has_noop_elimination()) { |
2241 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(14, this->noop_elimination(), output); |
2242 | } |
2243 | |
2244 | // bool parallel_batch = 15; |
2245 | if (has_parallel_batch()) { |
2246 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(15, this->parallel_batch(), output); |
2247 | } |
2248 | |
2249 | // bool shuffle_and_repeat_fusion = 17; |
2250 | if (has_shuffle_and_repeat_fusion()) { |
2251 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(17, this->shuffle_and_repeat_fusion(), output); |
2252 | } |
2253 | |
2254 | // bool filter_parallelization = 18; |
2255 | if (has_filter_parallelization()) { |
2256 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(18, this->filter_parallelization(), output); |
2257 | } |
2258 | |
2259 | // bool inject_prefetch = 19; |
2260 | if (has_inject_prefetch()) { |
2261 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(19, this->inject_prefetch(), output); |
2262 | } |
2263 | |
2264 | if (_internal_metadata_.have_unknown_fields()) { |
2265 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2266 | _internal_metadata_.unknown_fields(), output); |
2267 | } |
2268 | // @@protoc_insertion_point(serialize_end:tensorflow.data.OptimizationOptions) |
2269 | } |
2270 | |
2271 | ::PROTOBUF_NAMESPACE_ID::uint8* OptimizationOptions::InternalSerializeWithCachedSizesToArray( |
2272 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2273 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.OptimizationOptions) |
2274 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2275 | (void) cached_has_bits; |
2276 | |
2277 | // bool apply_default_optimizations = 1; |
2278 | if (has_apply_default_optimizations()) { |
2279 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->apply_default_optimizations(), target); |
2280 | } |
2281 | |
2282 | // bool filter_fusion = 6; |
2283 | if (has_filter_fusion()) { |
2284 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->filter_fusion(), target); |
2285 | } |
2286 | |
2287 | // bool map_and_batch_fusion = 9; |
2288 | if (has_map_and_batch_fusion()) { |
2289 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->map_and_batch_fusion(), target); |
2290 | } |
2291 | |
2292 | // bool map_and_filter_fusion = 10; |
2293 | if (has_map_and_filter_fusion()) { |
2294 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->map_and_filter_fusion(), target); |
2295 | } |
2296 | |
2297 | // bool map_fusion = 11; |
2298 | if (has_map_fusion()) { |
2299 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->map_fusion(), target); |
2300 | } |
2301 | |
2302 | // bool map_parallelization = 12; |
2303 | if (has_map_parallelization()) { |
2304 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->map_parallelization(), target); |
2305 | } |
2306 | |
2307 | // bool noop_elimination = 14; |
2308 | if (has_noop_elimination()) { |
2309 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->noop_elimination(), target); |
2310 | } |
2311 | |
2312 | // bool parallel_batch = 15; |
2313 | if (has_parallel_batch()) { |
2314 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->parallel_batch(), target); |
2315 | } |
2316 | |
2317 | // bool shuffle_and_repeat_fusion = 17; |
2318 | if (has_shuffle_and_repeat_fusion()) { |
2319 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->shuffle_and_repeat_fusion(), target); |
2320 | } |
2321 | |
2322 | // bool filter_parallelization = 18; |
2323 | if (has_filter_parallelization()) { |
2324 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->filter_parallelization(), target); |
2325 | } |
2326 | |
2327 | // bool inject_prefetch = 19; |
2328 | if (has_inject_prefetch()) { |
2329 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->inject_prefetch(), target); |
2330 | } |
2331 | |
2332 | if (_internal_metadata_.have_unknown_fields()) { |
2333 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2334 | _internal_metadata_.unknown_fields(), target); |
2335 | } |
2336 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.OptimizationOptions) |
2337 | return target; |
2338 | } |
2339 | |
2340 | size_t OptimizationOptions::ByteSizeLong() const { |
2341 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.OptimizationOptions) |
2342 | size_t total_size = 0; |
2343 | |
2344 | if (_internal_metadata_.have_unknown_fields()) { |
2345 | total_size += |
2346 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2347 | _internal_metadata_.unknown_fields()); |
2348 | } |
2349 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2350 | // Prevent compiler warnings about cached_has_bits being unused |
2351 | (void) cached_has_bits; |
2352 | |
2353 | switch (optional_apply_default_optimizations_case()) { |
2354 | // bool apply_default_optimizations = 1; |
2355 | case kApplyDefaultOptimizations: { |
2356 | total_size += 1 + 1; |
2357 | break; |
2358 | } |
2359 | case OPTIONAL_APPLY_DEFAULT_OPTIMIZATIONS_NOT_SET: { |
2360 | break; |
2361 | } |
2362 | } |
2363 | switch (optional_filter_fusion_case()) { |
2364 | // bool filter_fusion = 6; |
2365 | case kFilterFusion: { |
2366 | total_size += 1 + 1; |
2367 | break; |
2368 | } |
2369 | case OPTIONAL_FILTER_FUSION_NOT_SET: { |
2370 | break; |
2371 | } |
2372 | } |
2373 | switch (optional_map_and_batch_fusion_case()) { |
2374 | // bool map_and_batch_fusion = 9; |
2375 | case kMapAndBatchFusion: { |
2376 | total_size += 1 + 1; |
2377 | break; |
2378 | } |
2379 | case OPTIONAL_MAP_AND_BATCH_FUSION_NOT_SET: { |
2380 | break; |
2381 | } |
2382 | } |
2383 | switch (optional_map_and_filter_fusion_case()) { |
2384 | // bool map_and_filter_fusion = 10; |
2385 | case kMapAndFilterFusion: { |
2386 | total_size += 1 + 1; |
2387 | break; |
2388 | } |
2389 | case OPTIONAL_MAP_AND_FILTER_FUSION_NOT_SET: { |
2390 | break; |
2391 | } |
2392 | } |
2393 | switch (optional_map_fusion_case()) { |
2394 | // bool map_fusion = 11; |
2395 | case kMapFusion: { |
2396 | total_size += 1 + 1; |
2397 | break; |
2398 | } |
2399 | case OPTIONAL_MAP_FUSION_NOT_SET: { |
2400 | break; |
2401 | } |
2402 | } |
2403 | switch (optional_map_parallelization_case()) { |
2404 | // bool map_parallelization = 12; |
2405 | case kMapParallelization: { |
2406 | total_size += 1 + 1; |
2407 | break; |
2408 | } |
2409 | case OPTIONAL_MAP_PARALLELIZATION_NOT_SET: { |
2410 | break; |
2411 | } |
2412 | } |
2413 | switch (optional_noop_elimination_case()) { |
2414 | // bool noop_elimination = 14; |
2415 | case kNoopElimination: { |
2416 | total_size += 1 + 1; |
2417 | break; |
2418 | } |
2419 | case OPTIONAL_NOOP_ELIMINATION_NOT_SET: { |
2420 | break; |
2421 | } |
2422 | } |
2423 | switch (optional_parallel_batch_case()) { |
2424 | // bool parallel_batch = 15; |
2425 | case kParallelBatch: { |
2426 | total_size += 1 + 1; |
2427 | break; |
2428 | } |
2429 | case OPTIONAL_PARALLEL_BATCH_NOT_SET: { |
2430 | break; |
2431 | } |
2432 | } |
2433 | switch (optional_shuffle_and_repeat_fusion_case()) { |
2434 | // bool shuffle_and_repeat_fusion = 17; |
2435 | case kShuffleAndRepeatFusion: { |
2436 | total_size += 2 + 1; |
2437 | break; |
2438 | } |
2439 | case OPTIONAL_SHUFFLE_AND_REPEAT_FUSION_NOT_SET: { |
2440 | break; |
2441 | } |
2442 | } |
2443 | switch (optional_filter_parallelization_case()) { |
2444 | // bool filter_parallelization = 18; |
2445 | case kFilterParallelization: { |
2446 | total_size += 2 + 1; |
2447 | break; |
2448 | } |
2449 | case OPTIONAL_FILTER_PARALLELIZATION_NOT_SET: { |
2450 | break; |
2451 | } |
2452 | } |
2453 | switch (optional_inject_prefetch_case()) { |
2454 | // bool inject_prefetch = 19; |
2455 | case kInjectPrefetch: { |
2456 | total_size += 2 + 1; |
2457 | break; |
2458 | } |
2459 | case OPTIONAL_INJECT_PREFETCH_NOT_SET: { |
2460 | break; |
2461 | } |
2462 | } |
2463 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2464 | SetCachedSize(cached_size); |
2465 | return total_size; |
2466 | } |
2467 | |
2468 | void OptimizationOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2469 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.OptimizationOptions) |
2470 | GOOGLE_DCHECK_NE(&from, this); |
2471 | const OptimizationOptions* source = |
2472 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<OptimizationOptions>( |
2473 | &from); |
2474 | if (source == nullptr) { |
2475 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.OptimizationOptions) |
2476 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2477 | } else { |
2478 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.OptimizationOptions) |
2479 | MergeFrom(*source); |
2480 | } |
2481 | } |
2482 | |
2483 | void OptimizationOptions::MergeFrom(const OptimizationOptions& from) { |
2484 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.OptimizationOptions) |
2485 | GOOGLE_DCHECK_NE(&from, this); |
2486 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2487 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2488 | (void) cached_has_bits; |
2489 | |
2490 | switch (from.optional_apply_default_optimizations_case()) { |
2491 | case kApplyDefaultOptimizations: { |
2492 | set_apply_default_optimizations(from.apply_default_optimizations()); |
2493 | break; |
2494 | } |
2495 | case OPTIONAL_APPLY_DEFAULT_OPTIMIZATIONS_NOT_SET: { |
2496 | break; |
2497 | } |
2498 | } |
2499 | switch (from.optional_filter_fusion_case()) { |
2500 | case kFilterFusion: { |
2501 | set_filter_fusion(from.filter_fusion()); |
2502 | break; |
2503 | } |
2504 | case OPTIONAL_FILTER_FUSION_NOT_SET: { |
2505 | break; |
2506 | } |
2507 | } |
2508 | switch (from.optional_map_and_batch_fusion_case()) { |
2509 | case kMapAndBatchFusion: { |
2510 | set_map_and_batch_fusion(from.map_and_batch_fusion()); |
2511 | break; |
2512 | } |
2513 | case OPTIONAL_MAP_AND_BATCH_FUSION_NOT_SET: { |
2514 | break; |
2515 | } |
2516 | } |
2517 | switch (from.optional_map_and_filter_fusion_case()) { |
2518 | case kMapAndFilterFusion: { |
2519 | set_map_and_filter_fusion(from.map_and_filter_fusion()); |
2520 | break; |
2521 | } |
2522 | case OPTIONAL_MAP_AND_FILTER_FUSION_NOT_SET: { |
2523 | break; |
2524 | } |
2525 | } |
2526 | switch (from.optional_map_fusion_case()) { |
2527 | case kMapFusion: { |
2528 | set_map_fusion(from.map_fusion()); |
2529 | break; |
2530 | } |
2531 | case OPTIONAL_MAP_FUSION_NOT_SET: { |
2532 | break; |
2533 | } |
2534 | } |
2535 | switch (from.optional_map_parallelization_case()) { |
2536 | case kMapParallelization: { |
2537 | set_map_parallelization(from.map_parallelization()); |
2538 | break; |
2539 | } |
2540 | case OPTIONAL_MAP_PARALLELIZATION_NOT_SET: { |
2541 | break; |
2542 | } |
2543 | } |
2544 | switch (from.optional_noop_elimination_case()) { |
2545 | case kNoopElimination: { |
2546 | set_noop_elimination(from.noop_elimination()); |
2547 | break; |
2548 | } |
2549 | case OPTIONAL_NOOP_ELIMINATION_NOT_SET: { |
2550 | break; |
2551 | } |
2552 | } |
2553 | switch (from.optional_parallel_batch_case()) { |
2554 | case kParallelBatch: { |
2555 | set_parallel_batch(from.parallel_batch()); |
2556 | break; |
2557 | } |
2558 | case OPTIONAL_PARALLEL_BATCH_NOT_SET: { |
2559 | break; |
2560 | } |
2561 | } |
2562 | switch (from.optional_shuffle_and_repeat_fusion_case()) { |
2563 | case kShuffleAndRepeatFusion: { |
2564 | set_shuffle_and_repeat_fusion(from.shuffle_and_repeat_fusion()); |
2565 | break; |
2566 | } |
2567 | case OPTIONAL_SHUFFLE_AND_REPEAT_FUSION_NOT_SET: { |
2568 | break; |
2569 | } |
2570 | } |
2571 | switch (from.optional_filter_parallelization_case()) { |
2572 | case kFilterParallelization: { |
2573 | set_filter_parallelization(from.filter_parallelization()); |
2574 | break; |
2575 | } |
2576 | case OPTIONAL_FILTER_PARALLELIZATION_NOT_SET: { |
2577 | break; |
2578 | } |
2579 | } |
2580 | switch (from.optional_inject_prefetch_case()) { |
2581 | case kInjectPrefetch: { |
2582 | set_inject_prefetch(from.inject_prefetch()); |
2583 | break; |
2584 | } |
2585 | case OPTIONAL_INJECT_PREFETCH_NOT_SET: { |
2586 | break; |
2587 | } |
2588 | } |
2589 | } |
2590 | |
2591 | void OptimizationOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2592 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.OptimizationOptions) |
2593 | if (&from == this) return; |
2594 | Clear(); |
2595 | MergeFrom(from); |
2596 | } |
2597 | |
2598 | void OptimizationOptions::CopyFrom(const OptimizationOptions& from) { |
2599 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.OptimizationOptions) |
2600 | if (&from == this) return; |
2601 | Clear(); |
2602 | MergeFrom(from); |
2603 | } |
2604 | |
2605 | bool OptimizationOptions::IsInitialized() const { |
2606 | return true; |
2607 | } |
2608 | |
2609 | void OptimizationOptions::InternalSwap(OptimizationOptions* other) { |
2610 | using std::swap; |
2611 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2612 | swap(optional_apply_default_optimizations_, other->optional_apply_default_optimizations_); |
2613 | swap(optional_filter_fusion_, other->optional_filter_fusion_); |
2614 | swap(optional_map_and_batch_fusion_, other->optional_map_and_batch_fusion_); |
2615 | swap(optional_map_and_filter_fusion_, other->optional_map_and_filter_fusion_); |
2616 | swap(optional_map_fusion_, other->optional_map_fusion_); |
2617 | swap(optional_map_parallelization_, other->optional_map_parallelization_); |
2618 | swap(optional_noop_elimination_, other->optional_noop_elimination_); |
2619 | swap(optional_parallel_batch_, other->optional_parallel_batch_); |
2620 | swap(optional_shuffle_and_repeat_fusion_, other->optional_shuffle_and_repeat_fusion_); |
2621 | swap(optional_filter_parallelization_, other->optional_filter_parallelization_); |
2622 | swap(optional_inject_prefetch_, other->optional_inject_prefetch_); |
2623 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
2624 | swap(_oneof_case_[1], other->_oneof_case_[1]); |
2625 | swap(_oneof_case_[2], other->_oneof_case_[2]); |
2626 | swap(_oneof_case_[3], other->_oneof_case_[3]); |
2627 | swap(_oneof_case_[4], other->_oneof_case_[4]); |
2628 | swap(_oneof_case_[5], other->_oneof_case_[5]); |
2629 | swap(_oneof_case_[6], other->_oneof_case_[6]); |
2630 | swap(_oneof_case_[7], other->_oneof_case_[7]); |
2631 | swap(_oneof_case_[8], other->_oneof_case_[8]); |
2632 | swap(_oneof_case_[9], other->_oneof_case_[9]); |
2633 | swap(_oneof_case_[10], other->_oneof_case_[10]); |
2634 | } |
2635 | |
2636 | ::PROTOBUF_NAMESPACE_ID::Metadata OptimizationOptions::GetMetadata() const { |
2637 | return GetMetadataStatic(); |
2638 | } |
2639 | |
2640 | |
2641 | // =================================================================== |
2642 | |
2643 | void ThreadingOptions::InitAsDefaultInstance() { |
2644 | ::tensorflow::data::_ThreadingOptions_default_instance_.max_intra_op_parallelism_ = 0; |
2645 | ::tensorflow::data::_ThreadingOptions_default_instance_.private_threadpool_size_ = 0; |
2646 | } |
2647 | class ThreadingOptions::_Internal { |
2648 | public: |
2649 | }; |
2650 | |
2651 | ThreadingOptions::ThreadingOptions() |
2652 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2653 | SharedCtor(); |
2654 | // @@protoc_insertion_point(constructor:tensorflow.data.ThreadingOptions) |
2655 | } |
2656 | ThreadingOptions::ThreadingOptions(const ThreadingOptions& from) |
2657 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2658 | _internal_metadata_(nullptr) { |
2659 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2660 | clear_has_optional_max_intra_op_parallelism(); |
2661 | switch (from.optional_max_intra_op_parallelism_case()) { |
2662 | case kMaxIntraOpParallelism: { |
2663 | set_max_intra_op_parallelism(from.max_intra_op_parallelism()); |
2664 | break; |
2665 | } |
2666 | case OPTIONAL_MAX_INTRA_OP_PARALLELISM_NOT_SET: { |
2667 | break; |
2668 | } |
2669 | } |
2670 | clear_has_optional_private_threadpool_size(); |
2671 | switch (from.optional_private_threadpool_size_case()) { |
2672 | case kPrivateThreadpoolSize: { |
2673 | set_private_threadpool_size(from.private_threadpool_size()); |
2674 | break; |
2675 | } |
2676 | case OPTIONAL_PRIVATE_THREADPOOL_SIZE_NOT_SET: { |
2677 | break; |
2678 | } |
2679 | } |
2680 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.ThreadingOptions) |
2681 | } |
2682 | |
2683 | void ThreadingOptions::SharedCtor() { |
2684 | clear_has_optional_max_intra_op_parallelism(); |
2685 | clear_has_optional_private_threadpool_size(); |
2686 | } |
2687 | |
2688 | ThreadingOptions::~ThreadingOptions() { |
2689 | // @@protoc_insertion_point(destructor:tensorflow.data.ThreadingOptions) |
2690 | SharedDtor(); |
2691 | } |
2692 | |
2693 | void ThreadingOptions::SharedDtor() { |
2694 | if (has_optional_max_intra_op_parallelism()) { |
2695 | clear_optional_max_intra_op_parallelism(); |
2696 | } |
2697 | if (has_optional_private_threadpool_size()) { |
2698 | clear_optional_private_threadpool_size(); |
2699 | } |
2700 | } |
2701 | |
2702 | void ThreadingOptions::SetCachedSize(int size) const { |
2703 | _cached_size_.Set(size); |
2704 | } |
2705 | const ThreadingOptions& ThreadingOptions::default_instance() { |
2706 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ThreadingOptions_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base); |
2707 | return *internal_default_instance(); |
2708 | } |
2709 | |
2710 | |
2711 | void ThreadingOptions::clear_optional_max_intra_op_parallelism() { |
2712 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.ThreadingOptions) |
2713 | switch (optional_max_intra_op_parallelism_case()) { |
2714 | case kMaxIntraOpParallelism: { |
2715 | // No need to clear |
2716 | break; |
2717 | } |
2718 | case OPTIONAL_MAX_INTRA_OP_PARALLELISM_NOT_SET: { |
2719 | break; |
2720 | } |
2721 | } |
2722 | _oneof_case_[0] = OPTIONAL_MAX_INTRA_OP_PARALLELISM_NOT_SET; |
2723 | } |
2724 | |
2725 | void ThreadingOptions::clear_optional_private_threadpool_size() { |
2726 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.ThreadingOptions) |
2727 | switch (optional_private_threadpool_size_case()) { |
2728 | case kPrivateThreadpoolSize: { |
2729 | // No need to clear |
2730 | break; |
2731 | } |
2732 | case OPTIONAL_PRIVATE_THREADPOOL_SIZE_NOT_SET: { |
2733 | break; |
2734 | } |
2735 | } |
2736 | _oneof_case_[1] = OPTIONAL_PRIVATE_THREADPOOL_SIZE_NOT_SET; |
2737 | } |
2738 | |
2739 | |
2740 | void ThreadingOptions::Clear() { |
2741 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.ThreadingOptions) |
2742 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2743 | // Prevent compiler warnings about cached_has_bits being unused |
2744 | (void) cached_has_bits; |
2745 | |
2746 | clear_optional_max_intra_op_parallelism(); |
2747 | clear_optional_private_threadpool_size(); |
2748 | _internal_metadata_.Clear(); |
2749 | } |
2750 | |
2751 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2752 | const char* ThreadingOptions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2753 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2754 | while (!ctx->Done(&ptr)) { |
2755 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2756 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2757 | CHK_(ptr); |
2758 | switch (tag >> 3) { |
2759 | // int32 max_intra_op_parallelism = 1; |
2760 | case 1: |
2761 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
2762 | set_max_intra_op_parallelism(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
2763 | CHK_(ptr); |
2764 | } else goto handle_unusual; |
2765 | continue; |
2766 | // int32 private_threadpool_size = 2; |
2767 | case 2: |
2768 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
2769 | set_private_threadpool_size(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
2770 | CHK_(ptr); |
2771 | } else goto handle_unusual; |
2772 | continue; |
2773 | default: { |
2774 | handle_unusual: |
2775 | if ((tag & 7) == 4 || tag == 0) { |
2776 | ctx->SetLastTag(tag); |
2777 | goto success; |
2778 | } |
2779 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2780 | CHK_(ptr != nullptr); |
2781 | continue; |
2782 | } |
2783 | } // switch |
2784 | } // while |
2785 | success: |
2786 | return ptr; |
2787 | failure: |
2788 | ptr = nullptr; |
2789 | goto success; |
2790 | #undef CHK_ |
2791 | } |
2792 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2793 | bool ThreadingOptions::MergePartialFromCodedStream( |
2794 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2795 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2796 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2797 | // @@protoc_insertion_point(parse_start:tensorflow.data.ThreadingOptions) |
2798 | for (;;) { |
2799 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2800 | tag = p.first; |
2801 | if (!p.second) goto handle_unusual; |
2802 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2803 | // int32 max_intra_op_parallelism = 1; |
2804 | case 1: { |
2805 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
2806 | clear_optional_max_intra_op_parallelism(); |
2807 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2808 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
2809 | input, &optional_max_intra_op_parallelism_.max_intra_op_parallelism_))); |
2810 | set_has_max_intra_op_parallelism(); |
2811 | } else { |
2812 | goto handle_unusual; |
2813 | } |
2814 | break; |
2815 | } |
2816 | |
2817 | // int32 private_threadpool_size = 2; |
2818 | case 2: { |
2819 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
2820 | clear_optional_private_threadpool_size(); |
2821 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2822 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
2823 | input, &optional_private_threadpool_size_.private_threadpool_size_))); |
2824 | set_has_private_threadpool_size(); |
2825 | } else { |
2826 | goto handle_unusual; |
2827 | } |
2828 | break; |
2829 | } |
2830 | |
2831 | default: { |
2832 | handle_unusual: |
2833 | if (tag == 0) { |
2834 | goto success; |
2835 | } |
2836 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2837 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2838 | break; |
2839 | } |
2840 | } |
2841 | } |
2842 | success: |
2843 | // @@protoc_insertion_point(parse_success:tensorflow.data.ThreadingOptions) |
2844 | return true; |
2845 | failure: |
2846 | // @@protoc_insertion_point(parse_failure:tensorflow.data.ThreadingOptions) |
2847 | return false; |
2848 | #undef DO_ |
2849 | } |
2850 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2851 | |
2852 | void ThreadingOptions::SerializeWithCachedSizes( |
2853 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2854 | // @@protoc_insertion_point(serialize_start:tensorflow.data.ThreadingOptions) |
2855 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2856 | (void) cached_has_bits; |
2857 | |
2858 | // int32 max_intra_op_parallelism = 1; |
2859 | if (has_max_intra_op_parallelism()) { |
2860 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->max_intra_op_parallelism(), output); |
2861 | } |
2862 | |
2863 | // int32 private_threadpool_size = 2; |
2864 | if (has_private_threadpool_size()) { |
2865 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->private_threadpool_size(), output); |
2866 | } |
2867 | |
2868 | if (_internal_metadata_.have_unknown_fields()) { |
2869 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2870 | _internal_metadata_.unknown_fields(), output); |
2871 | } |
2872 | // @@protoc_insertion_point(serialize_end:tensorflow.data.ThreadingOptions) |
2873 | } |
2874 | |
2875 | ::PROTOBUF_NAMESPACE_ID::uint8* ThreadingOptions::InternalSerializeWithCachedSizesToArray( |
2876 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2877 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.ThreadingOptions) |
2878 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2879 | (void) cached_has_bits; |
2880 | |
2881 | // int32 max_intra_op_parallelism = 1; |
2882 | if (has_max_intra_op_parallelism()) { |
2883 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->max_intra_op_parallelism(), target); |
2884 | } |
2885 | |
2886 | // int32 private_threadpool_size = 2; |
2887 | if (has_private_threadpool_size()) { |
2888 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->private_threadpool_size(), target); |
2889 | } |
2890 | |
2891 | if (_internal_metadata_.have_unknown_fields()) { |
2892 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2893 | _internal_metadata_.unknown_fields(), target); |
2894 | } |
2895 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.ThreadingOptions) |
2896 | return target; |
2897 | } |
2898 | |
2899 | size_t ThreadingOptions::ByteSizeLong() const { |
2900 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.ThreadingOptions) |
2901 | size_t total_size = 0; |
2902 | |
2903 | if (_internal_metadata_.have_unknown_fields()) { |
2904 | total_size += |
2905 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2906 | _internal_metadata_.unknown_fields()); |
2907 | } |
2908 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2909 | // Prevent compiler warnings about cached_has_bits being unused |
2910 | (void) cached_has_bits; |
2911 | |
2912 | switch (optional_max_intra_op_parallelism_case()) { |
2913 | // int32 max_intra_op_parallelism = 1; |
2914 | case kMaxIntraOpParallelism: { |
2915 | total_size += 1 + |
2916 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
2917 | this->max_intra_op_parallelism()); |
2918 | break; |
2919 | } |
2920 | case OPTIONAL_MAX_INTRA_OP_PARALLELISM_NOT_SET: { |
2921 | break; |
2922 | } |
2923 | } |
2924 | switch (optional_private_threadpool_size_case()) { |
2925 | // int32 private_threadpool_size = 2; |
2926 | case kPrivateThreadpoolSize: { |
2927 | total_size += 1 + |
2928 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
2929 | this->private_threadpool_size()); |
2930 | break; |
2931 | } |
2932 | case OPTIONAL_PRIVATE_THREADPOOL_SIZE_NOT_SET: { |
2933 | break; |
2934 | } |
2935 | } |
2936 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2937 | SetCachedSize(cached_size); |
2938 | return total_size; |
2939 | } |
2940 | |
2941 | void ThreadingOptions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2942 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.ThreadingOptions) |
2943 | GOOGLE_DCHECK_NE(&from, this); |
2944 | const ThreadingOptions* source = |
2945 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ThreadingOptions>( |
2946 | &from); |
2947 | if (source == nullptr) { |
2948 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.ThreadingOptions) |
2949 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2950 | } else { |
2951 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.ThreadingOptions) |
2952 | MergeFrom(*source); |
2953 | } |
2954 | } |
2955 | |
2956 | void ThreadingOptions::MergeFrom(const ThreadingOptions& from) { |
2957 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.ThreadingOptions) |
2958 | GOOGLE_DCHECK_NE(&from, this); |
2959 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2960 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2961 | (void) cached_has_bits; |
2962 | |
2963 | switch (from.optional_max_intra_op_parallelism_case()) { |
2964 | case kMaxIntraOpParallelism: { |
2965 | set_max_intra_op_parallelism(from.max_intra_op_parallelism()); |
2966 | break; |
2967 | } |
2968 | case OPTIONAL_MAX_INTRA_OP_PARALLELISM_NOT_SET: { |
2969 | break; |
2970 | } |
2971 | } |
2972 | switch (from.optional_private_threadpool_size_case()) { |
2973 | case kPrivateThreadpoolSize: { |
2974 | set_private_threadpool_size(from.private_threadpool_size()); |
2975 | break; |
2976 | } |
2977 | case OPTIONAL_PRIVATE_THREADPOOL_SIZE_NOT_SET: { |
2978 | break; |
2979 | } |
2980 | } |
2981 | } |
2982 | |
2983 | void ThreadingOptions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2984 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.ThreadingOptions) |
2985 | if (&from == this) return; |
2986 | Clear(); |
2987 | MergeFrom(from); |
2988 | } |
2989 | |
2990 | void ThreadingOptions::CopyFrom(const ThreadingOptions& from) { |
2991 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.ThreadingOptions) |
2992 | if (&from == this) return; |
2993 | Clear(); |
2994 | MergeFrom(from); |
2995 | } |
2996 | |
2997 | bool ThreadingOptions::IsInitialized() const { |
2998 | return true; |
2999 | } |
3000 | |
3001 | void ThreadingOptions::InternalSwap(ThreadingOptions* other) { |
3002 | using std::swap; |
3003 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3004 | swap(optional_max_intra_op_parallelism_, other->optional_max_intra_op_parallelism_); |
3005 | swap(optional_private_threadpool_size_, other->optional_private_threadpool_size_); |
3006 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
3007 | swap(_oneof_case_[1], other->_oneof_case_[1]); |
3008 | } |
3009 | |
3010 | ::PROTOBUF_NAMESPACE_ID::Metadata ThreadingOptions::GetMetadata() const { |
3011 | return GetMetadataStatic(); |
3012 | } |
3013 | |
3014 | |
3015 | // =================================================================== |
3016 | |
3017 | void Options::InitAsDefaultInstance() { |
3018 | ::tensorflow::data::_Options_default_instance_.deterministic_ = false; |
3019 | ::tensorflow::data::_Options_default_instance_._instance.get_mutable()->autotune_options_ = const_cast< ::tensorflow::data::AutotuneOptions*>( |
3020 | ::tensorflow::data::AutotuneOptions::internal_default_instance()); |
3021 | ::tensorflow::data::_Options_default_instance_._instance.get_mutable()->distribute_options_ = const_cast< ::tensorflow::data::DistributeOptions*>( |
3022 | ::tensorflow::data::DistributeOptions::internal_default_instance()); |
3023 | ::tensorflow::data::_Options_default_instance_._instance.get_mutable()->optimization_options_ = const_cast< ::tensorflow::data::OptimizationOptions*>( |
3024 | ::tensorflow::data::OptimizationOptions::internal_default_instance()); |
3025 | ::tensorflow::data::_Options_default_instance_.slack_ = false; |
3026 | ::tensorflow::data::_Options_default_instance_._instance.get_mutable()->threading_options_ = const_cast< ::tensorflow::data::ThreadingOptions*>( |
3027 | ::tensorflow::data::ThreadingOptions::internal_default_instance()); |
3028 | ::tensorflow::data::_Options_default_instance_.external_state_policy_ = 0; |
3029 | } |
3030 | class Options::_Internal { |
3031 | public: |
3032 | static const ::tensorflow::data::AutotuneOptions& autotune_options(const Options* msg); |
3033 | static const ::tensorflow::data::DistributeOptions& distribute_options(const Options* msg); |
3034 | static const ::tensorflow::data::OptimizationOptions& optimization_options(const Options* msg); |
3035 | static const ::tensorflow::data::ThreadingOptions& threading_options(const Options* msg); |
3036 | }; |
3037 | |
3038 | const ::tensorflow::data::AutotuneOptions& |
3039 | Options::_Internal::autotune_options(const Options* msg) { |
3040 | return *msg->autotune_options_; |
3041 | } |
3042 | const ::tensorflow::data::DistributeOptions& |
3043 | Options::_Internal::distribute_options(const Options* msg) { |
3044 | return *msg->distribute_options_; |
3045 | } |
3046 | const ::tensorflow::data::OptimizationOptions& |
3047 | Options::_Internal::optimization_options(const Options* msg) { |
3048 | return *msg->optimization_options_; |
3049 | } |
3050 | const ::tensorflow::data::ThreadingOptions& |
3051 | Options::_Internal::threading_options(const Options* msg) { |
3052 | return *msg->threading_options_; |
3053 | } |
3054 | Options::Options() |
3055 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3056 | SharedCtor(); |
3057 | // @@protoc_insertion_point(constructor:tensorflow.data.Options) |
3058 | } |
3059 | Options::Options(const Options& from) |
3060 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3061 | _internal_metadata_(nullptr) { |
3062 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3063 | if (from.has_distribute_options()) { |
3064 | distribute_options_ = new ::tensorflow::data::DistributeOptions(*from.distribute_options_); |
3065 | } else { |
3066 | distribute_options_ = nullptr; |
3067 | } |
3068 | if (from.has_optimization_options()) { |
3069 | optimization_options_ = new ::tensorflow::data::OptimizationOptions(*from.optimization_options_); |
3070 | } else { |
3071 | optimization_options_ = nullptr; |
3072 | } |
3073 | if (from.has_threading_options()) { |
3074 | threading_options_ = new ::tensorflow::data::ThreadingOptions(*from.threading_options_); |
3075 | } else { |
3076 | threading_options_ = nullptr; |
3077 | } |
3078 | if (from.has_autotune_options()) { |
3079 | autotune_options_ = new ::tensorflow::data::AutotuneOptions(*from.autotune_options_); |
3080 | } else { |
3081 | autotune_options_ = nullptr; |
3082 | } |
3083 | clear_has_optional_deterministic(); |
3084 | switch (from.optional_deterministic_case()) { |
3085 | case kDeterministic: { |
3086 | set_deterministic(from.deterministic()); |
3087 | break; |
3088 | } |
3089 | case OPTIONAL_DETERMINISTIC_NOT_SET: { |
3090 | break; |
3091 | } |
3092 | } |
3093 | clear_has_optional_slack(); |
3094 | switch (from.optional_slack_case()) { |
3095 | case kSlack: { |
3096 | set_slack(from.slack()); |
3097 | break; |
3098 | } |
3099 | case OPTIONAL_SLACK_NOT_SET: { |
3100 | break; |
3101 | } |
3102 | } |
3103 | clear_has_optional_external_state_policy(); |
3104 | switch (from.optional_external_state_policy_case()) { |
3105 | case kExternalStatePolicy: { |
3106 | set_external_state_policy(from.external_state_policy()); |
3107 | break; |
3108 | } |
3109 | case OPTIONAL_EXTERNAL_STATE_POLICY_NOT_SET: { |
3110 | break; |
3111 | } |
3112 | } |
3113 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.Options) |
3114 | } |
3115 | |
3116 | void Options::SharedCtor() { |
3117 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Options_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base); |
3118 | ::memset(&distribute_options_, 0, static_cast<size_t>( |
3119 | reinterpret_cast<char*>(&autotune_options_) - |
3120 | reinterpret_cast<char*>(&distribute_options_)) + sizeof(autotune_options_)); |
3121 | clear_has_optional_deterministic(); |
3122 | clear_has_optional_slack(); |
3123 | clear_has_optional_external_state_policy(); |
3124 | } |
3125 | |
3126 | Options::~Options() { |
3127 | // @@protoc_insertion_point(destructor:tensorflow.data.Options) |
3128 | SharedDtor(); |
3129 | } |
3130 | |
3131 | void Options::SharedDtor() { |
3132 | if (this != internal_default_instance()) delete distribute_options_; |
3133 | if (this != internal_default_instance()) delete optimization_options_; |
3134 | if (this != internal_default_instance()) delete threading_options_; |
3135 | if (this != internal_default_instance()) delete autotune_options_; |
3136 | if (has_optional_deterministic()) { |
3137 | clear_optional_deterministic(); |
3138 | } |
3139 | if (has_optional_slack()) { |
3140 | clear_optional_slack(); |
3141 | } |
3142 | if (has_optional_external_state_policy()) { |
3143 | clear_optional_external_state_policy(); |
3144 | } |
3145 | } |
3146 | |
3147 | void Options::SetCachedSize(int size) const { |
3148 | _cached_size_.Set(size); |
3149 | } |
3150 | const Options& Options::default_instance() { |
3151 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Options_tensorflow_2fcore_2fframework_2fdataset_5foptions_2eproto.base); |
3152 | return *internal_default_instance(); |
3153 | } |
3154 | |
3155 | |
3156 | void Options::clear_optional_deterministic() { |
3157 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.Options) |
3158 | switch (optional_deterministic_case()) { |
3159 | case kDeterministic: { |
3160 | // No need to clear |
3161 | break; |
3162 | } |
3163 | case OPTIONAL_DETERMINISTIC_NOT_SET: { |
3164 | break; |
3165 | } |
3166 | } |
3167 | _oneof_case_[0] = OPTIONAL_DETERMINISTIC_NOT_SET; |
3168 | } |
3169 | |
3170 | void Options::clear_optional_slack() { |
3171 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.Options) |
3172 | switch (optional_slack_case()) { |
3173 | case kSlack: { |
3174 | // No need to clear |
3175 | break; |
3176 | } |
3177 | case OPTIONAL_SLACK_NOT_SET: { |
3178 | break; |
3179 | } |
3180 | } |
3181 | _oneof_case_[1] = OPTIONAL_SLACK_NOT_SET; |
3182 | } |
3183 | |
3184 | void Options::clear_optional_external_state_policy() { |
3185 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.data.Options) |
3186 | switch (optional_external_state_policy_case()) { |
3187 | case kExternalStatePolicy: { |
3188 | // No need to clear |
3189 | break; |
3190 | } |
3191 | case OPTIONAL_EXTERNAL_STATE_POLICY_NOT_SET: { |
3192 | break; |
3193 | } |
3194 | } |
3195 | _oneof_case_[2] = OPTIONAL_EXTERNAL_STATE_POLICY_NOT_SET; |
3196 | } |
3197 | |
3198 | |
3199 | void Options::Clear() { |
3200 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.Options) |
3201 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3202 | // Prevent compiler warnings about cached_has_bits being unused |
3203 | (void) cached_has_bits; |
3204 | |
3205 | if (GetArenaNoVirtual() == nullptr && distribute_options_ != nullptr) { |
3206 | delete distribute_options_; |
3207 | } |
3208 | distribute_options_ = nullptr; |
3209 | if (GetArenaNoVirtual() == nullptr && optimization_options_ != nullptr) { |
3210 | delete optimization_options_; |
3211 | } |
3212 | optimization_options_ = nullptr; |
3213 | if (GetArenaNoVirtual() == nullptr && threading_options_ != nullptr) { |
3214 | delete threading_options_; |
3215 | } |
3216 | threading_options_ = nullptr; |
3217 | if (GetArenaNoVirtual() == nullptr && autotune_options_ != nullptr) { |
3218 | delete autotune_options_; |
3219 | } |
3220 | autotune_options_ = nullptr; |
3221 | clear_optional_deterministic(); |
3222 | clear_optional_slack(); |
3223 | clear_optional_external_state_policy(); |
3224 | _internal_metadata_.Clear(); |
3225 | } |
3226 | |
3227 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3228 | const char* Options::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3229 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3230 | while (!ctx->Done(&ptr)) { |
3231 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3232 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3233 | CHK_(ptr); |
3234 | switch (tag >> 3) { |
3235 | // bool deterministic = 1; |
3236 | case 1: |
3237 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
3238 | set_deterministic(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
3239 | CHK_(ptr); |
3240 | } else goto handle_unusual; |
3241 | continue; |
3242 | // .tensorflow.data.DistributeOptions distribute_options = 2; |
3243 | case 2: |
3244 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
3245 | ptr = ctx->ParseMessage(mutable_distribute_options(), ptr); |
3246 | CHK_(ptr); |
3247 | } else goto handle_unusual; |
3248 | continue; |
3249 | // .tensorflow.data.OptimizationOptions optimization_options = 3; |
3250 | case 3: |
3251 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
3252 | ptr = ctx->ParseMessage(mutable_optimization_options(), ptr); |
3253 | CHK_(ptr); |
3254 | } else goto handle_unusual; |
3255 | continue; |
3256 | // bool slack = 4; |
3257 | case 4: |
3258 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
3259 | set_slack(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
3260 | CHK_(ptr); |
3261 | } else goto handle_unusual; |
3262 | continue; |
3263 | // .tensorflow.data.ThreadingOptions threading_options = 5; |
3264 | case 5: |
3265 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
3266 | ptr = ctx->ParseMessage(mutable_threading_options(), ptr); |
3267 | CHK_(ptr); |
3268 | } else goto handle_unusual; |
3269 | continue; |
3270 | // .tensorflow.data.ExternalStatePolicy external_state_policy = 6; |
3271 | case 6: |
3272 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
3273 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3274 | CHK_(ptr); |
3275 | set_external_state_policy(static_cast<::tensorflow::data::ExternalStatePolicy>(val)); |
3276 | } else goto handle_unusual; |
3277 | continue; |
3278 | // .tensorflow.data.AutotuneOptions autotune_options = 7; |
3279 | case 7: |
3280 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
3281 | ptr = ctx->ParseMessage(mutable_autotune_options(), ptr); |
3282 | CHK_(ptr); |
3283 | } else goto handle_unusual; |
3284 | continue; |
3285 | default: { |
3286 | handle_unusual: |
3287 | if ((tag & 7) == 4 || tag == 0) { |
3288 | ctx->SetLastTag(tag); |
3289 | goto success; |
3290 | } |
3291 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3292 | CHK_(ptr != nullptr); |
3293 | continue; |
3294 | } |
3295 | } // switch |
3296 | } // while |
3297 | success: |
3298 | return ptr; |
3299 | failure: |
3300 | ptr = nullptr; |
3301 | goto success; |
3302 | #undef CHK_ |
3303 | } |
3304 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3305 | bool Options::MergePartialFromCodedStream( |
3306 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3307 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3308 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3309 | // @@protoc_insertion_point(parse_start:tensorflow.data.Options) |
3310 | for (;;) { |
3311 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3312 | tag = p.first; |
3313 | if (!p.second) goto handle_unusual; |
3314 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3315 | // bool deterministic = 1; |
3316 | case 1: { |
3317 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
3318 | clear_optional_deterministic(); |
3319 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3320 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
3321 | input, &optional_deterministic_.deterministic_))); |
3322 | set_has_deterministic(); |
3323 | } else { |
3324 | goto handle_unusual; |
3325 | } |
3326 | break; |
3327 | } |
3328 | |
3329 | // .tensorflow.data.DistributeOptions distribute_options = 2; |
3330 | case 2: { |
3331 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
3332 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3333 | input, mutable_distribute_options())); |
3334 | } else { |
3335 | goto handle_unusual; |
3336 | } |
3337 | break; |
3338 | } |
3339 | |
3340 | // .tensorflow.data.OptimizationOptions optimization_options = 3; |
3341 | case 3: { |
3342 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
3343 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3344 | input, mutable_optimization_options())); |
3345 | } else { |
3346 | goto handle_unusual; |
3347 | } |
3348 | break; |
3349 | } |
3350 | |
3351 | // bool slack = 4; |
3352 | case 4: { |
3353 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
3354 | clear_optional_slack(); |
3355 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3356 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
3357 | input, &optional_slack_.slack_))); |
3358 | set_has_slack(); |
3359 | } else { |
3360 | goto handle_unusual; |
3361 | } |
3362 | break; |
3363 | } |
3364 | |
3365 | // .tensorflow.data.ThreadingOptions threading_options = 5; |
3366 | case 5: { |
3367 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
3368 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3369 | input, mutable_threading_options())); |
3370 | } else { |
3371 | goto handle_unusual; |
3372 | } |
3373 | break; |
3374 | } |
3375 | |
3376 | // .tensorflow.data.ExternalStatePolicy external_state_policy = 6; |
3377 | case 6: { |
3378 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { |
3379 | int value = 0; |
3380 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3381 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
3382 | input, &value))); |
3383 | set_external_state_policy(static_cast< ::tensorflow::data::ExternalStatePolicy >(value)); |
3384 | } else { |
3385 | goto handle_unusual; |
3386 | } |
3387 | break; |
3388 | } |
3389 | |
3390 | // .tensorflow.data.AutotuneOptions autotune_options = 7; |
3391 | case 7: { |
3392 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
3393 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3394 | input, mutable_autotune_options())); |
3395 | } else { |
3396 | goto handle_unusual; |
3397 | } |
3398 | break; |
3399 | } |
3400 | |
3401 | default: { |
3402 | handle_unusual: |
3403 | if (tag == 0) { |
3404 | goto success; |
3405 | } |
3406 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3407 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3408 | break; |
3409 | } |
3410 | } |
3411 | } |
3412 | success: |
3413 | // @@protoc_insertion_point(parse_success:tensorflow.data.Options) |
3414 | return true; |
3415 | failure: |
3416 | // @@protoc_insertion_point(parse_failure:tensorflow.data.Options) |
3417 | return false; |
3418 | #undef DO_ |
3419 | } |
3420 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3421 | |
3422 | void Options::SerializeWithCachedSizes( |
3423 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3424 | // @@protoc_insertion_point(serialize_start:tensorflow.data.Options) |
3425 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3426 | (void) cached_has_bits; |
3427 | |
3428 | // bool deterministic = 1; |
3429 | if (has_deterministic()) { |
3430 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->deterministic(), output); |
3431 | } |
3432 | |
3433 | // .tensorflow.data.DistributeOptions distribute_options = 2; |
3434 | if (this->has_distribute_options()) { |
3435 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3436 | 2, _Internal::distribute_options(this), output); |
3437 | } |
3438 | |
3439 | // .tensorflow.data.OptimizationOptions optimization_options = 3; |
3440 | if (this->has_optimization_options()) { |
3441 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3442 | 3, _Internal::optimization_options(this), output); |
3443 | } |
3444 | |
3445 | // bool slack = 4; |
3446 | if (has_slack()) { |
3447 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->slack(), output); |
3448 | } |
3449 | |
3450 | // .tensorflow.data.ThreadingOptions threading_options = 5; |
3451 | if (this->has_threading_options()) { |
3452 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3453 | 5, _Internal::threading_options(this), output); |
3454 | } |
3455 | |
3456 | // .tensorflow.data.ExternalStatePolicy external_state_policy = 6; |
3457 | if (has_external_state_policy()) { |
3458 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
3459 | 6, this->external_state_policy(), output); |
3460 | } |
3461 | |
3462 | // .tensorflow.data.AutotuneOptions autotune_options = 7; |
3463 | if (this->has_autotune_options()) { |
3464 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3465 | 7, _Internal::autotune_options(this), output); |
3466 | } |
3467 | |
3468 | if (_internal_metadata_.have_unknown_fields()) { |
3469 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3470 | _internal_metadata_.unknown_fields(), output); |
3471 | } |
3472 | // @@protoc_insertion_point(serialize_end:tensorflow.data.Options) |
3473 | } |
3474 | |
3475 | ::PROTOBUF_NAMESPACE_ID::uint8* Options::InternalSerializeWithCachedSizesToArray( |
3476 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3477 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.Options) |
3478 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3479 | (void) cached_has_bits; |
3480 | |
3481 | // bool deterministic = 1; |
3482 | if (has_deterministic()) { |
3483 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->deterministic(), target); |
3484 | } |
3485 | |
3486 | // .tensorflow.data.DistributeOptions distribute_options = 2; |
3487 | if (this->has_distribute_options()) { |
3488 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3489 | InternalWriteMessageToArray( |
3490 | 2, _Internal::distribute_options(this), target); |
3491 | } |
3492 | |
3493 | // .tensorflow.data.OptimizationOptions optimization_options = 3; |
3494 | if (this->has_optimization_options()) { |
3495 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3496 | InternalWriteMessageToArray( |
3497 | 3, _Internal::optimization_options(this), target); |
3498 | } |
3499 | |
3500 | // bool slack = 4; |
3501 | if (has_slack()) { |
3502 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->slack(), target); |
3503 | } |
3504 | |
3505 | // .tensorflow.data.ThreadingOptions threading_options = 5; |
3506 | if (this->has_threading_options()) { |
3507 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3508 | InternalWriteMessageToArray( |
3509 | 5, _Internal::threading_options(this), target); |
3510 | } |
3511 | |
3512 | // .tensorflow.data.ExternalStatePolicy external_state_policy = 6; |
3513 | if (has_external_state_policy()) { |
3514 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
3515 | 6, this->external_state_policy(), target); |
3516 | } |
3517 | |
3518 | // .tensorflow.data.AutotuneOptions autotune_options = 7; |
3519 | if (this->has_autotune_options()) { |
3520 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3521 | InternalWriteMessageToArray( |
3522 | 7, _Internal::autotune_options(this), target); |
3523 | } |
3524 | |
3525 | if (_internal_metadata_.have_unknown_fields()) { |
3526 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3527 | _internal_metadata_.unknown_fields(), target); |
3528 | } |
3529 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.Options) |
3530 | return target; |
3531 | } |
3532 | |
3533 | size_t Options::ByteSizeLong() const { |
3534 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.Options) |
3535 | size_t total_size = 0; |
3536 | |
3537 | if (_internal_metadata_.have_unknown_fields()) { |
3538 | total_size += |
3539 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3540 | _internal_metadata_.unknown_fields()); |
3541 | } |
3542 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3543 | // Prevent compiler warnings about cached_has_bits being unused |
3544 | (void) cached_has_bits; |
3545 | |
3546 | // .tensorflow.data.DistributeOptions distribute_options = 2; |
3547 | if (this->has_distribute_options()) { |
3548 | total_size += 1 + |
3549 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3550 | *distribute_options_); |
3551 | } |
3552 | |
3553 | // .tensorflow.data.OptimizationOptions optimization_options = 3; |
3554 | if (this->has_optimization_options()) { |
3555 | total_size += 1 + |
3556 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3557 | *optimization_options_); |
3558 | } |
3559 | |
3560 | // .tensorflow.data.ThreadingOptions threading_options = 5; |
3561 | if (this->has_threading_options()) { |
3562 | total_size += 1 + |
3563 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3564 | *threading_options_); |
3565 | } |
3566 | |
3567 | // .tensorflow.data.AutotuneOptions autotune_options = 7; |
3568 | if (this->has_autotune_options()) { |
3569 | total_size += 1 + |
3570 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3571 | *autotune_options_); |
3572 | } |
3573 | |
3574 | switch (optional_deterministic_case()) { |
3575 | // bool deterministic = 1; |
3576 | case kDeterministic: { |
3577 | total_size += 1 + 1; |
3578 | break; |
3579 | } |
3580 | case OPTIONAL_DETERMINISTIC_NOT_SET: { |
3581 | break; |
3582 | } |
3583 | } |
3584 | switch (optional_slack_case()) { |
3585 | // bool slack = 4; |
3586 | case kSlack: { |
3587 | total_size += 1 + 1; |
3588 | break; |
3589 | } |
3590 | case OPTIONAL_SLACK_NOT_SET: { |
3591 | break; |
3592 | } |
3593 | } |
3594 | switch (optional_external_state_policy_case()) { |
3595 | // .tensorflow.data.ExternalStatePolicy external_state_policy = 6; |
3596 | case kExternalStatePolicy: { |
3597 | total_size += 1 + |
3598 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->external_state_policy()); |
3599 | break; |
3600 | } |
3601 | case OPTIONAL_EXTERNAL_STATE_POLICY_NOT_SET: { |
3602 | break; |
3603 | } |
3604 | } |
3605 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3606 | SetCachedSize(cached_size); |
3607 | return total_size; |
3608 | } |
3609 | |
3610 | void Options::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3611 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.Options) |
3612 | GOOGLE_DCHECK_NE(&from, this); |
3613 | const Options* source = |
3614 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Options>( |
3615 | &from); |
3616 | if (source == nullptr) { |
3617 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.Options) |
3618 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3619 | } else { |
3620 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.Options) |
3621 | MergeFrom(*source); |
3622 | } |
3623 | } |
3624 | |
3625 | void Options::MergeFrom(const Options& from) { |
3626 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.Options) |
3627 | GOOGLE_DCHECK_NE(&from, this); |
3628 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3629 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3630 | (void) cached_has_bits; |
3631 | |
3632 | if (from.has_distribute_options()) { |
3633 | mutable_distribute_options()->::tensorflow::data::DistributeOptions::MergeFrom(from.distribute_options()); |
3634 | } |
3635 | if (from.has_optimization_options()) { |
3636 | mutable_optimization_options()->::tensorflow::data::OptimizationOptions::MergeFrom(from.optimization_options()); |
3637 | } |
3638 | if (from.has_threading_options()) { |
3639 | mutable_threading_options()->::tensorflow::data::ThreadingOptions::MergeFrom(from.threading_options()); |
3640 | } |
3641 | if (from.has_autotune_options()) { |
3642 | mutable_autotune_options()->::tensorflow::data::AutotuneOptions::MergeFrom(from.autotune_options()); |
3643 | } |
3644 | switch (from.optional_deterministic_case()) { |
3645 | case kDeterministic: { |
3646 | set_deterministic(from.deterministic()); |
3647 | break; |
3648 | } |
3649 | case OPTIONAL_DETERMINISTIC_NOT_SET: { |
3650 | break; |
3651 | } |
3652 | } |
3653 | switch (from.optional_slack_case()) { |
3654 | case kSlack: { |
3655 | set_slack(from.slack()); |
3656 | break; |
3657 | } |
3658 | case OPTIONAL_SLACK_NOT_SET: { |
3659 | break; |
3660 | } |
3661 | } |
3662 | switch (from.optional_external_state_policy_case()) { |
3663 | case kExternalStatePolicy: { |
3664 | set_external_state_policy(from.external_state_policy()); |
3665 | break; |
3666 | } |
3667 | case OPTIONAL_EXTERNAL_STATE_POLICY_NOT_SET: { |
3668 | break; |
3669 | } |
3670 | } |
3671 | } |
3672 | |
3673 | void Options::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3674 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.Options) |
3675 | if (&from == this) return; |
3676 | Clear(); |
3677 | MergeFrom(from); |
3678 | } |
3679 | |
3680 | void Options::CopyFrom(const Options& from) { |
3681 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.Options) |
3682 | if (&from == this) return; |
3683 | Clear(); |
3684 | MergeFrom(from); |
3685 | } |
3686 | |
3687 | bool Options::IsInitialized() const { |
3688 | return true; |
3689 | } |
3690 | |
3691 | void Options::InternalSwap(Options* other) { |
3692 | using std::swap; |
3693 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3694 | swap(distribute_options_, other->distribute_options_); |
3695 | swap(optimization_options_, other->optimization_options_); |
3696 | swap(threading_options_, other->threading_options_); |
3697 | swap(autotune_options_, other->autotune_options_); |
3698 | swap(optional_deterministic_, other->optional_deterministic_); |
3699 | swap(optional_slack_, other->optional_slack_); |
3700 | swap(optional_external_state_policy_, other->optional_external_state_policy_); |
3701 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
3702 | swap(_oneof_case_[1], other->_oneof_case_[1]); |
3703 | swap(_oneof_case_[2], other->_oneof_case_[2]); |
3704 | } |
3705 | |
3706 | ::PROTOBUF_NAMESPACE_ID::Metadata Options::GetMetadata() const { |
3707 | return GetMetadataStatic(); |
3708 | } |
3709 | |
3710 | |
3711 | // @@protoc_insertion_point(namespace_scope) |
3712 | } // namespace data |
3713 | } // namespace tensorflow |
3714 | PROTOBUF_NAMESPACE_OPEN |
3715 | template<> PROTOBUF_NOINLINE ::tensorflow::data::AutotuneOptions* Arena::CreateMaybeMessage< ::tensorflow::data::AutotuneOptions >(Arena* arena) { |
3716 | return Arena::CreateInternal< ::tensorflow::data::AutotuneOptions >(arena); |
3717 | } |
3718 | template<> PROTOBUF_NOINLINE ::tensorflow::data::CardinalityOptions* Arena::CreateMaybeMessage< ::tensorflow::data::CardinalityOptions >(Arena* arena) { |
3719 | return Arena::CreateInternal< ::tensorflow::data::CardinalityOptions >(arena); |
3720 | } |
3721 | template<> PROTOBUF_NOINLINE ::tensorflow::data::DistributeOptions* Arena::CreateMaybeMessage< ::tensorflow::data::DistributeOptions >(Arena* arena) { |
3722 | return Arena::CreateInternal< ::tensorflow::data::DistributeOptions >(arena); |
3723 | } |
3724 | template<> PROTOBUF_NOINLINE ::tensorflow::data::OptimizationOptions* Arena::CreateMaybeMessage< ::tensorflow::data::OptimizationOptions >(Arena* arena) { |
3725 | return Arena::CreateInternal< ::tensorflow::data::OptimizationOptions >(arena); |
3726 | } |
3727 | template<> PROTOBUF_NOINLINE ::tensorflow::data::ThreadingOptions* Arena::CreateMaybeMessage< ::tensorflow::data::ThreadingOptions >(Arena* arena) { |
3728 | return Arena::CreateInternal< ::tensorflow::data::ThreadingOptions >(arena); |
3729 | } |
3730 | template<> PROTOBUF_NOINLINE ::tensorflow::data::Options* Arena::CreateMaybeMessage< ::tensorflow::data::Options >(Arena* arena) { |
3731 | return Arena::CreateInternal< ::tensorflow::data::Options >(arena); |
3732 | } |
3733 | PROTOBUF_NAMESPACE_CLOSE |
3734 | |
3735 | // @@protoc_insertion_point(global_scope) |
3736 | #include <google/protobuf/port_undef.inc> |
3737 | |