Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
boolean_problem.pb.cc
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/sat/boolean_problem.proto
4// Protobuf C++ Version: 6.31.1
5
7
8#include <algorithm>
9#include <type_traits>
10#include "google/protobuf/io/coded_stream.h"
11#include "google/protobuf/generated_message_tctable_impl.h"
12#include "google/protobuf/extension_set.h"
13#include "google/protobuf/generated_message_util.h"
14#include "google/protobuf/wire_format_lite.h"
15#include "google/protobuf/descriptor.h"
16#include "google/protobuf/generated_message_reflection.h"
17#include "google/protobuf/reflection_ops.h"
18#include "google/protobuf/wire_format.h"
19// @@protoc_insertion_point(includes)
20
21// Must be included last.
22#include "google/protobuf/port_def.inc"
23PROTOBUF_PRAGMA_INIT_SEG
24namespace _pb = ::google::protobuf;
26namespace _fl = ::google::protobuf::internal::field_layout;
27namespace operations_research {
28namespace sat {
29
30inline constexpr LinearObjective::Impl_::Impl_(
31 ::_pbi::ConstantInitialized) noexcept
32 : _cached_size_{0},
33 literals_{},
34 coefficients_{},
35 offset_{0},
36 scaling_factor_{1} {}
37
38template <typename>
39PROTOBUF_CONSTEXPR LinearObjective::LinearObjective(::_pbi::ConstantInitialized)
40#if defined(PROTOBUF_CUSTOM_VTABLE)
41 : ::google::protobuf::Message(LinearObjective_class_data_.base()),
42#else // PROTOBUF_CUSTOM_VTABLE
43 : ::google::protobuf::Message(),
44#endif // PROTOBUF_CUSTOM_VTABLE
45 _impl_(::_pbi::ConstantInitialized()) {
46}
54
55PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
57
58inline constexpr LinearBooleanConstraint::Impl_::Impl_(
59 ::_pbi::ConstantInitialized) noexcept
60 : _cached_size_{0},
61 literals_{},
62 coefficients_{},
63 name_(
64 &::google::protobuf::internal::fixed_address_empty_string,
65 ::_pbi::ConstantInitialized()),
66 lower_bound_{::int64_t{0}},
67 upper_bound_{::int64_t{0}} {}
68
69template <typename>
70PROTOBUF_CONSTEXPR LinearBooleanConstraint::LinearBooleanConstraint(::_pbi::ConstantInitialized)
71#if defined(PROTOBUF_CUSTOM_VTABLE)
72 : ::google::protobuf::Message(LinearBooleanConstraint_class_data_.base()),
73#else // PROTOBUF_CUSTOM_VTABLE
74 : ::google::protobuf::Message(),
75#endif // PROTOBUF_CUSTOM_VTABLE
76 _impl_(::_pbi::ConstantInitialized()) {
77}
85
86PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
88
89inline constexpr BooleanAssignment::Impl_::Impl_(
90 ::_pbi::ConstantInitialized) noexcept
91 : literals_{},
92 _cached_size_{0} {}
93
94template <typename>
95PROTOBUF_CONSTEXPR BooleanAssignment::BooleanAssignment(::_pbi::ConstantInitialized)
96#if defined(PROTOBUF_CUSTOM_VTABLE)
97 : ::google::protobuf::Message(BooleanAssignment_class_data_.base()),
98#else // PROTOBUF_CUSTOM_VTABLE
99 : ::google::protobuf::Message(),
100#endif // PROTOBUF_CUSTOM_VTABLE
101 _impl_(::_pbi::ConstantInitialized()) {
102}
110
111PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
113
114inline constexpr LinearBooleanProblem::Impl_::Impl_(
115 ::_pbi::ConstantInitialized) noexcept
116 : _cached_size_{0},
117 constraints_{},
118 var_names_{},
119 name_(
120 &::google::protobuf::internal::fixed_address_empty_string,
121 ::_pbi::ConstantInitialized()),
122 objective_{nullptr},
123 assignment_{nullptr},
124 num_variables_{0},
125 original_num_variables_{0} {}
126
127template <typename>
128PROTOBUF_CONSTEXPR LinearBooleanProblem::LinearBooleanProblem(::_pbi::ConstantInitialized)
129#if defined(PROTOBUF_CUSTOM_VTABLE)
130 : ::google::protobuf::Message(LinearBooleanProblem_class_data_.base()),
131#else // PROTOBUF_CUSTOM_VTABLE
132 : ::google::protobuf::Message(),
133#endif // PROTOBUF_CUSTOM_VTABLE
134 _impl_(::_pbi::ConstantInitialized()) {
135}
143
144PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
146} // namespace sat
147} // namespace operations_research
148static constexpr const ::_pb::EnumDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
150static constexpr const ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
152const ::uint32_t
154 protodesc_cold) = {
155 0x081, // bitmap
156 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanConstraint, _impl_._has_bits_),
157 8, // hasbit index offset
158 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanConstraint, _impl_.literals_),
159 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanConstraint, _impl_.coefficients_),
160 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanConstraint, _impl_.lower_bound_),
161 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanConstraint, _impl_.upper_bound_),
162 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanConstraint, _impl_.name_),
163 ~0u,
164 ~0u,
165 1,
166 2,
167 0,
168 0x081, // bitmap
169 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearObjective, _impl_._has_bits_),
170 7, // hasbit index offset
171 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearObjective, _impl_.literals_),
172 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearObjective, _impl_.coefficients_),
173 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearObjective, _impl_.offset_),
174 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearObjective, _impl_.scaling_factor_),
175 ~0u,
176 ~0u,
177 0,
178 1,
179 0x000, // bitmap
180 PROTOBUF_FIELD_OFFSET(::operations_research::sat::BooleanAssignment, _impl_.literals_),
181 0x081, // bitmap
182 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanProblem, _impl_._has_bits_),
183 10, // hasbit index offset
184 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanProblem, _impl_.name_),
185 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanProblem, _impl_.num_variables_),
186 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanProblem, _impl_.constraints_),
187 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanProblem, _impl_.objective_),
188 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanProblem, _impl_.var_names_),
189 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanProblem, _impl_.assignment_),
190 PROTOBUF_FIELD_OFFSET(::operations_research::sat::LinearBooleanProblem, _impl_.original_num_variables_),
191 0,
192 3,
193 ~0u,
194 1,
195 ~0u,
196 2,
197 4,
198};
199
200static const ::_pbi::MigrationSchema
201 schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
206};
213const char descriptor_table_protodef_ortools_2fsat_2fboolean_5fproblem_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
214 protodesc_cold) = {
215 "\n!ortools/sat/boolean_problem.proto\022\027ope"
216 "rations_research.sat\"{\n\027LinearBooleanCon"
217 "straint\022\020\n\010literals\030\001 \003(\005\022\024\n\014coefficient"
218 "s\030\002 \003(\003\022\023\n\013lower_bound\030\003 \001(\003\022\023\n\013upper_bo"
219 "und\030\004 \001(\003\022\016\n\004name\030\005 \001(\t:\000\"g\n\017LinearObjec"
220 "tive\022\020\n\010literals\030\001 \003(\005\022\024\n\014coefficients\030\002"
221 " \003(\003\022\021\n\006offset\030\003 \001(\001:\0010\022\031\n\016scaling_facto"
222 "r\030\004 \001(\001:\0011\"%\n\021BooleanAssignment\022\020\n\010liter"
223 "als\030\001 \003(\005\"\264\002\n\024LinearBooleanProblem\022\016\n\004na"
224 "me\030\001 \001(\t:\000\022\025\n\rnum_variables\030\003 \001(\005\022E\n\013con"
225 "straints\030\004 \003(\01320.operations_research.sat"
226 ".LinearBooleanConstraint\022;\n\tobjective\030\005 "
227 "\001(\0132(.operations_research.sat.LinearObje"
228 "ctive\022\021\n\tvar_names\030\006 \003(\t\022>\n\nassignment\030\007"
229 " \001(\0132*.operations_research.sat.BooleanAs"
230 "signment\022\036\n\026original_num_variables\030\010 \001(\005"
231 "B/\n\026com.google.ortools.satP\001\252\002\022Google.Or"
232 "Tools.Sat"
233};
235PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ortools_2fsat_2fboolean_5fproblem_2eproto = {
236 false,
237 false,
238 689,
239 descriptor_table_protodef_ortools_2fsat_2fboolean_5fproblem_2eproto,
240 "ortools/sat/boolean_problem.proto",
242 nullptr,
243 0,
244 4,
245 schemas,
250};
251namespace operations_research {
252namespace sat {
253// ===================================================================
254
256 public:
257 using HasBits =
258 decltype(::std::declval<LinearBooleanConstraint>()._impl_._has_bits_);
259 static constexpr ::int32_t kHasBitsOffset =
260 8 * PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_._has_bits_);
261};
262
263LinearBooleanConstraint::LinearBooleanConstraint(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
264#if defined(PROTOBUF_CUSTOM_VTABLE)
265 : ::google::protobuf::Message(arena, LinearBooleanConstraint_class_data_.base()) {
266#else // PROTOBUF_CUSTOM_VTABLE
267 : ::google::protobuf::Message(arena) {
268#endif // PROTOBUF_CUSTOM_VTABLE
269 SharedCtor(arena);
270 // @@protoc_insertion_point(arena_constructor:operations_research.sat.LinearBooleanConstraint)
271}
272PROTOBUF_NDEBUG_INLINE LinearBooleanConstraint::Impl_::Impl_(
273 ::google::protobuf::internal::InternalVisibility visibility,
274 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
275 const ::operations_research::sat::LinearBooleanConstraint& from_msg)
276 : _has_bits_{from._has_bits_},
277 _cached_size_{0},
278 literals_{visibility, arena, from.literals_},
279 coefficients_{visibility, arena, from.coefficients_},
280 name_(arena, from.name_) {}
281
283 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
284 const LinearBooleanConstraint& from)
285#if defined(PROTOBUF_CUSTOM_VTABLE)
286 : ::google::protobuf::Message(arena, LinearBooleanConstraint_class_data_.base()) {
287#else // PROTOBUF_CUSTOM_VTABLE
288 : ::google::protobuf::Message(arena) {
289#endif // PROTOBUF_CUSTOM_VTABLE
290 LinearBooleanConstraint* const _this = this;
291 (void)_this;
292 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
293 from._internal_metadata_);
294 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
295 ::memcpy(reinterpret_cast<char *>(&_impl_) +
296 offsetof(Impl_, lower_bound_),
297 reinterpret_cast<const char *>(&from._impl_) +
298 offsetof(Impl_, lower_bound_),
299 offsetof(Impl_, upper_bound_) -
300 offsetof(Impl_, lower_bound_) +
301 sizeof(Impl_::upper_bound_));
302
303 // @@protoc_insertion_point(copy_constructor:operations_research.sat.LinearBooleanConstraint)
304}
305PROTOBUF_NDEBUG_INLINE LinearBooleanConstraint::Impl_::Impl_(
306 ::google::protobuf::internal::InternalVisibility visibility,
307 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
308 : _cached_size_{0},
309 literals_{visibility, arena},
310 coefficients_{visibility, arena},
311 name_(arena) {}
312
313inline void LinearBooleanConstraint::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
314 new (&_impl_) Impl_(internal_visibility(), arena);
315 ::memset(reinterpret_cast<char *>(&_impl_) +
316 offsetof(Impl_, lower_bound_),
317 0,
318 offsetof(Impl_, upper_bound_) -
319 offsetof(Impl_, lower_bound_) +
320 sizeof(Impl_::upper_bound_));
321}
323 // @@protoc_insertion_point(destructor:operations_research.sat.LinearBooleanConstraint)
324 SharedDtor(*this);
325}
326inline void LinearBooleanConstraint::SharedDtor(MessageLite& self) {
327 LinearBooleanConstraint& this_ = static_cast<LinearBooleanConstraint&>(self);
328 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
329 ABSL_DCHECK(this_.GetArena() == nullptr);
330 this_._impl_.name_.Destroy();
331 this_._impl_.~Impl_();
332}
333
334inline void* PROTOBUF_NONNULL LinearBooleanConstraint::PlacementNew_(
335 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
336 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
337 return ::new (mem) LinearBooleanConstraint(arena);
338}
340 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
341 PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.literals_) +
342 decltype(LinearBooleanConstraint::_impl_.literals_)::
343 InternalGetArenaOffset(
344 ::google::protobuf::Message::internal_visibility()),
345 PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.coefficients_) +
346 decltype(LinearBooleanConstraint::_impl_.coefficients_)::
347 InternalGetArenaOffset(
348 ::google::protobuf::Message::internal_visibility()),
349 });
350 if (arena_bits.has_value()) {
351 return ::google::protobuf::internal::MessageCreator::CopyInit(
352 sizeof(LinearBooleanConstraint), alignof(LinearBooleanConstraint), *arena_bits);
353 } else {
354 return ::google::protobuf::internal::MessageCreator(&LinearBooleanConstraint::PlacementNew_,
356 alignof(LinearBooleanConstraint));
357 }
358}
360 return ::google::protobuf::internal::ClassDataFull{
361 ::google::protobuf::internal::ClassData{
363 &_table_.header,
364 nullptr, // OnDemandRegisterArenaDtor
365 nullptr, // IsInitialized
366 &LinearBooleanConstraint::MergeImpl,
367 ::google::protobuf::Message::GetNewImpl<LinearBooleanConstraint>(),
368#if defined(PROTOBUF_CUSTOM_VTABLE)
369 &LinearBooleanConstraint::SharedDtor,
370 ::google::protobuf::Message::GetClearImpl<LinearBooleanConstraint>(), &LinearBooleanConstraint::ByteSizeLong,
372#endif // PROTOBUF_CUSTOM_VTABLE
373 PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_._cached_size_),
374 false,
375 },
376 &LinearBooleanConstraint::kDescriptorMethods,
378 nullptr, // tracker
379 };
380}
381
382PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
383 ::google::protobuf::internal::ClassDataFull LinearBooleanConstraint_class_data_ =
385
386PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
388 ::google::protobuf::internal::PrefetchToLocalCache(&LinearBooleanConstraint_class_data_);
389 ::google::protobuf::internal::PrefetchToLocalCache(LinearBooleanConstraint_class_data_.tc_table);
391}
392PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
393const ::_pbi::TcParseTable<3, 5, 0, 60, 2>
394LinearBooleanConstraint::_table_ = {
395 {
396 PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_._has_bits_),
397 0, // no _extensions_
398 5, 56, // max_field_number, fast_idx_mask
399 offsetof(decltype(_table_), field_lookup_table),
400 4294967264, // skipmap
401 offsetof(decltype(_table_), field_entries),
402 5, // num_field_entries
403 0, // num_aux_entries
404 offsetof(decltype(_table_), field_names), // no aux_entries
406 nullptr, // post_loop_handler
407 ::_pbi::TcParser::GenericFallback, // fallback
408 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
409 ::_pbi::TcParser::GetTable<::operations_research::sat::LinearBooleanConstraint>(), // to_prefetch
410 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
411 }, {{
412 {::_pbi::TcParser::MiniParse, {}},
413 // repeated int32 literals = 1;
414 {::_pbi::TcParser::FastV32R1,
415 {8, 63, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.literals_)}},
416 // repeated int64 coefficients = 2;
417 {::_pbi::TcParser::FastV64R1,
418 {16, 63, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.coefficients_)}},
419 // optional int64 lower_bound = 3;
420 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(LinearBooleanConstraint, _impl_.lower_bound_), 1>(),
421 {24, 1, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.lower_bound_)}},
422 // optional int64 upper_bound = 4;
423 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(LinearBooleanConstraint, _impl_.upper_bound_), 2>(),
424 {32, 2, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.upper_bound_)}},
425 // optional string name = 5 [default = ""];
426 {::_pbi::TcParser::FastSS1,
427 {42, 0, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.name_)}},
428 {::_pbi::TcParser::MiniParse, {}},
429 {::_pbi::TcParser::MiniParse, {}},
430 }}, {{
431 65535, 65535
432 }}, {{
433 // repeated int32 literals = 1;
434 {PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.literals_), -1, 0,
435 (0 | ::_fl::kFcRepeated | ::_fl::kInt32)},
436 // repeated int64 coefficients = 2;
437 {PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.coefficients_), -1, 0,
438 (0 | ::_fl::kFcRepeated | ::_fl::kInt64)},
439 // optional int64 lower_bound = 3;
440 {PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.lower_bound_), _Internal::kHasBitsOffset + 1, 0,
441 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
442 // optional int64 upper_bound = 4;
443 {PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.upper_bound_), _Internal::kHasBitsOffset + 2, 0,
444 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
445 // optional string name = 5 [default = ""];
446 {PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.name_), _Internal::kHasBitsOffset + 0, 0,
447 (0 | ::_fl::kFcOptional | ::_fl::kRawString | ::_fl::kRepAString)},
448 }},
449 // no aux_entries
450 {{
451 "\57\0\0\0\0\4\0\0"
452 "operations_research.sat.LinearBooleanConstraint"
453 "name"
454 }},
455};
456PROTOBUF_NOINLINE void LinearBooleanConstraint::Clear() {
457// @@protoc_insertion_point(message_clear_start:operations_research.sat.LinearBooleanConstraint)
458 ::google::protobuf::internal::TSanWrite(&_impl_);
459 ::uint32_t cached_has_bits = 0;
460 // Prevent compiler warnings about cached_has_bits being unused
461 (void) cached_has_bits;
462
463 _impl_.literals_.Clear();
464 _impl_.coefficients_.Clear();
465 cached_has_bits = _impl_._has_bits_[0];
466 if ((cached_has_bits & 0x00000001u) != 0) {
467 _impl_.name_.ClearNonDefaultToEmpty();
468 }
469 if ((cached_has_bits & 0x00000006u) != 0) {
470 ::memset(&_impl_.lower_bound_, 0, static_cast<::size_t>(
471 reinterpret_cast<char*>(&_impl_.upper_bound_) -
472 reinterpret_cast<char*>(&_impl_.lower_bound_)) + sizeof(_impl_.upper_bound_));
473 }
474 _impl_._has_bits_.Clear();
475 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
476}
477
478#if defined(PROTOBUF_CUSTOM_VTABLE)
479::uint8_t* PROTOBUF_NONNULL LinearBooleanConstraint::_InternalSerialize(
480 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
481 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
482 const LinearBooleanConstraint& this_ = static_cast<const LinearBooleanConstraint&>(base);
483#else // PROTOBUF_CUSTOM_VTABLE
484::uint8_t* PROTOBUF_NONNULL LinearBooleanConstraint::_InternalSerialize(
485 ::uint8_t* PROTOBUF_NONNULL target,
486 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
487 const LinearBooleanConstraint& this_ = *this;
488#endif // PROTOBUF_CUSTOM_VTABLE
489 // @@protoc_insertion_point(serialize_to_array_start:operations_research.sat.LinearBooleanConstraint)
490 ::uint32_t cached_has_bits = 0;
491 (void)cached_has_bits;
492
493 // repeated int32 literals = 1;
494 for (int i = 0, n = this_._internal_literals_size(); i < n; ++i) {
495 target = stream->EnsureSpace(target);
496 target = ::_pbi::WireFormatLite::WriteInt32ToArray(
497 1, this_._internal_literals().Get(i), target);
498 }
499
500 // repeated int64 coefficients = 2;
501 for (int i = 0, n = this_._internal_coefficients_size(); i < n; ++i) {
502 target = stream->EnsureSpace(target);
503 target = ::_pbi::WireFormatLite::WriteInt64ToArray(
504 2, this_._internal_coefficients().Get(i), target);
505 }
506
507 cached_has_bits = this_._impl_._has_bits_[0];
508 // optional int64 lower_bound = 3;
509 if ((cached_has_bits & 0x00000002u) != 0) {
510 target =
511 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>(
512 stream, this_._internal_lower_bound(), target);
513 }
514
515 // optional int64 upper_bound = 4;
516 if ((cached_has_bits & 0x00000004u) != 0) {
517 target =
518 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<4>(
519 stream, this_._internal_upper_bound(), target);
520 }
521
522 // optional string name = 5 [default = ""];
523 if ((cached_has_bits & 0x00000001u) != 0) {
524 const ::std::string& _s = this_._internal_name();
525 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
526 "operations_research.sat.LinearBooleanConstraint.name");
527 target = stream->WriteStringMaybeAliased(5, _s, target);
528 }
529
530 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
531 target =
532 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
533 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
534 }
535 // @@protoc_insertion_point(serialize_to_array_end:operations_research.sat.LinearBooleanConstraint)
536 return target;
537}
538
539#if defined(PROTOBUF_CUSTOM_VTABLE)
541 const LinearBooleanConstraint& this_ = static_cast<const LinearBooleanConstraint&>(base);
542#else // PROTOBUF_CUSTOM_VTABLE
544 const LinearBooleanConstraint& this_ = *this;
545#endif // PROTOBUF_CUSTOM_VTABLE
546 // @@protoc_insertion_point(message_byte_size_start:operations_research.sat.LinearBooleanConstraint)
547 ::size_t total_size = 0;
548
549 ::uint32_t cached_has_bits = 0;
550 // Prevent compiler warnings about cached_has_bits being unused
551 (void)cached_has_bits;
552
553 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
554 {
555 // repeated int32 literals = 1;
556 {
557 ::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
558 this_._internal_literals());
559 ::size_t tag_size = ::size_t{1} *
560 ::_pbi::FromIntSize(this_._internal_literals_size());
561 total_size += tag_size + data_size;
562 }
563 // repeated int64 coefficients = 2;
564 {
565 ::size_t data_size = ::_pbi::WireFormatLite::Int64Size(
566 this_._internal_coefficients());
567 ::size_t tag_size = ::size_t{1} *
568 ::_pbi::FromIntSize(this_._internal_coefficients_size());
569 total_size += tag_size + data_size;
570 }
571 }
572 cached_has_bits = this_._impl_._has_bits_[0];
573 if ((cached_has_bits & 0x00000007u) != 0) {
574 // optional string name = 5 [default = ""];
575 if ((cached_has_bits & 0x00000001u) != 0) {
576 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
577 this_._internal_name());
578 }
579 // optional int64 lower_bound = 3;
580 if ((cached_has_bits & 0x00000002u) != 0) {
581 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
582 this_._internal_lower_bound());
583 }
584 // optional int64 upper_bound = 4;
585 if ((cached_has_bits & 0x00000004u) != 0) {
586 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
587 this_._internal_upper_bound());
588 }
589 }
590 return this_.MaybeComputeUnknownFieldsSize(total_size,
591 &this_._impl_._cached_size_);
592}
593
594void LinearBooleanConstraint::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
595 auto* const _this = static_cast<LinearBooleanConstraint*>(&to_msg);
596 auto& from = static_cast<const LinearBooleanConstraint&>(from_msg);
597 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.sat.LinearBooleanConstraint)
598 ABSL_DCHECK_NE(&from, _this);
599 ::uint32_t cached_has_bits = 0;
600 (void) cached_has_bits;
601
602 _this->_internal_mutable_literals()->MergeFrom(from._internal_literals());
603 _this->_internal_mutable_coefficients()->MergeFrom(from._internal_coefficients());
604 cached_has_bits = from._impl_._has_bits_[0];
605 if ((cached_has_bits & 0x00000007u) != 0) {
606 if ((cached_has_bits & 0x00000001u) != 0) {
607 _this->_internal_set_name(from._internal_name());
608 }
609 if ((cached_has_bits & 0x00000002u) != 0) {
610 _this->_impl_.lower_bound_ = from._impl_.lower_bound_;
611 }
612 if ((cached_has_bits & 0x00000004u) != 0) {
613 _this->_impl_.upper_bound_ = from._impl_.upper_bound_;
614 }
615 }
616 _this->_impl_._has_bits_[0] |= cached_has_bits;
617 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
618}
619
621// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.sat.LinearBooleanConstraint)
622 if (&from == this) return;
623 Clear();
624 MergeFrom(from);
625}
626
627
628void LinearBooleanConstraint::InternalSwap(LinearBooleanConstraint* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
629 using ::std::swap;
630 auto* arena = GetArena();
631 ABSL_DCHECK_EQ(arena, other->GetArena());
632 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
633 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
634 _impl_.literals_.InternalSwap(&other->_impl_.literals_);
635 _impl_.coefficients_.InternalSwap(&other->_impl_.coefficients_);
636 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
637 ::google::protobuf::internal::memswap<
638 PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.upper_bound_)
639 + sizeof(LinearBooleanConstraint::_impl_.upper_bound_)
640 - PROTOBUF_FIELD_OFFSET(LinearBooleanConstraint, _impl_.lower_bound_)>(
641 reinterpret_cast<char*>(&_impl_.lower_bound_),
642 reinterpret_cast<char*>(&other->_impl_.lower_bound_));
643}
644
645::google::protobuf::Metadata LinearBooleanConstraint::GetMetadata() const {
646 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
647}
648// ===================================================================
649
651 public:
652 using HasBits =
653 decltype(::std::declval<LinearObjective>()._impl_._has_bits_);
654 static constexpr ::int32_t kHasBitsOffset =
655 8 * PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_._has_bits_);
657
658LinearObjective::LinearObjective(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
659#if defined(PROTOBUF_CUSTOM_VTABLE)
660 : ::google::protobuf::Message(arena, LinearObjective_class_data_.base()) {
661#else // PROTOBUF_CUSTOM_VTABLE
662 : ::google::protobuf::Message(arena) {
663#endif // PROTOBUF_CUSTOM_VTABLE
664 SharedCtor(arena);
665 // @@protoc_insertion_point(arena_constructor:operations_research.sat.LinearObjective)
666}
667PROTOBUF_NDEBUG_INLINE LinearObjective::Impl_::Impl_(
668 ::google::protobuf::internal::InternalVisibility visibility,
669 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
670 const ::operations_research::sat::LinearObjective& from_msg)
671 : _has_bits_{from._has_bits_},
672 _cached_size_{0},
673 literals_{visibility, arena, from.literals_},
674 coefficients_{visibility, arena, from.coefficients_} {}
675
677 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
678 const LinearObjective& from)
679#if defined(PROTOBUF_CUSTOM_VTABLE)
680 : ::google::protobuf::Message(arena, LinearObjective_class_data_.base()) {
681#else // PROTOBUF_CUSTOM_VTABLE
682 : ::google::protobuf::Message(arena) {
683#endif // PROTOBUF_CUSTOM_VTABLE
684 LinearObjective* const _this = this;
685 (void)_this;
686 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
687 from._internal_metadata_);
688 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
689 ::memcpy(reinterpret_cast<char *>(&_impl_) +
690 offsetof(Impl_, offset_),
691 reinterpret_cast<const char *>(&from._impl_) +
692 offsetof(Impl_, offset_),
693 offsetof(Impl_, scaling_factor_) -
694 offsetof(Impl_, offset_) +
695 sizeof(Impl_::scaling_factor_));
696
697 // @@protoc_insertion_point(copy_constructor:operations_research.sat.LinearObjective)
698}
699PROTOBUF_NDEBUG_INLINE LinearObjective::Impl_::Impl_(
700 ::google::protobuf::internal::InternalVisibility visibility,
701 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
702 : _cached_size_{0},
703 literals_{visibility, arena},
704 coefficients_{visibility, arena},
705 scaling_factor_{1} {}
706
707inline void LinearObjective::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
708 new (&_impl_) Impl_(internal_visibility(), arena);
709 _impl_.offset_ = {};
710}
712 // @@protoc_insertion_point(destructor:operations_research.sat.LinearObjective)
713 SharedDtor(*this);
714}
715inline void LinearObjective::SharedDtor(MessageLite& self) {
716 LinearObjective& this_ = static_cast<LinearObjective&>(self);
717 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
718 ABSL_DCHECK(this_.GetArena() == nullptr);
719 this_._impl_.~Impl_();
720}
721
722inline void* PROTOBUF_NONNULL LinearObjective::PlacementNew_(
723 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
724 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
725 return ::new (mem) LinearObjective(arena);
726}
727constexpr auto LinearObjective::InternalNewImpl_() {
728 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
729 PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.literals_) +
730 decltype(LinearObjective::_impl_.literals_)::
731 InternalGetArenaOffset(
732 ::google::protobuf::Message::internal_visibility()),
733 PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.coefficients_) +
734 decltype(LinearObjective::_impl_.coefficients_)::
735 InternalGetArenaOffset(
736 ::google::protobuf::Message::internal_visibility()),
737 });
738 if (arena_bits.has_value()) {
739 return ::google::protobuf::internal::MessageCreator::CopyInit(
740 sizeof(LinearObjective), alignof(LinearObjective), *arena_bits);
741 } else {
742 return ::google::protobuf::internal::MessageCreator(&LinearObjective::PlacementNew_,
743 sizeof(LinearObjective),
744 alignof(LinearObjective));
745 }
746}
748 return ::google::protobuf::internal::ClassDataFull{
749 ::google::protobuf::internal::ClassData{
751 &_table_.header,
752 nullptr, // OnDemandRegisterArenaDtor
753 nullptr, // IsInitialized
754 &LinearObjective::MergeImpl,
755 ::google::protobuf::Message::GetNewImpl<LinearObjective>(),
756#if defined(PROTOBUF_CUSTOM_VTABLE)
757 &LinearObjective::SharedDtor,
758 ::google::protobuf::Message::GetClearImpl<LinearObjective>(), &LinearObjective::ByteSizeLong,
760#endif // PROTOBUF_CUSTOM_VTABLE
761 PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_._cached_size_),
762 false,
763 },
764 &LinearObjective::kDescriptorMethods,
766 nullptr, // tracker
767 };
768}
769
770PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
771 ::google::protobuf::internal::ClassDataFull LinearObjective_class_data_ =
774PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
776 ::google::protobuf::internal::PrefetchToLocalCache(&LinearObjective_class_data_);
777 ::google::protobuf::internal::PrefetchToLocalCache(LinearObjective_class_data_.tc_table);
778 return LinearObjective_class_data_.base();
779}
780PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
781const ::_pbi::TcParseTable<2, 4, 0, 0, 2>
782LinearObjective::_table_ = {
783 {
784 PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_._has_bits_),
785 0, // no _extensions_
786 4, 24, // max_field_number, fast_idx_mask
787 offsetof(decltype(_table_), field_lookup_table),
788 4294967280, // skipmap
789 offsetof(decltype(_table_), field_entries),
790 4, // num_field_entries
791 0, // num_aux_entries
792 offsetof(decltype(_table_), field_names), // no aux_entries
794 nullptr, // post_loop_handler
795 ::_pbi::TcParser::GenericFallback, // fallback
796 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
797 ::_pbi::TcParser::GetTable<::operations_research::sat::LinearObjective>(), // to_prefetch
798 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
799 }, {{
800 // optional double scaling_factor = 4 [default = 1];
801 {::_pbi::TcParser::FastF64S1,
802 {33, 1, 0, PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.scaling_factor_)}},
803 // repeated int32 literals = 1;
804 {::_pbi::TcParser::FastV32R1,
805 {8, 63, 0, PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.literals_)}},
806 // repeated int64 coefficients = 2;
807 {::_pbi::TcParser::FastV64R1,
808 {16, 63, 0, PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.coefficients_)}},
809 // optional double offset = 3 [default = 0];
810 {::_pbi::TcParser::FastF64S1,
811 {25, 0, 0, PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.offset_)}},
812 }}, {{
813 65535, 65535
814 }}, {{
815 // repeated int32 literals = 1;
816 {PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.literals_), -1, 0,
817 (0 | ::_fl::kFcRepeated | ::_fl::kInt32)},
818 // repeated int64 coefficients = 2;
819 {PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.coefficients_), -1, 0,
820 (0 | ::_fl::kFcRepeated | ::_fl::kInt64)},
821 // optional double offset = 3 [default = 0];
822 {PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.offset_), _Internal::kHasBitsOffset + 0, 0,
823 (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
824 // optional double scaling_factor = 4 [default = 1];
825 {PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.scaling_factor_), _Internal::kHasBitsOffset + 1, 0,
826 (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
827 }},
828 // no aux_entries
829 {{
830 }},
831};
832PROTOBUF_NOINLINE void LinearObjective::Clear() {
833// @@protoc_insertion_point(message_clear_start:operations_research.sat.LinearObjective)
834 ::google::protobuf::internal::TSanWrite(&_impl_);
835 ::uint32_t cached_has_bits = 0;
836 // Prevent compiler warnings about cached_has_bits being unused
837 (void) cached_has_bits;
838
839 _impl_.literals_.Clear();
840 _impl_.coefficients_.Clear();
841 cached_has_bits = _impl_._has_bits_[0];
842 if ((cached_has_bits & 0x00000003u) != 0) {
843 _impl_.offset_ = 0;
844 _impl_.scaling_factor_ = 1;
845 }
846 _impl_._has_bits_.Clear();
847 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
848}
849
850#if defined(PROTOBUF_CUSTOM_VTABLE)
851::uint8_t* PROTOBUF_NONNULL LinearObjective::_InternalSerialize(
852 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
853 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
854 const LinearObjective& this_ = static_cast<const LinearObjective&>(base);
855#else // PROTOBUF_CUSTOM_VTABLE
856::uint8_t* PROTOBUF_NONNULL LinearObjective::_InternalSerialize(
857 ::uint8_t* PROTOBUF_NONNULL target,
858 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
859 const LinearObjective& this_ = *this;
860#endif // PROTOBUF_CUSTOM_VTABLE
861 // @@protoc_insertion_point(serialize_to_array_start:operations_research.sat.LinearObjective)
862 ::uint32_t cached_has_bits = 0;
863 (void)cached_has_bits;
864
865 // repeated int32 literals = 1;
866 for (int i = 0, n = this_._internal_literals_size(); i < n; ++i) {
867 target = stream->EnsureSpace(target);
868 target = ::_pbi::WireFormatLite::WriteInt32ToArray(
869 1, this_._internal_literals().Get(i), target);
870 }
871
872 // repeated int64 coefficients = 2;
873 for (int i = 0, n = this_._internal_coefficients_size(); i < n; ++i) {
874 target = stream->EnsureSpace(target);
875 target = ::_pbi::WireFormatLite::WriteInt64ToArray(
876 2, this_._internal_coefficients().Get(i), target);
877 }
878
879 cached_has_bits = this_._impl_._has_bits_[0];
880 // optional double offset = 3 [default = 0];
881 if ((cached_has_bits & 0x00000001u) != 0) {
882 target = stream->EnsureSpace(target);
883 target = ::_pbi::WireFormatLite::WriteDoubleToArray(
884 3, this_._internal_offset(), target);
885 }
886
887 // optional double scaling_factor = 4 [default = 1];
888 if ((cached_has_bits & 0x00000002u) != 0) {
889 target = stream->EnsureSpace(target);
890 target = ::_pbi::WireFormatLite::WriteDoubleToArray(
891 4, this_._internal_scaling_factor(), target);
892 }
893
894 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
895 target =
896 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
897 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
898 }
899 // @@protoc_insertion_point(serialize_to_array_end:operations_research.sat.LinearObjective)
900 return target;
901}
902
903#if defined(PROTOBUF_CUSTOM_VTABLE)
905 const LinearObjective& this_ = static_cast<const LinearObjective&>(base);
906#else // PROTOBUF_CUSTOM_VTABLE
907::size_t LinearObjective::ByteSizeLong() const {
908 const LinearObjective& this_ = *this;
909#endif // PROTOBUF_CUSTOM_VTABLE
910 // @@protoc_insertion_point(message_byte_size_start:operations_research.sat.LinearObjective)
911 ::size_t total_size = 0;
912
913 ::uint32_t cached_has_bits = 0;
914 // Prevent compiler warnings about cached_has_bits being unused
915 (void)cached_has_bits;
916
917 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
918 {
919 // repeated int32 literals = 1;
920 {
921 ::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
922 this_._internal_literals());
923 ::size_t tag_size = ::size_t{1} *
924 ::_pbi::FromIntSize(this_._internal_literals_size());
925 total_size += tag_size + data_size;
926 }
927 // repeated int64 coefficients = 2;
928 {
929 ::size_t data_size = ::_pbi::WireFormatLite::Int64Size(
930 this_._internal_coefficients());
931 ::size_t tag_size = ::size_t{1} *
932 ::_pbi::FromIntSize(this_._internal_coefficients_size());
933 total_size += tag_size + data_size;
934 }
935 }
936 cached_has_bits = this_._impl_._has_bits_[0];
937 total_size += ::absl::popcount(0x00000003u & cached_has_bits) * 9;
938 return this_.MaybeComputeUnknownFieldsSize(total_size,
939 &this_._impl_._cached_size_);
940}
941
942void LinearObjective::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
943 auto* const _this = static_cast<LinearObjective*>(&to_msg);
944 auto& from = static_cast<const LinearObjective&>(from_msg);
945 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.sat.LinearObjective)
946 ABSL_DCHECK_NE(&from, _this);
947 ::uint32_t cached_has_bits = 0;
948 (void) cached_has_bits;
949
950 _this->_internal_mutable_literals()->MergeFrom(from._internal_literals());
951 _this->_internal_mutable_coefficients()->MergeFrom(from._internal_coefficients());
952 cached_has_bits = from._impl_._has_bits_[0];
953 if ((cached_has_bits & 0x00000003u) != 0) {
954 if ((cached_has_bits & 0x00000001u) != 0) {
955 _this->_impl_.offset_ = from._impl_.offset_;
956 }
957 if ((cached_has_bits & 0x00000002u) != 0) {
958 _this->_impl_.scaling_factor_ = from._impl_.scaling_factor_;
959 }
960 }
961 _this->_impl_._has_bits_[0] |= cached_has_bits;
962 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
963}
964
965void LinearObjective::CopyFrom(const LinearObjective& from) {
966// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.sat.LinearObjective)
967 if (&from == this) return;
968 Clear();
969 MergeFrom(from);
970}
971
972
973void LinearObjective::InternalSwap(LinearObjective* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
974 using ::std::swap;
975 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
976 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
977 _impl_.literals_.InternalSwap(&other->_impl_.literals_);
978 _impl_.coefficients_.InternalSwap(&other->_impl_.coefficients_);
979 ::google::protobuf::internal::memswap<
980 PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.scaling_factor_)
981 + sizeof(LinearObjective::_impl_.scaling_factor_)
982 - PROTOBUF_FIELD_OFFSET(LinearObjective, _impl_.offset_)>(
983 reinterpret_cast<char*>(&_impl_.offset_),
984 reinterpret_cast<char*>(&other->_impl_.offset_));
985}
986
987::google::protobuf::Metadata LinearObjective::GetMetadata() const {
988 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
990// ===================================================================
991
993 public:
994};
996BooleanAssignment::BooleanAssignment(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
997#if defined(PROTOBUF_CUSTOM_VTABLE)
998 : ::google::protobuf::Message(arena, BooleanAssignment_class_data_.base()) {
999#else // PROTOBUF_CUSTOM_VTABLE
1000 : ::google::protobuf::Message(arena) {
1001#endif // PROTOBUF_CUSTOM_VTABLE
1002 SharedCtor(arena);
1003 // @@protoc_insertion_point(arena_constructor:operations_research.sat.BooleanAssignment)
1004}
1005PROTOBUF_NDEBUG_INLINE BooleanAssignment::Impl_::Impl_(
1006 ::google::protobuf::internal::InternalVisibility visibility,
1007 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
1008 const ::operations_research::sat::BooleanAssignment& from_msg)
1009 : literals_{visibility, arena, from.literals_},
1010 _cached_size_{0} {}
1011
1013 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
1014 const BooleanAssignment& from)
1015#if defined(PROTOBUF_CUSTOM_VTABLE)
1016 : ::google::protobuf::Message(arena, BooleanAssignment_class_data_.base()) {
1017#else // PROTOBUF_CUSTOM_VTABLE
1018 : ::google::protobuf::Message(arena) {
1019#endif // PROTOBUF_CUSTOM_VTABLE
1020 BooleanAssignment* const _this = this;
1021 (void)_this;
1022 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1023 from._internal_metadata_);
1024 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
1025
1026 // @@protoc_insertion_point(copy_constructor:operations_research.sat.BooleanAssignment)
1027}
1028PROTOBUF_NDEBUG_INLINE BooleanAssignment::Impl_::Impl_(
1029 ::google::protobuf::internal::InternalVisibility visibility,
1030 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
1031 : literals_{visibility, arena},
1032 _cached_size_{0} {}
1033
1034inline void BooleanAssignment::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
1035 new (&_impl_) Impl_(internal_visibility(), arena);
1036}
1038 // @@protoc_insertion_point(destructor:operations_research.sat.BooleanAssignment)
1039 SharedDtor(*this);
1041inline void BooleanAssignment::SharedDtor(MessageLite& self) {
1042 BooleanAssignment& this_ = static_cast<BooleanAssignment&>(self);
1043 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
1044 ABSL_DCHECK(this_.GetArena() == nullptr);
1045 this_._impl_.~Impl_();
1046}
1047
1048inline void* PROTOBUF_NONNULL BooleanAssignment::PlacementNew_(
1049 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
1050 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
1051 return ::new (mem) BooleanAssignment(arena);
1052}
1053constexpr auto BooleanAssignment::InternalNewImpl_() {
1054 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
1055 PROTOBUF_FIELD_OFFSET(BooleanAssignment, _impl_.literals_) +
1056 decltype(BooleanAssignment::_impl_.literals_)::
1057 InternalGetArenaOffset(
1058 ::google::protobuf::Message::internal_visibility()),
1059 });
1060 if (arena_bits.has_value()) {
1061 return ::google::protobuf::internal::MessageCreator::ZeroInit(
1062 sizeof(BooleanAssignment), alignof(BooleanAssignment), *arena_bits);
1063 } else {
1064 return ::google::protobuf::internal::MessageCreator(&BooleanAssignment::PlacementNew_,
1065 sizeof(BooleanAssignment),
1066 alignof(BooleanAssignment));
1067 }
1068}
1070 return ::google::protobuf::internal::ClassDataFull{
1071 ::google::protobuf::internal::ClassData{
1073 &_table_.header,
1074 nullptr, // OnDemandRegisterArenaDtor
1075 nullptr, // IsInitialized
1076 &BooleanAssignment::MergeImpl,
1077 ::google::protobuf::Message::GetNewImpl<BooleanAssignment>(),
1078#if defined(PROTOBUF_CUSTOM_VTABLE)
1079 &BooleanAssignment::SharedDtor,
1080 ::google::protobuf::Message::GetClearImpl<BooleanAssignment>(), &BooleanAssignment::ByteSizeLong,
1082#endif // PROTOBUF_CUSTOM_VTABLE
1083 PROTOBUF_FIELD_OFFSET(BooleanAssignment, _impl_._cached_size_),
1084 false,
1085 },
1086 &BooleanAssignment::kDescriptorMethods,
1088 nullptr, // tracker
1089 };
1090}
1091
1092PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
1093 ::google::protobuf::internal::ClassDataFull BooleanAssignment_class_data_ =
1095
1096PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
1098 ::google::protobuf::internal::PrefetchToLocalCache(&BooleanAssignment_class_data_);
1099 ::google::protobuf::internal::PrefetchToLocalCache(BooleanAssignment_class_data_.tc_table);
1101}
1102PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1103const ::_pbi::TcParseTable<0, 1, 0, 0, 2>
1104BooleanAssignment::_table_ = {
1105 {
1106 0, // no _has_bits_
1107 0, // no _extensions_
1108 1, 0, // max_field_number, fast_idx_mask
1109 offsetof(decltype(_table_), field_lookup_table),
1110 4294967294, // skipmap
1111 offsetof(decltype(_table_), field_entries),
1112 1, // num_field_entries
1113 0, // num_aux_entries
1114 offsetof(decltype(_table_), field_names), // no aux_entries
1116 nullptr, // post_loop_handler
1117 ::_pbi::TcParser::GenericFallback, // fallback
1118 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
1119 ::_pbi::TcParser::GetTable<::operations_research::sat::BooleanAssignment>(), // to_prefetch
1120 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
1121 }, {{
1122 // repeated int32 literals = 1;
1123 {::_pbi::TcParser::FastV32R1,
1124 {8, 63, 0, PROTOBUF_FIELD_OFFSET(BooleanAssignment, _impl_.literals_)}},
1125 }}, {{
1126 65535, 65535
1127 }}, {{
1128 // repeated int32 literals = 1;
1129 {PROTOBUF_FIELD_OFFSET(BooleanAssignment, _impl_.literals_), 0, 0,
1130 (0 | ::_fl::kFcRepeated | ::_fl::kInt32)},
1131 }},
1132 // no aux_entries
1133 {{
1134 }},
1135};
1136PROTOBUF_NOINLINE void BooleanAssignment::Clear() {
1137// @@protoc_insertion_point(message_clear_start:operations_research.sat.BooleanAssignment)
1138 ::google::protobuf::internal::TSanWrite(&_impl_);
1139 ::uint32_t cached_has_bits = 0;
1140 // Prevent compiler warnings about cached_has_bits being unused
1141 (void) cached_has_bits;
1142
1143 _impl_.literals_.Clear();
1144 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
1145}
1146
1147#if defined(PROTOBUF_CUSTOM_VTABLE)
1148::uint8_t* PROTOBUF_NONNULL BooleanAssignment::_InternalSerialize(
1149 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
1150 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
1151 const BooleanAssignment& this_ = static_cast<const BooleanAssignment&>(base);
1152#else // PROTOBUF_CUSTOM_VTABLE
1153::uint8_t* PROTOBUF_NONNULL BooleanAssignment::_InternalSerialize(
1154 ::uint8_t* PROTOBUF_NONNULL target,
1155 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
1156 const BooleanAssignment& this_ = *this;
1157#endif // PROTOBUF_CUSTOM_VTABLE
1158 // @@protoc_insertion_point(serialize_to_array_start:operations_research.sat.BooleanAssignment)
1159 ::uint32_t cached_has_bits = 0;
1160 (void)cached_has_bits;
1161
1162 // repeated int32 literals = 1;
1163 for (int i = 0, n = this_._internal_literals_size(); i < n; ++i) {
1164 target = stream->EnsureSpace(target);
1165 target = ::_pbi::WireFormatLite::WriteInt32ToArray(
1166 1, this_._internal_literals().Get(i), target);
1167 }
1168
1169 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1170 target =
1171 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1172 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1173 }
1174 // @@protoc_insertion_point(serialize_to_array_end:operations_research.sat.BooleanAssignment)
1175 return target;
1176}
1177
1178#if defined(PROTOBUF_CUSTOM_VTABLE)
1179::size_t BooleanAssignment::ByteSizeLong(const MessageLite& base) {
1180 const BooleanAssignment& this_ = static_cast<const BooleanAssignment&>(base);
1181#else // PROTOBUF_CUSTOM_VTABLE
1182::size_t BooleanAssignment::ByteSizeLong() const {
1183 const BooleanAssignment& this_ = *this;
1184#endif // PROTOBUF_CUSTOM_VTABLE
1185 // @@protoc_insertion_point(message_byte_size_start:operations_research.sat.BooleanAssignment)
1186 ::size_t total_size = 0;
1187
1188 ::uint32_t cached_has_bits = 0;
1189 // Prevent compiler warnings about cached_has_bits being unused
1190 (void)cached_has_bits;
1191
1192 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1193 {
1194 // repeated int32 literals = 1;
1195 {
1196 ::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
1197 this_._internal_literals());
1198 ::size_t tag_size = ::size_t{1} *
1199 ::_pbi::FromIntSize(this_._internal_literals_size());
1200 total_size += tag_size + data_size;
1201 }
1202 }
1203 return this_.MaybeComputeUnknownFieldsSize(total_size,
1204 &this_._impl_._cached_size_);
1205}
1206
1207void BooleanAssignment::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
1208 auto* const _this = static_cast<BooleanAssignment*>(&to_msg);
1209 auto& from = static_cast<const BooleanAssignment&>(from_msg);
1210 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.sat.BooleanAssignment)
1211 ABSL_DCHECK_NE(&from, _this);
1212 ::uint32_t cached_has_bits = 0;
1213 (void) cached_has_bits;
1214
1215 _this->_internal_mutable_literals()->MergeFrom(from._internal_literals());
1216 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
1217}
1218
1220// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.sat.BooleanAssignment)
1221 if (&from == this) return;
1223 MergeFrom(from);
1224}
1225
1226
1227void BooleanAssignment::InternalSwap(BooleanAssignment* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1228 using ::std::swap;
1229 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1230 _impl_.literals_.InternalSwap(&other->_impl_.literals_);
1231}
1232
1233::google::protobuf::Metadata BooleanAssignment::GetMetadata() const {
1234 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1235}
1236// ===================================================================
1237
1239 public:
1240 using HasBits =
1241 decltype(::std::declval<LinearBooleanProblem>()._impl_._has_bits_);
1242 static constexpr ::int32_t kHasBitsOffset =
1243 8 * PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_._has_bits_);
1245
1246LinearBooleanProblem::LinearBooleanProblem(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
1247#if defined(PROTOBUF_CUSTOM_VTABLE)
1248 : ::google::protobuf::Message(arena, LinearBooleanProblem_class_data_.base()) {
1249#else // PROTOBUF_CUSTOM_VTABLE
1250 : ::google::protobuf::Message(arena) {
1251#endif // PROTOBUF_CUSTOM_VTABLE
1252 SharedCtor(arena);
1253 // @@protoc_insertion_point(arena_constructor:operations_research.sat.LinearBooleanProblem)
1254}
1255PROTOBUF_NDEBUG_INLINE LinearBooleanProblem::Impl_::Impl_(
1256 ::google::protobuf::internal::InternalVisibility visibility,
1257 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
1258 const ::operations_research::sat::LinearBooleanProblem& from_msg)
1259 : _has_bits_{from._has_bits_},
1260 _cached_size_{0},
1261 constraints_{visibility, arena, from.constraints_},
1262 var_names_{visibility, arena, from.var_names_},
1263 name_(arena, from.name_) {}
1264
1266 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
1267 const LinearBooleanProblem& from)
1268#if defined(PROTOBUF_CUSTOM_VTABLE)
1269 : ::google::protobuf::Message(arena, LinearBooleanProblem_class_data_.base()) {
1270#else // PROTOBUF_CUSTOM_VTABLE
1271 : ::google::protobuf::Message(arena) {
1272#endif // PROTOBUF_CUSTOM_VTABLE
1273 LinearBooleanProblem* const _this = this;
1274 (void)_this;
1275 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1276 from._internal_metadata_);
1277 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
1278 ::uint32_t cached_has_bits = _impl_._has_bits_[0];
1279 _impl_.objective_ = ((cached_has_bits & 0x00000002u) != 0)
1280 ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.objective_)
1281 : nullptr;
1282 _impl_.assignment_ = ((cached_has_bits & 0x00000004u) != 0)
1283 ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.assignment_)
1284 : nullptr;
1285 ::memcpy(reinterpret_cast<char *>(&_impl_) +
1286 offsetof(Impl_, num_variables_),
1287 reinterpret_cast<const char *>(&from._impl_) +
1288 offsetof(Impl_, num_variables_),
1289 offsetof(Impl_, original_num_variables_) -
1290 offsetof(Impl_, num_variables_) +
1291 sizeof(Impl_::original_num_variables_));
1292
1293 // @@protoc_insertion_point(copy_constructor:operations_research.sat.LinearBooleanProblem)
1294}
1295PROTOBUF_NDEBUG_INLINE LinearBooleanProblem::Impl_::Impl_(
1296 ::google::protobuf::internal::InternalVisibility visibility,
1297 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
1298 : _cached_size_{0},
1299 constraints_{visibility, arena},
1300 var_names_{visibility, arena},
1301 name_(arena) {}
1302
1303inline void LinearBooleanProblem::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
1304 new (&_impl_) Impl_(internal_visibility(), arena);
1305 ::memset(reinterpret_cast<char *>(&_impl_) +
1306 offsetof(Impl_, objective_),
1307 0,
1308 offsetof(Impl_, original_num_variables_) -
1309 offsetof(Impl_, objective_) +
1310 sizeof(Impl_::original_num_variables_));
1311}
1313 // @@protoc_insertion_point(destructor:operations_research.sat.LinearBooleanProblem)
1314 SharedDtor(*this);
1315}
1316inline void LinearBooleanProblem::SharedDtor(MessageLite& self) {
1317 LinearBooleanProblem& this_ = static_cast<LinearBooleanProblem&>(self);
1318 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
1319 ABSL_DCHECK(this_.GetArena() == nullptr);
1320 this_._impl_.name_.Destroy();
1321 delete this_._impl_.objective_;
1322 delete this_._impl_.assignment_;
1323 this_._impl_.~Impl_();
1324}
1325
1326inline void* PROTOBUF_NONNULL LinearBooleanProblem::PlacementNew_(
1327 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
1328 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
1329 return ::new (mem) LinearBooleanProblem(arena);
1332 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
1333 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.constraints_) +
1334 decltype(LinearBooleanProblem::_impl_.constraints_)::
1335 InternalGetArenaOffset(
1336 ::google::protobuf::Message::internal_visibility()),
1337 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.var_names_) +
1338 decltype(LinearBooleanProblem::_impl_.var_names_)::
1339 InternalGetArenaOffset(
1340 ::google::protobuf::Message::internal_visibility()),
1341 });
1342 if (arena_bits.has_value()) {
1343 return ::google::protobuf::internal::MessageCreator::CopyInit(
1344 sizeof(LinearBooleanProblem), alignof(LinearBooleanProblem), *arena_bits);
1345 } else {
1346 return ::google::protobuf::internal::MessageCreator(&LinearBooleanProblem::PlacementNew_,
1347 sizeof(LinearBooleanProblem),
1348 alignof(LinearBooleanProblem));
1349 }
1350}
1352 return ::google::protobuf::internal::ClassDataFull{
1353 ::google::protobuf::internal::ClassData{
1355 &_table_.header,
1356 nullptr, // OnDemandRegisterArenaDtor
1357 nullptr, // IsInitialized
1358 &LinearBooleanProblem::MergeImpl,
1359 ::google::protobuf::Message::GetNewImpl<LinearBooleanProblem>(),
1360#if defined(PROTOBUF_CUSTOM_VTABLE)
1361 &LinearBooleanProblem::SharedDtor,
1362 ::google::protobuf::Message::GetClearImpl<LinearBooleanProblem>(), &LinearBooleanProblem::ByteSizeLong,
1364#endif // PROTOBUF_CUSTOM_VTABLE
1365 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_._cached_size_),
1366 false,
1367 },
1368 &LinearBooleanProblem::kDescriptorMethods,
1370 nullptr, // tracker
1371 };
1372}
1373
1374PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
1375 ::google::protobuf::internal::ClassDataFull LinearBooleanProblem_class_data_ =
1377
1378PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
1380 ::google::protobuf::internal::PrefetchToLocalCache(&LinearBooleanProblem_class_data_);
1381 ::google::protobuf::internal::PrefetchToLocalCache(LinearBooleanProblem_class_data_.tc_table);
1384PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1385const ::_pbi::TcParseTable<3, 7, 3, 66, 2>
1386LinearBooleanProblem::_table_ = {
1387 {
1388 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_._has_bits_),
1389 0, // no _extensions_
1390 8, 56, // max_field_number, fast_idx_mask
1391 offsetof(decltype(_table_), field_lookup_table),
1392 4294967042, // skipmap
1393 offsetof(decltype(_table_), field_entries),
1394 7, // num_field_entries
1395 3, // num_aux_entries
1396 offsetof(decltype(_table_), aux_entries),
1398 nullptr, // post_loop_handler
1399 ::_pbi::TcParser::GenericFallback, // fallback
1400 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
1401 ::_pbi::TcParser::GetTable<::operations_research::sat::LinearBooleanProblem>(), // to_prefetch
1402 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
1403 }, {{
1404 // optional int32 original_num_variables = 8;
1405 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(LinearBooleanProblem, _impl_.original_num_variables_), 4>(),
1406 {64, 4, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.original_num_variables_)}},
1407 // optional string name = 1 [default = ""];
1408 {::_pbi::TcParser::FastSS1,
1409 {10, 0, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.name_)}},
1410 {::_pbi::TcParser::MiniParse, {}},
1411 // optional int32 num_variables = 3;
1412 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(LinearBooleanProblem, _impl_.num_variables_), 3>(),
1413 {24, 3, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.num_variables_)}},
1414 // repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
1415 {::_pbi::TcParser::FastMtR1,
1416 {34, 63, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.constraints_)}},
1417 // optional .operations_research.sat.LinearObjective objective = 5;
1418 {::_pbi::TcParser::FastMtS1,
1419 {42, 1, 1, PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.objective_)}},
1420 // repeated string var_names = 6;
1421 {::_pbi::TcParser::FastSR1,
1422 {50, 63, 0, PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.var_names_)}},
1423 // optional .operations_research.sat.BooleanAssignment assignment = 7;
1424 {::_pbi::TcParser::FastMtS1,
1425 {58, 2, 2, PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.assignment_)}},
1426 }}, {{
1427 65535, 65535
1428 }}, {{
1429 // optional string name = 1 [default = ""];
1430 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.name_), _Internal::kHasBitsOffset + 0, 0,
1431 (0 | ::_fl::kFcOptional | ::_fl::kRawString | ::_fl::kRepAString)},
1432 // optional int32 num_variables = 3;
1433 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.num_variables_), _Internal::kHasBitsOffset + 3, 0,
1434 (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
1435 // repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
1436 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.constraints_), -1, 0,
1437 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
1438 // optional .operations_research.sat.LinearObjective objective = 5;
1439 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.objective_), _Internal::kHasBitsOffset + 1, 1,
1440 (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
1441 // repeated string var_names = 6;
1442 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.var_names_), -1, 0,
1443 (0 | ::_fl::kFcRepeated | ::_fl::kRawString | ::_fl::kRepSString)},
1444 // optional .operations_research.sat.BooleanAssignment assignment = 7;
1445 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.assignment_), _Internal::kHasBitsOffset + 2, 2,
1446 (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
1447 // optional int32 original_num_variables = 8;
1448 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.original_num_variables_), _Internal::kHasBitsOffset + 4, 0,
1449 (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
1450 }},
1451 {{
1452 {::_pbi::TcParser::GetTable<::operations_research::sat::LinearBooleanConstraint>()},
1453 {::_pbi::TcParser::GetTable<::operations_research::sat::LinearObjective>()},
1454 {::_pbi::TcParser::GetTable<::operations_research::sat::BooleanAssignment>()},
1455 }},
1456 {{
1457 "\54\4\0\0\0\11\0\0"
1458 "operations_research.sat.LinearBooleanProblem"
1459 "name"
1460 "var_names"
1461 }},
1462};
1463PROTOBUF_NOINLINE void LinearBooleanProblem::Clear() {
1464// @@protoc_insertion_point(message_clear_start:operations_research.sat.LinearBooleanProblem)
1465 ::google::protobuf::internal::TSanWrite(&_impl_);
1466 ::uint32_t cached_has_bits = 0;
1467 // Prevent compiler warnings about cached_has_bits being unused
1468 (void) cached_has_bits;
1469
1470 _impl_.constraints_.Clear();
1471 _impl_.var_names_.Clear();
1472 cached_has_bits = _impl_._has_bits_[0];
1473 if ((cached_has_bits & 0x00000007u) != 0) {
1474 if ((cached_has_bits & 0x00000001u) != 0) {
1475 _impl_.name_.ClearNonDefaultToEmpty();
1476 }
1477 if ((cached_has_bits & 0x00000002u) != 0) {
1478 ABSL_DCHECK(_impl_.objective_ != nullptr);
1479 _impl_.objective_->Clear();
1480 }
1481 if ((cached_has_bits & 0x00000004u) != 0) {
1482 ABSL_DCHECK(_impl_.assignment_ != nullptr);
1483 _impl_.assignment_->Clear();
1484 }
1485 }
1486 if ((cached_has_bits & 0x00000018u) != 0) {
1487 ::memset(&_impl_.num_variables_, 0, static_cast<::size_t>(
1488 reinterpret_cast<char*>(&_impl_.original_num_variables_) -
1489 reinterpret_cast<char*>(&_impl_.num_variables_)) + sizeof(_impl_.original_num_variables_));
1490 }
1491 _impl_._has_bits_.Clear();
1492 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
1493}
1494
1495#if defined(PROTOBUF_CUSTOM_VTABLE)
1496::uint8_t* PROTOBUF_NONNULL LinearBooleanProblem::_InternalSerialize(
1497 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
1498 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
1499 const LinearBooleanProblem& this_ = static_cast<const LinearBooleanProblem&>(base);
1500#else // PROTOBUF_CUSTOM_VTABLE
1501::uint8_t* PROTOBUF_NONNULL LinearBooleanProblem::_InternalSerialize(
1502 ::uint8_t* PROTOBUF_NONNULL target,
1503 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
1504 const LinearBooleanProblem& this_ = *this;
1505#endif // PROTOBUF_CUSTOM_VTABLE
1506 // @@protoc_insertion_point(serialize_to_array_start:operations_research.sat.LinearBooleanProblem)
1507 ::uint32_t cached_has_bits = 0;
1508 (void)cached_has_bits;
1509
1510 cached_has_bits = this_._impl_._has_bits_[0];
1511 // optional string name = 1 [default = ""];
1512 if ((cached_has_bits & 0x00000001u) != 0) {
1513 const ::std::string& _s = this_._internal_name();
1514 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
1515 "operations_research.sat.LinearBooleanProblem.name");
1516 target = stream->WriteStringMaybeAliased(1, _s, target);
1517 }
1518
1519 // optional int32 num_variables = 3;
1520 if ((cached_has_bits & 0x00000008u) != 0) {
1521 target =
1522 ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<3>(
1523 stream, this_._internal_num_variables(), target);
1524 }
1525
1526 // repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
1527 for (unsigned i = 0, n = static_cast<unsigned>(
1528 this_._internal_constraints_size());
1529 i < n; i++) {
1530 const auto& repfield = this_._internal_constraints().Get(i);
1531 target =
1532 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1533 4, repfield, repfield.GetCachedSize(),
1534 target, stream);
1535 }
1536
1537 // optional .operations_research.sat.LinearObjective objective = 5;
1538 if ((cached_has_bits & 0x00000002u) != 0) {
1539 target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1540 5, *this_._impl_.objective_, this_._impl_.objective_->GetCachedSize(), target,
1541 stream);
1542 }
1543
1544 // repeated string var_names = 6;
1545 for (int i = 0, n = this_._internal_var_names_size(); i < n; ++i) {
1546 const auto& s = this_._internal_var_names().Get(i);
1547 ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
1548 "operations_research.sat.LinearBooleanProblem.var_names");
1549 target = stream->WriteString(6, s, target);
1550 }
1551
1552 // optional .operations_research.sat.BooleanAssignment assignment = 7;
1553 if ((cached_has_bits & 0x00000004u) != 0) {
1554 target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1555 7, *this_._impl_.assignment_, this_._impl_.assignment_->GetCachedSize(), target,
1556 stream);
1557 }
1558
1559 // optional int32 original_num_variables = 8;
1560 if ((cached_has_bits & 0x00000010u) != 0) {
1561 target =
1562 ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<8>(
1563 stream, this_._internal_original_num_variables(), target);
1564 }
1565
1566 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1567 target =
1568 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1569 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1570 }
1571 // @@protoc_insertion_point(serialize_to_array_end:operations_research.sat.LinearBooleanProblem)
1572 return target;
1573}
1574
1575#if defined(PROTOBUF_CUSTOM_VTABLE)
1576::size_t LinearBooleanProblem::ByteSizeLong(const MessageLite& base) {
1577 const LinearBooleanProblem& this_ = static_cast<const LinearBooleanProblem&>(base);
1578#else // PROTOBUF_CUSTOM_VTABLE
1579::size_t LinearBooleanProblem::ByteSizeLong() const {
1580 const LinearBooleanProblem& this_ = *this;
1581#endif // PROTOBUF_CUSTOM_VTABLE
1582 // @@protoc_insertion_point(message_byte_size_start:operations_research.sat.LinearBooleanProblem)
1583 ::size_t total_size = 0;
1584
1585 ::uint32_t cached_has_bits = 0;
1586 // Prevent compiler warnings about cached_has_bits being unused
1587 (void)cached_has_bits;
1588
1589 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1590 {
1591 // repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
1592 {
1593 total_size += 1UL * this_._internal_constraints_size();
1594 for (const auto& msg : this_._internal_constraints()) {
1595 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1596 }
1597 }
1598 // repeated string var_names = 6;
1599 {
1600 total_size +=
1601 1 * ::google::protobuf::internal::FromIntSize(this_._internal_var_names().size());
1602 for (int i = 0, n = this_._internal_var_names().size(); i < n; ++i) {
1603 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
1604 this_._internal_var_names().Get(i));
1605 }
1606 }
1607 }
1608 cached_has_bits = this_._impl_._has_bits_[0];
1609 if ((cached_has_bits & 0x0000001fu) != 0) {
1610 // optional string name = 1 [default = ""];
1611 if ((cached_has_bits & 0x00000001u) != 0) {
1612 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1613 this_._internal_name());
1614 }
1615 // optional .operations_research.sat.LinearObjective objective = 5;
1616 if ((cached_has_bits & 0x00000002u) != 0) {
1617 total_size += 1 +
1618 ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.objective_);
1619 }
1620 // optional .operations_research.sat.BooleanAssignment assignment = 7;
1621 if ((cached_has_bits & 0x00000004u) != 0) {
1622 total_size += 1 +
1623 ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.assignment_);
1624 }
1625 // optional int32 num_variables = 3;
1626 if ((cached_has_bits & 0x00000008u) != 0) {
1627 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
1628 this_._internal_num_variables());
1629 }
1630 // optional int32 original_num_variables = 8;
1631 if ((cached_has_bits & 0x00000010u) != 0) {
1632 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
1633 this_._internal_original_num_variables());
1634 }
1635 }
1636 return this_.MaybeComputeUnknownFieldsSize(total_size,
1637 &this_._impl_._cached_size_);
1638}
1639
1640void LinearBooleanProblem::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
1641 auto* const _this = static_cast<LinearBooleanProblem*>(&to_msg);
1642 auto& from = static_cast<const LinearBooleanProblem&>(from_msg);
1643 ::google::protobuf::Arena* arena = _this->GetArena();
1644 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.sat.LinearBooleanProblem)
1645 ABSL_DCHECK_NE(&from, _this);
1646 ::uint32_t cached_has_bits = 0;
1647 (void) cached_has_bits;
1648
1649 _this->_internal_mutable_constraints()->MergeFrom(
1650 from._internal_constraints());
1651 _this->_internal_mutable_var_names()->MergeFrom(from._internal_var_names());
1652 cached_has_bits = from._impl_._has_bits_[0];
1653 if ((cached_has_bits & 0x0000001fu) != 0) {
1654 if ((cached_has_bits & 0x00000001u) != 0) {
1655 _this->_internal_set_name(from._internal_name());
1656 }
1657 if ((cached_has_bits & 0x00000002u) != 0) {
1658 ABSL_DCHECK(from._impl_.objective_ != nullptr);
1659 if (_this->_impl_.objective_ == nullptr) {
1660 _this->_impl_.objective_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.objective_);
1661 } else {
1662 _this->_impl_.objective_->MergeFrom(*from._impl_.objective_);
1663 }
1664 }
1665 if ((cached_has_bits & 0x00000004u) != 0) {
1666 ABSL_DCHECK(from._impl_.assignment_ != nullptr);
1667 if (_this->_impl_.assignment_ == nullptr) {
1668 _this->_impl_.assignment_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.assignment_);
1669 } else {
1670 _this->_impl_.assignment_->MergeFrom(*from._impl_.assignment_);
1671 }
1672 }
1673 if ((cached_has_bits & 0x00000008u) != 0) {
1674 _this->_impl_.num_variables_ = from._impl_.num_variables_;
1675 }
1676 if ((cached_has_bits & 0x00000010u) != 0) {
1677 _this->_impl_.original_num_variables_ = from._impl_.original_num_variables_;
1678 }
1679 }
1680 _this->_impl_._has_bits_[0] |= cached_has_bits;
1681 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
1682}
1683
1685// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.sat.LinearBooleanProblem)
1686 if (&from == this) return;
1687 Clear();
1689}
1690
1691
1692void LinearBooleanProblem::InternalSwap(LinearBooleanProblem* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1693 using ::std::swap;
1694 auto* arena = GetArena();
1695 ABSL_DCHECK_EQ(arena, other->GetArena());
1696 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1697 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1698 _impl_.constraints_.InternalSwap(&other->_impl_.constraints_);
1699 _impl_.var_names_.InternalSwap(&other->_impl_.var_names_);
1700 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
1701 ::google::protobuf::internal::memswap<
1702 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.original_num_variables_)
1703 + sizeof(LinearBooleanProblem::_impl_.original_num_variables_)
1704 - PROTOBUF_FIELD_OFFSET(LinearBooleanProblem, _impl_.objective_)>(
1705 reinterpret_cast<char*>(&_impl_.objective_),
1706 reinterpret_cast<char*>(&other->_impl_.objective_));
1707}
1708
1709::google::protobuf::Metadata LinearBooleanProblem::GetMetadata() const {
1710 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1711}
1712// @@protoc_insertion_point(namespace_scope)
1713} // namespace sat
1714} // namespace operations_research
1715namespace google {
1716namespace protobuf {
1717} // namespace protobuf
1718} // namespace google
1719// @@protoc_insertion_point(global_scope)
1720PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
1721 _static_init2_ [[maybe_unused]] =
1723 ::std::false_type{});
1724#include "google/protobuf/port_undef.inc"
static constexprconst ::_pb::EnumDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE file_level_enum_descriptors_ortools_2fsat_2fboolean_5fproblem_2eproto
::absl::once_flag descriptor_table_ortools_2fsat_2fboolean_5fproblem_2eproto_once
const ::uint32_t TableStruct_ortools_2fsat_2fboolean_5fproblem_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold)
PROTOBUF_CONSTINITconst ::_pbi::DescriptorTable descriptor_table_ortools_2fsat_2fboolean_5fproblem_2eproto
static constexprconst ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE file_level_service_descriptors_ortools_2fsat_2fboolean_5fproblem_2eproto
static PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::std::false_type _static_init2_
@protoc_insertion_point(global_scope)
static const ::_pb::Message *PROTOBUF_NONNULL const file_default_instances[]
decltype(::std::declval< LinearBooleanConstraint >()._impl_._has_bits_) HasBits
decltype(::std::declval< LinearObjective >()._impl_._has_bits_) HasBits
friend class ::google::protobuf::MessageLite
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
::google::protobuf::Metadata GetMetadata() const
void MergeFrom(const BooleanAssignment &from)
void CopyFrom(const BooleanAssignment &from)
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
friend void swap(LinearBooleanConstraint &a, LinearBooleanConstraint &b)
::google::protobuf::Metadata GetMetadata() const
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
void CopyFrom(const LinearBooleanConstraint &from)
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
void MergeFrom(const LinearBooleanConstraint &from)
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
void CopyFrom(const LinearBooleanProblem &from)
void MergeFrom(const LinearBooleanProblem &from)
::google::protobuf::Metadata GetMetadata() const
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
friend void swap(LinearBooleanProblem &a, LinearBooleanProblem &b)
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
void MergeFrom(const LinearObjective &from)
::google::protobuf::Metadata GetMetadata() const
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
void CopyFrom(const LinearObjective &from)
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull BooleanAssignment_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BooleanAssignmentDefaultTypeInternal _BooleanAssignment_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LinearBooleanProblemDefaultTypeInternal _LinearBooleanProblem_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull LinearObjective_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull LinearBooleanProblem_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull LinearBooleanConstraint_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LinearBooleanConstraintDefaultTypeInternal _LinearBooleanConstraint_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LinearObjectiveDefaultTypeInternal _LinearObjective_default_instance_
In SWIG mode, we don't want anything besides these top-level includes.
static constexpr ::_pbi::MigrationSchema *PROTOBUF_NULLABLE schemas