OR-Tools  9.0
demon_profiler.pb.cc
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: ortools/constraint_solver/demon_profiler.proto
3 
5 
6 #include <algorithm>
7 
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/descriptor.h>
12 #include <google/protobuf/generated_message_reflection.h>
13 #include <google/protobuf/reflection_ops.h>
14 #include <google/protobuf/wire_format.h>
15 // @@protoc_insertion_point(includes)
16 #include <google/protobuf/port_def.inc>
17 
18 PROTOBUF_PRAGMA_INIT_SEG
19 namespace operations_research {
20 constexpr DemonRuns::DemonRuns(
21  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
22  : start_time_()
23  , _start_time_cached_byte_size_()
24  , end_time_()
25  , _end_time_cached_byte_size_()
26  , demon_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
27  , failures_(PROTOBUF_LONGLONG(0)){}
30  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
32  union {
33  DemonRuns _instance;
34  };
35 };
36 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DemonRunsDefaultTypeInternal _DemonRuns_default_instance_;
37 constexpr ConstraintRuns::ConstraintRuns(
38  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
39  : initial_propagation_start_time_()
40  , _initial_propagation_start_time_cached_byte_size_()
41  , initial_propagation_end_time_()
42  , _initial_propagation_end_time_cached_byte_size_()
43  , demons_()
44  , constraint_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
45  , failures_(PROTOBUF_LONGLONG(0)){}
48  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
50  union {
51  ConstraintRuns _instance;
52  };
53 };
54 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConstraintRunsDefaultTypeInternal _ConstraintRuns_default_instance_;
55 } // namespace operations_research
57 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto = nullptr;
58 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto = nullptr;
59 
61  ~0u, // no _has_bits_
62  PROTOBUF_FIELD_OFFSET(::operations_research::DemonRuns, _internal_metadata_),
63  ~0u, // no _extensions_
64  ~0u, // no _oneof_case_
65  ~0u, // no _weak_field_map_
66  PROTOBUF_FIELD_OFFSET(::operations_research::DemonRuns, demon_id_),
67  PROTOBUF_FIELD_OFFSET(::operations_research::DemonRuns, start_time_),
68  PROTOBUF_FIELD_OFFSET(::operations_research::DemonRuns, end_time_),
69  PROTOBUF_FIELD_OFFSET(::operations_research::DemonRuns, failures_),
70  ~0u, // no _has_bits_
71  PROTOBUF_FIELD_OFFSET(::operations_research::ConstraintRuns, _internal_metadata_),
72  ~0u, // no _extensions_
73  ~0u, // no _oneof_case_
74  ~0u, // no _weak_field_map_
75  PROTOBUF_FIELD_OFFSET(::operations_research::ConstraintRuns, constraint_id_),
76  PROTOBUF_FIELD_OFFSET(::operations_research::ConstraintRuns, initial_propagation_start_time_),
77  PROTOBUF_FIELD_OFFSET(::operations_research::ConstraintRuns, initial_propagation_end_time_),
78  PROTOBUF_FIELD_OFFSET(::operations_research::ConstraintRuns, failures_),
79  PROTOBUF_FIELD_OFFSET(::operations_research::ConstraintRuns, demons_),
80 };
81 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
82  { 0, -1, sizeof(::operations_research::DemonRuns)},
83  { 9, -1, sizeof(::operations_research::ConstraintRuns)},
84 };
85 
86 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
87  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::_DemonRuns_default_instance_),
88  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::_ConstraintRuns_default_instance_),
89 };
90 
91 const char descriptor_table_protodef_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
92  "\n.ortools/constraint_solver/demon_profil"
93  "er.proto\022\023operations_research\"U\n\tDemonRu"
94  "ns\022\020\n\010demon_id\030\001 \001(\t\022\022\n\nstart_time\030\002 \003(\003"
95  "\022\020\n\010end_time\030\003 \003(\003\022\020\n\010failures\030\004 \001(\003\"\267\001\n"
96  "\016ConstraintRuns\022\025\n\rconstraint_id\030\001 \001(\t\022&"
97  "\n\036initial_propagation_start_time\030\002 \003(\003\022$"
98  "\n\034initial_propagation_end_time\030\003 \003(\003\022\020\n\010"
99  "failures\030\004 \001(\003\022.\n\006demons\030\005 \003(\0132\036.operati"
100  "ons_research.DemonRunsb\006proto3"
101  ;
102 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto_once;
103 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto = {
104  false, false, 350, descriptor_table_protodef_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto, "ortools/constraint_solver/demon_profiler.proto",
108 };
109 PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::Metadata
111  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto);
113 }
114 
115 // Force running AddDescriptors() at dynamic initialization time.
116 PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto(&descriptor_table_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto);
117 namespace operations_research {
118 
119 // ===================================================================
120 
122  public:
123 };
124 
125 DemonRuns::DemonRuns(::PROTOBUF_NAMESPACE_ID::Arena* arena)
126  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
127  start_time_(arena),
128  end_time_(arena) {
129  SharedCtor();
130  RegisterArenaDtor(arena);
131  // @@protoc_insertion_point(arena_constructor:operations_research.DemonRuns)
132 }
133 DemonRuns::DemonRuns(const DemonRuns& from)
134  : ::PROTOBUF_NAMESPACE_ID::Message(),
135  start_time_(from.start_time_),
136  end_time_(from.end_time_) {
137  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
138  demon_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
139  if (!from._internal_demon_id().empty()) {
140  demon_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_demon_id(),
141  GetArena());
142  }
143  failures_ = from.failures_;
144  // @@protoc_insertion_point(copy_constructor:operations_research.DemonRuns)
145 }
146 
147 void DemonRuns::SharedCtor() {
148 demon_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
149 failures_ = PROTOBUF_LONGLONG(0);
150 }
151 
152 DemonRuns::~DemonRuns() {
153  // @@protoc_insertion_point(destructor:operations_research.DemonRuns)
154  SharedDtor();
155  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
156 }
157 
158 void DemonRuns::SharedDtor() {
159  GOOGLE_DCHECK(GetArena() == nullptr);
160  demon_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
161 }
162 
163 void DemonRuns::ArenaDtor(void* object) {
164  DemonRuns* _this = reinterpret_cast< DemonRuns* >(object);
165  (void)_this;
166 }
167 void DemonRuns::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
168 }
169 void DemonRuns::SetCachedSize(int size) const {
170  _cached_size_.Set(size);
171 }
172 
173 void DemonRuns::Clear() {
174 // @@protoc_insertion_point(message_clear_start:operations_research.DemonRuns)
175  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
176  // Prevent compiler warnings about cached_has_bits being unused
177  (void) cached_has_bits;
178 
179  start_time_.Clear();
180  end_time_.Clear();
181  demon_id_.ClearToEmpty();
182  failures_ = PROTOBUF_LONGLONG(0);
183  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
184 }
185 
186 const char* DemonRuns::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
187 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
188  while (!ctx->Done(&ptr)) {
189  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
190  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
191  CHK_(ptr);
192  switch (tag >> 3) {
193  // string demon_id = 1;
194  case 1:
195  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
196  auto str = _internal_mutable_demon_id();
197  ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
198  CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "operations_research.DemonRuns.demon_id"));
199  CHK_(ptr);
200  } else goto handle_unusual;
201  continue;
202  // repeated int64 start_time = 2;
203  case 2:
204  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
205  ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_start_time(), ptr, ctx);
206  CHK_(ptr);
207  } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) {
208  _internal_add_start_time(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
209  CHK_(ptr);
210  } else goto handle_unusual;
211  continue;
212  // repeated int64 end_time = 3;
213  case 3:
214  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
215  ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_end_time(), ptr, ctx);
216  CHK_(ptr);
217  } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24) {
218  _internal_add_end_time(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
219  CHK_(ptr);
220  } else goto handle_unusual;
221  continue;
222  // int64 failures = 4;
223  case 4:
224  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
225  failures_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
226  CHK_(ptr);
227  } else goto handle_unusual;
228  continue;
229  default: {
230  handle_unusual:
231  if ((tag & 7) == 4 || tag == 0) {
232  ctx->SetLastTag(tag);
233  goto success;
234  }
235  ptr = UnknownFieldParse(tag,
236  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
237  ptr, ctx);
238  CHK_(ptr != nullptr);
239  continue;
240  }
241  } // switch
242  } // while
243 success:
244  return ptr;
245 failure:
246  ptr = nullptr;
247  goto success;
248 #undef CHK_
249 }
250 
251 ::PROTOBUF_NAMESPACE_ID::uint8* DemonRuns::_InternalSerialize(
252  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
253  // @@protoc_insertion_point(serialize_to_array_start:operations_research.DemonRuns)
254  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
255  (void) cached_has_bits;
256 
257  // string demon_id = 1;
258  if (this->demon_id().size() > 0) {
259  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
260  this->_internal_demon_id().data(), static_cast<int>(this->_internal_demon_id().length()),
261  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
262  "operations_research.DemonRuns.demon_id");
263  target = stream->WriteStringMaybeAliased(
264  1, this->_internal_demon_id(), target);
265  }
266 
267  // repeated int64 start_time = 2;
268  {
269  int byte_size = _start_time_cached_byte_size_.load(std::memory_order_relaxed);
270  if (byte_size > 0) {
271  target = stream->WriteInt64Packed(
272  2, _internal_start_time(), byte_size, target);
273  }
274  }
275 
276  // repeated int64 end_time = 3;
277  {
278  int byte_size = _end_time_cached_byte_size_.load(std::memory_order_relaxed);
279  if (byte_size > 0) {
280  target = stream->WriteInt64Packed(
281  3, _internal_end_time(), byte_size, target);
282  }
283  }
284 
285  // int64 failures = 4;
286  if (this->failures() != 0) {
287  target = stream->EnsureSpace(target);
288  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_failures(), target);
289  }
290 
291  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
292  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
293  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
294  }
295  // @@protoc_insertion_point(serialize_to_array_end:operations_research.DemonRuns)
296  return target;
297 }
298 
299 size_t DemonRuns::ByteSizeLong() const {
300 // @@protoc_insertion_point(message_byte_size_start:operations_research.DemonRuns)
301  size_t total_size = 0;
302 
303  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
304  // Prevent compiler warnings about cached_has_bits being unused
305  (void) cached_has_bits;
306 
307  // repeated int64 start_time = 2;
308  {
309  size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
310  Int64Size(this->start_time_);
311  if (data_size > 0) {
312  total_size += 1 +
313  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
314  static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
315  }
316  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
317  _start_time_cached_byte_size_.store(cached_size,
318  std::memory_order_relaxed);
319  total_size += data_size;
320  }
321 
322  // repeated int64 end_time = 3;
323  {
324  size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
325  Int64Size(this->end_time_);
326  if (data_size > 0) {
327  total_size += 1 +
328  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
329  static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
330  }
331  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
332  _end_time_cached_byte_size_.store(cached_size,
333  std::memory_order_relaxed);
334  total_size += data_size;
335  }
336 
337  // string demon_id = 1;
338  if (this->demon_id().size() > 0) {
339  total_size += 1 +
340  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
341  this->_internal_demon_id());
342  }
343 
344  // int64 failures = 4;
345  if (this->failures() != 0) {
346  total_size += 1 +
347  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
348  this->_internal_failures());
349  }
350 
351  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
352  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
353  _internal_metadata_, total_size, &_cached_size_);
354  }
355  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
356  SetCachedSize(cached_size);
357  return total_size;
358 }
359 
360 void DemonRuns::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
361 // @@protoc_insertion_point(generalized_merge_from_start:operations_research.DemonRuns)
362  GOOGLE_DCHECK_NE(&from, this);
363  const DemonRuns* source =
364  ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DemonRuns>(
365  &from);
366  if (source == nullptr) {
367  // @@protoc_insertion_point(generalized_merge_from_cast_fail:operations_research.DemonRuns)
368  ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
369  } else {
370  // @@protoc_insertion_point(generalized_merge_from_cast_success:operations_research.DemonRuns)
371  MergeFrom(*source);
372  }
373 }
374 
375 void DemonRuns::MergeFrom(const DemonRuns& from) {
376 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.DemonRuns)
377  GOOGLE_DCHECK_NE(&from, this);
378  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
379  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
380  (void) cached_has_bits;
381 
382  start_time_.MergeFrom(from.start_time_);
383  end_time_.MergeFrom(from.end_time_);
384  if (from.demon_id().size() > 0) {
385  _internal_set_demon_id(from._internal_demon_id());
386  }
387  if (from.failures() != 0) {
388  _internal_set_failures(from._internal_failures());
389  }
390 }
391 
392 void DemonRuns::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
393 // @@protoc_insertion_point(generalized_copy_from_start:operations_research.DemonRuns)
394  if (&from == this) return;
395  Clear();
396  MergeFrom(from);
397 }
398 
399 void DemonRuns::CopyFrom(const DemonRuns& from) {
400 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.DemonRuns)
401  if (&from == this) return;
402  Clear();
403  MergeFrom(from);
404 }
405 
406 bool DemonRuns::IsInitialized() const {
407  return true;
408 }
409 
410 void DemonRuns::InternalSwap(DemonRuns* other) {
411  using std::swap;
412  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
413  start_time_.InternalSwap(&other->start_time_);
414  end_time_.InternalSwap(&other->end_time_);
415  demon_id_.Swap(&other->demon_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
416  swap(failures_, other->failures_);
417 }
418 
419 ::PROTOBUF_NAMESPACE_ID::Metadata DemonRuns::GetMetadata() const {
420  return GetMetadataStatic();
421 }
422 
423 
424 // ===================================================================
425 
427  public:
428 };
429 
430 ConstraintRuns::ConstraintRuns(::PROTOBUF_NAMESPACE_ID::Arena* arena)
431  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
432  initial_propagation_start_time_(arena),
433  initial_propagation_end_time_(arena),
434  demons_(arena) {
435  SharedCtor();
436  RegisterArenaDtor(arena);
437  // @@protoc_insertion_point(arena_constructor:operations_research.ConstraintRuns)
438 }
439 ConstraintRuns::ConstraintRuns(const ConstraintRuns& from)
440  : ::PROTOBUF_NAMESPACE_ID::Message(),
441  initial_propagation_start_time_(from.initial_propagation_start_time_),
442  initial_propagation_end_time_(from.initial_propagation_end_time_),
443  demons_(from.demons_) {
444  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
445  constraint_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
446  if (!from._internal_constraint_id().empty()) {
447  constraint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_constraint_id(),
448  GetArena());
449  }
450  failures_ = from.failures_;
451  // @@protoc_insertion_point(copy_constructor:operations_research.ConstraintRuns)
452 }
453 
454 void ConstraintRuns::SharedCtor() {
455 constraint_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
456 failures_ = PROTOBUF_LONGLONG(0);
457 }
458 
459 ConstraintRuns::~ConstraintRuns() {
460  // @@protoc_insertion_point(destructor:operations_research.ConstraintRuns)
461  SharedDtor();
462  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
463 }
464 
465 void ConstraintRuns::SharedDtor() {
466  GOOGLE_DCHECK(GetArena() == nullptr);
467  constraint_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
468 }
469 
470 void ConstraintRuns::ArenaDtor(void* object) {
471  ConstraintRuns* _this = reinterpret_cast< ConstraintRuns* >(object);
472  (void)_this;
473 }
474 void ConstraintRuns::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
475 }
476 void ConstraintRuns::SetCachedSize(int size) const {
477  _cached_size_.Set(size);
478 }
479 
480 void ConstraintRuns::Clear() {
481 // @@protoc_insertion_point(message_clear_start:operations_research.ConstraintRuns)
482  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
483  // Prevent compiler warnings about cached_has_bits being unused
484  (void) cached_has_bits;
485 
486  initial_propagation_start_time_.Clear();
487  initial_propagation_end_time_.Clear();
488  demons_.Clear();
489  constraint_id_.ClearToEmpty();
490  failures_ = PROTOBUF_LONGLONG(0);
491  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
492 }
493 
494 const char* ConstraintRuns::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
495 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
496  while (!ctx->Done(&ptr)) {
497  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
498  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
499  CHK_(ptr);
500  switch (tag >> 3) {
501  // string constraint_id = 1;
502  case 1:
503  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
504  auto str = _internal_mutable_constraint_id();
505  ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
506  CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "operations_research.ConstraintRuns.constraint_id"));
507  CHK_(ptr);
508  } else goto handle_unusual;
509  continue;
510  // repeated int64 initial_propagation_start_time = 2;
511  case 2:
512  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
513  ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_initial_propagation_start_time(), ptr, ctx);
514  CHK_(ptr);
515  } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) {
516  _internal_add_initial_propagation_start_time(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
517  CHK_(ptr);
518  } else goto handle_unusual;
519  continue;
520  // repeated int64 initial_propagation_end_time = 3;
521  case 3:
522  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
523  ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_initial_propagation_end_time(), ptr, ctx);
524  CHK_(ptr);
525  } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24) {
526  _internal_add_initial_propagation_end_time(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
527  CHK_(ptr);
528  } else goto handle_unusual;
529  continue;
530  // int64 failures = 4;
531  case 4:
532  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
533  failures_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
534  CHK_(ptr);
535  } else goto handle_unusual;
536  continue;
537  // repeated .operations_research.DemonRuns demons = 5;
538  case 5:
539  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
540  ptr -= 1;
541  do {
542  ptr += 1;
543  ptr = ctx->ParseMessage(_internal_add_demons(), ptr);
544  CHK_(ptr);
545  if (!ctx->DataAvailable(ptr)) break;
546  } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
547  } else goto handle_unusual;
548  continue;
549  default: {
550  handle_unusual:
551  if ((tag & 7) == 4 || tag == 0) {
552  ctx->SetLastTag(tag);
553  goto success;
554  }
555  ptr = UnknownFieldParse(tag,
556  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
557  ptr, ctx);
558  CHK_(ptr != nullptr);
559  continue;
560  }
561  } // switch
562  } // while
563 success:
564  return ptr;
565 failure:
566  ptr = nullptr;
567  goto success;
568 #undef CHK_
569 }
570 
571 ::PROTOBUF_NAMESPACE_ID::uint8* ConstraintRuns::_InternalSerialize(
572  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
573  // @@protoc_insertion_point(serialize_to_array_start:operations_research.ConstraintRuns)
574  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
575  (void) cached_has_bits;
576 
577  // string constraint_id = 1;
578  if (this->constraint_id().size() > 0) {
579  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
580  this->_internal_constraint_id().data(), static_cast<int>(this->_internal_constraint_id().length()),
581  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
582  "operations_research.ConstraintRuns.constraint_id");
583  target = stream->WriteStringMaybeAliased(
584  1, this->_internal_constraint_id(), target);
585  }
586 
587  // repeated int64 initial_propagation_start_time = 2;
588  {
589  int byte_size = _initial_propagation_start_time_cached_byte_size_.load(std::memory_order_relaxed);
590  if (byte_size > 0) {
591  target = stream->WriteInt64Packed(
592  2, _internal_initial_propagation_start_time(), byte_size, target);
593  }
594  }
595 
596  // repeated int64 initial_propagation_end_time = 3;
597  {
598  int byte_size = _initial_propagation_end_time_cached_byte_size_.load(std::memory_order_relaxed);
599  if (byte_size > 0) {
600  target = stream->WriteInt64Packed(
601  3, _internal_initial_propagation_end_time(), byte_size, target);
602  }
603  }
604 
605  // int64 failures = 4;
606  if (this->failures() != 0) {
607  target = stream->EnsureSpace(target);
608  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_failures(), target);
609  }
610 
611  // repeated .operations_research.DemonRuns demons = 5;
612  for (unsigned int i = 0,
613  n = static_cast<unsigned int>(this->_internal_demons_size()); i < n; i++) {
614  target = stream->EnsureSpace(target);
615  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
616  InternalWriteMessage(5, this->_internal_demons(i), target, stream);
617  }
618 
619  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
620  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
621  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
622  }
623  // @@protoc_insertion_point(serialize_to_array_end:operations_research.ConstraintRuns)
624  return target;
625 }
626 
627 size_t ConstraintRuns::ByteSizeLong() const {
628 // @@protoc_insertion_point(message_byte_size_start:operations_research.ConstraintRuns)
629  size_t total_size = 0;
630 
631  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
632  // Prevent compiler warnings about cached_has_bits being unused
633  (void) cached_has_bits;
634 
635  // repeated int64 initial_propagation_start_time = 2;
636  {
637  size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
638  Int64Size(this->initial_propagation_start_time_);
639  if (data_size > 0) {
640  total_size += 1 +
641  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
642  static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
643  }
644  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
645  _initial_propagation_start_time_cached_byte_size_.store(cached_size,
646  std::memory_order_relaxed);
647  total_size += data_size;
648  }
649 
650  // repeated int64 initial_propagation_end_time = 3;
651  {
652  size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
653  Int64Size(this->initial_propagation_end_time_);
654  if (data_size > 0) {
655  total_size += 1 +
656  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
657  static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
658  }
659  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
660  _initial_propagation_end_time_cached_byte_size_.store(cached_size,
661  std::memory_order_relaxed);
662  total_size += data_size;
663  }
664 
665  // repeated .operations_research.DemonRuns demons = 5;
666  total_size += 1UL * this->_internal_demons_size();
667  for (const auto& msg : this->demons_) {
668  total_size +=
669  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
670  }
671 
672  // string constraint_id = 1;
673  if (this->constraint_id().size() > 0) {
674  total_size += 1 +
675  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
676  this->_internal_constraint_id());
677  }
678 
679  // int64 failures = 4;
680  if (this->failures() != 0) {
681  total_size += 1 +
682  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
683  this->_internal_failures());
684  }
685 
686  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
687  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
688  _internal_metadata_, total_size, &_cached_size_);
689  }
690  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
691  SetCachedSize(cached_size);
692  return total_size;
693 }
694 
695 void ConstraintRuns::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
696 // @@protoc_insertion_point(generalized_merge_from_start:operations_research.ConstraintRuns)
697  GOOGLE_DCHECK_NE(&from, this);
698  const ConstraintRuns* source =
699  ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ConstraintRuns>(
700  &from);
701  if (source == nullptr) {
702  // @@protoc_insertion_point(generalized_merge_from_cast_fail:operations_research.ConstraintRuns)
703  ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
704  } else {
705  // @@protoc_insertion_point(generalized_merge_from_cast_success:operations_research.ConstraintRuns)
706  MergeFrom(*source);
707  }
708 }
709 
710 void ConstraintRuns::MergeFrom(const ConstraintRuns& from) {
711 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.ConstraintRuns)
712  GOOGLE_DCHECK_NE(&from, this);
713  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
714  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
715  (void) cached_has_bits;
716 
717  initial_propagation_start_time_.MergeFrom(from.initial_propagation_start_time_);
718  initial_propagation_end_time_.MergeFrom(from.initial_propagation_end_time_);
719  demons_.MergeFrom(from.demons_);
720  if (from.constraint_id().size() > 0) {
721  _internal_set_constraint_id(from._internal_constraint_id());
722  }
723  if (from.failures() != 0) {
724  _internal_set_failures(from._internal_failures());
725  }
726 }
727 
728 void ConstraintRuns::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
729 // @@protoc_insertion_point(generalized_copy_from_start:operations_research.ConstraintRuns)
730  if (&from == this) return;
731  Clear();
732  MergeFrom(from);
733 }
734 
735 void ConstraintRuns::CopyFrom(const ConstraintRuns& from) {
736 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.ConstraintRuns)
737  if (&from == this) return;
738  Clear();
739  MergeFrom(from);
740 }
741 
742 bool ConstraintRuns::IsInitialized() const {
743  return true;
744 }
745 
746 void ConstraintRuns::InternalSwap(ConstraintRuns* other) {
747  using std::swap;
748  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
749  initial_propagation_start_time_.InternalSwap(&other->initial_propagation_start_time_);
750  initial_propagation_end_time_.InternalSwap(&other->initial_propagation_end_time_);
751  demons_.InternalSwap(&other->demons_);
752  constraint_id_.Swap(&other->constraint_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
753  swap(failures_, other->failures_);
754 }
755 
756 ::PROTOBUF_NAMESPACE_ID::Metadata ConstraintRuns::GetMetadata() const {
757  return GetMetadataStatic();
758 }
759 
760 
761 // @@protoc_insertion_point(namespace_scope)
762 } // namespace operations_research
763 PROTOBUF_NAMESPACE_OPEN
764 template<> PROTOBUF_NOINLINE ::operations_research::DemonRuns* Arena::CreateMaybeMessage< ::operations_research::DemonRuns >(Arena* arena) {
765  return Arena::CreateMessageInternal< ::operations_research::DemonRuns >(arena);
766 }
767 template<> PROTOBUF_NOINLINE ::operations_research::ConstraintRuns* Arena::CreateMaybeMessage< ::operations_research::ConstraintRuns >(Arena* arena) {
768  return Arena::CreateMessageInternal< ::operations_research::ConstraintRuns >(arena);
769 }
770 PROTOBUF_NAMESPACE_CLOSE
771 
772 // @@protoc_insertion_point(global_scope)
773 #include <google/protobuf/port_undef.inc>
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NOINLINE ::operations_research::DemonRuns * Arena::CreateMaybeMessage< ::operations_research::DemonRuns >(Arena *arena)
#define CHK_(x)
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto[2]
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const ** file_level_enum_descriptors_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto
PROTOBUF_NOINLINE ::operations_research::ConstraintRuns * Arena::CreateMaybeMessage< ::operations_research::ConstraintRuns >(Arena *arena)
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const ** file_level_service_descriptors_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto
::PROTOBUF_NAMESPACE_ID::Message const *const file_default_instances[]
::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto_once
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto
PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::Metadata descriptor_table_ortools_2fconstraint_5fsolver_2fdemon_5fprofiler_2eproto_metadata_getter(int index)
void swap(IdMap< K, V > &a, IdMap< K, V > &b)
Definition: id_map.h:263
Collection of objects used to extend the Constraint Solver library.
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DemonRunsDefaultTypeInternal _DemonRuns_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConstraintRunsDefaultTypeInternal _ConstraintRuns_default_instance_
static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema * schemas
int index
Definition: pack.cc:509
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]