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"
22#include "google/protobuf/port_def.inc"
23PROTOBUF_PRAGMA_INIT_SEG
26namespace _fl = ::google::protobuf::internal::field_layout;
30inline constexpr LinearObjective::Impl_::Impl_(
31 ::_pbi::ConstantInitialized) noexcept
40#if defined(PROTOBUF_CUSTOM_VTABLE)
43 : ::google::protobuf::Message(),
45 _impl_(::_pbi::ConstantInitialized()) {
55PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
58inline constexpr LinearBooleanConstraint::Impl_::Impl_(
59 ::_pbi::ConstantInitialized) noexcept
64 &::google::protobuf::internal::fixed_address_empty_string,
65 ::_pbi::ConstantInitialized()),
66 lower_bound_{::int64_t{0}},
67 upper_bound_{::int64_t{0}} {}
71#if defined(PROTOBUF_CUSTOM_VTABLE)
74 : ::google::protobuf::Message(),
76 _impl_(::_pbi::ConstantInitialized()) {
86PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
89inline constexpr BooleanAssignment::Impl_::Impl_(
90 ::_pbi::ConstantInitialized) noexcept
96#if defined(PROTOBUF_CUSTOM_VTABLE)
99 : ::google::protobuf::Message(),
101 _impl_(::_pbi::ConstantInitialized()) {
111PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
114inline constexpr LinearBooleanProblem::Impl_::Impl_(
115 ::_pbi::ConstantInitialized) noexcept
120 &::google::protobuf::internal::fixed_address_empty_string,
121 ::_pbi::ConstantInitialized()),
123 assignment_{
nullptr},
125 original_num_variables_{0} {}
129#if defined(PROTOBUF_CUSTOM_VTABLE)
132 : ::google::protobuf::Message(),
134 _impl_(::_pbi::ConstantInitialized()) {
144PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
148static constexpr const ::_pb::EnumDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
150static constexpr const ::_pb::ServiceDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
203static const ::_pbi::MigrationSchema
218 "\n!ortools/sat/boolean_problem.proto\022\027ope"
219 "rations_research.sat\"{\n\027LinearBooleanCon"
220 "straint\022\020\n\010literals\030\001 \003(\005\022\024\n\014coefficient"
221 "s\030\002 \003(\003\022\023\n\013lower_bound\030\003 \001(\003\022\023\n\013upper_bo"
222 "und\030\004 \001(\003\022\016\n\004name\030\005 \001(\t:\000\"g\n\017LinearObjec"
223 "tive\022\020\n\010literals\030\001 \003(\005\022\024\n\014coefficients\030\002"
224 " \003(\003\022\021\n\006offset\030\003 \001(\001:\0010\022\031\n\016scaling_facto"
225 "r\030\004 \001(\001:\0011\"%\n\021BooleanAssignment\022\020\n\010liter"
226 "als\030\001 \003(\005\"\264\002\n\024LinearBooleanProblem\022\016\n\004na"
227 "me\030\001 \001(\t:\000\022\025\n\rnum_variables\030\003 \001(\005\022E\n\013con"
228 "straints\030\004 \003(\01320.operations_research.sat"
229 ".LinearBooleanConstraint\022;\n\tobjective\030\005 "
230 "\001(\0132(.operations_research.sat.LinearObje"
231 "ctive\022\021\n\tvar_names\030\006 \003(\t\022>\n\nassignment\030\007"
232 " \001(\0132*.operations_research.sat.BooleanAs"
233 "signment\022\036\n\026original_num_variables\030\010 \001(\005"
234 "B/\n\026com.google.ortools.satP\001\252\002\022Google.Or"
242 descriptor_table_protodef_ortools_2fsat_2fboolean_5fproblem_2eproto,
243 "ortools/sat/boolean_problem.proto",
261 decltype(::std::declval<LinearBooleanConstraint>()._impl_._has_bits_);
267#if defined(PROTOBUF_CUSTOM_VTABLE)
270 : ::google::protobuf::Message(arena) {
275PROTOBUF_NDEBUG_INLINE LinearBooleanConstraint::Impl_::Impl_(
276 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
277 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const Impl_& from,
278 [[maybe_unused]] const ::operations_research::sat::LinearBooleanConstraint& from_msg)
279 : _has_bits_{from._has_bits_},
281 literals_{visibility, arena, from.literals_},
282 coefficients_{visibility, arena, from.coefficients_},
283 name_(arena, from.name_) {}
286 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
288#if defined(PROTOBUF_CUSTOM_VTABLE)
291 : ::google::protobuf::Message(arena) {
295 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
296 from._internal_metadata_);
297 new (&
_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
298 ::memcpy(
reinterpret_cast<char*
>(&
_impl_) +
299 offsetof(Impl_, lower_bound_),
300 reinterpret_cast<const char*
>(&from._impl_) +
301 offsetof(Impl_, lower_bound_),
302 offsetof(Impl_, upper_bound_) -
303 offsetof(Impl_, lower_bound_) +
304 sizeof(Impl_::upper_bound_));
308PROTOBUF_NDEBUG_INLINE LinearBooleanConstraint::Impl_::Impl_(
309 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
310 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
312 literals_{visibility, arena},
313 coefficients_{visibility, arena},
316inline void LinearBooleanConstraint::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
317 new (&
_impl_) Impl_(internal_visibility(), arena);
318 ::memset(
reinterpret_cast<char*
>(&
_impl_) +
319 offsetof(Impl_, lower_bound_),
321 offsetof(Impl_, upper_bound_) -
322 offsetof(Impl_, lower_bound_) +
323 sizeof(Impl_::upper_bound_));
329inline void LinearBooleanConstraint::SharedDtor(
MessageLite& self) {
331 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
332 this_.CheckHasBitConsistency();
334 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
335 ABSL_DCHECK(this_.GetArena() ==
nullptr);
336 this_.
_impl_.name_.Destroy();
340inline void* PROTOBUF_NONNULL LinearBooleanConstraint::PlacementNew_(
341 const void* PROTOBUF_NONNULL,
void* PROTOBUF_NONNULL mem,
342 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
345constexpr auto LinearBooleanConstraint::InternalNewImpl_() {
346 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
349 InternalGetArenaOffset(
350 ::google::protobuf::Message::internal_visibility()),
353 InternalGetArenaOffset(
354 ::google::protobuf::Message::internal_visibility()),
356 if (arena_bits.has_value()) {
357 return ::google::protobuf::internal::MessageCreator::CopyInit(
358 sizeof(LinearBooleanConstraint), alignof(LinearBooleanConstraint), *arena_bits);
360 return ::google::protobuf::internal::MessageCreator(&LinearBooleanConstraint::PlacementNew_,
361 sizeof(LinearBooleanConstraint),
362 alignof(LinearBooleanConstraint));
366 return ::google::protobuf::internal::ClassDataFull{
367 ::google::protobuf::internal::ClassData{
372 &LinearBooleanConstraint::MergeImpl,
373 ::google::protobuf::Message::GetNewImpl<LinearBooleanConstraint>(),
374#if defined(PROTOBUF_CUSTOM_VTABLE)
375 &LinearBooleanConstraint::SharedDtor,
382 &LinearBooleanConstraint::kDescriptorMethods,
388PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
392PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
393LinearBooleanConstraint::GetClassData()
const {
398PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
399const ::_pbi::TcParseTable<3, 5, 0, 0, 2>
400LinearBooleanConstraint::_table_ = {
405 offsetof(
decltype(_table_), field_lookup_table),
407 offsetof(
decltype(_table_), field_entries),
410 offsetof(
decltype(_table_), field_names),
413 ::_pbi::TcParser::GenericFallback,
414 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
415 ::_pbi::TcParser::GetTable<::operations_research::sat::LinearBooleanConstraint>(),
418 {::_pbi::TcParser::MiniParse, {}},
420 {::_pbi::TcParser::FastV32R1,
424 {::_pbi::TcParser::FastV64R1,
436 {::_pbi::TcParser::FastBS1,
439 {::_pbi::TcParser::MiniParse, {}},
440 {::_pbi::TcParser::MiniParse, {}},
461 ::google::protobuf::internal::TSanWrite(&
_impl_);
462 ::uint32_t cached_has_bits = 0;
464 (void) cached_has_bits;
466 cached_has_bits =
_impl_._has_bits_[0];
467 if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
468 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
471 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
472 _impl_.coefficients_.Clear();
474 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
475 _impl_.name_.ClearNonDefaultToEmpty();
478 if (BatchCheckHasBit(cached_has_bits, 0x00000018U)) {
479 ::memset(&
_impl_.lower_bound_, 0,
static_cast<::
size_t>(
480 reinterpret_cast<char*
>(&
_impl_.upper_bound_) -
481 reinterpret_cast<char*
>(&
_impl_.lower_bound_)) +
sizeof(
_impl_.upper_bound_));
483 _impl_._has_bits_.Clear();
484 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
487#if defined(PROTOBUF_CUSTOM_VTABLE)
489 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
490 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
494 ::uint8_t* PROTOBUF_NONNULL target,
495 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream)
const {
498 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
499 this_.CheckHasBitConsistency();
502 ::uint32_t cached_has_bits = 0;
503 (void)cached_has_bits;
505 cached_has_bits = this_.
_impl_._has_bits_[0];
507 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
508 for (
int i = 0, n = this_._internal_literals_size();
i < n; ++
i) {
509 target = stream->EnsureSpace(target);
510 target = ::_pbi::WireFormatLite::WriteInt32ToArray(
511 1, this_._internal_literals().Get(
i), target);
516 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
517 for (
int i = 0, n = this_._internal_coefficients_size();
i < n; ++
i) {
518 target = stream->EnsureSpace(target);
519 target = ::_pbi::WireFormatLite::WriteInt64ToArray(
520 2, this_._internal_coefficients().Get(
i), target);
525 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
527 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>(
528 stream, this_._internal_lower_bound(), target);
532 if (CheckHasBit(cached_has_bits, 0x00000010U)) {
534 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<4>(
535 stream, this_._internal_upper_bound(), target);
539 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
540 const ::std::string& _s = this_._internal_name();
541 target = stream->WriteStringMaybeAliased(5, _s, target);
544 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
546 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
547 this_._internal_metadata_.
unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
553#if defined(PROTOBUF_CUSTOM_VTABLE)
561 ::size_t total_size = 0;
563 ::uint32_t cached_has_bits = 0;
565 (void)cached_has_bits;
567 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
568 cached_has_bits = this_.
_impl_._has_bits_[0];
569 if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
571 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
572 ::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
573 this_._internal_literals());
574 ::size_t tag_size = ::size_t{1} *
575 ::_pbi::FromIntSize(this_._internal_literals_size());
576 total_size += tag_size + data_size;
579 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
580 ::size_t data_size = ::_pbi::WireFormatLite::Int64Size(
581 this_._internal_coefficients());
582 ::size_t tag_size = ::size_t{1} *
583 ::_pbi::FromIntSize(this_._internal_coefficients_size());
584 total_size += tag_size + data_size;
587 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
588 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
589 this_._internal_name());
592 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
593 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
594 this_._internal_lower_bound());
597 if (CheckHasBit(cached_has_bits, 0x00000010U)) {
598 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
599 this_._internal_upper_bound());
602 return this_.MaybeComputeUnknownFieldsSize(total_size,
603 &this_.
_impl_._cached_size_);
606void LinearBooleanConstraint::MergeImpl(::google::protobuf::MessageLite& to_msg,
607 const ::google::protobuf::MessageLite& from_msg) {
611 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
612 from.CheckHasBitConsistency();
615 ABSL_DCHECK_NE(&from, _this);
616 ::uint32_t cached_has_bits = 0;
617 (void)cached_has_bits;
619 cached_has_bits = from._impl_._has_bits_[0];
620 if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
621 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
622 _this->_internal_mutable_literals()->MergeFrom(from._internal_literals());
624 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
625 _this->_internal_mutable_coefficients()->MergeFrom(from._internal_coefficients());
627 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
628 _this->_internal_set_name(from._internal_name());
630 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
631 _this->_impl_.lower_bound_ = from._impl_.lower_bound_;
633 if (CheckHasBit(cached_has_bits, 0x00000010U)) {
634 _this->_impl_.upper_bound_ = from._impl_.upper_bound_;
637 _this->_impl_._has_bits_[0] |= cached_has_bits;
638 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
639 from._internal_metadata_);
644 if (&from ==
this)
return;
652 auto* arena = GetArena();
653 ABSL_DCHECK_EQ(arena, other->GetArena());
654 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
655 swap(
_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
656 _impl_.literals_.InternalSwap(&other->_impl_.literals_);
657 _impl_.coefficients_.InternalSwap(&other->_impl_.coefficients_);
658 ::_pbi::ArenaStringPtr::InternalSwap(&
_impl_.name_, &other->_impl_.name_, arena);
659 ::google::protobuf::internal::memswap<
663 reinterpret_cast<char*
>(&
_impl_.lower_bound_),
664 reinterpret_cast<char*
>(&other->_impl_.lower_bound_));
668 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
675 decltype(::std::declval<LinearObjective>()._impl_._has_bits_);
681#if defined(PROTOBUF_CUSTOM_VTABLE)
684 : ::google::protobuf::Message(arena) {
689PROTOBUF_NDEBUG_INLINE LinearObjective::Impl_::Impl_(
690 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
691 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const Impl_& from,
692 [[maybe_unused]] const ::operations_research::sat::LinearObjective& from_msg)
693 : _has_bits_{from._has_bits_},
695 literals_{visibility, arena, from.literals_},
696 coefficients_{visibility, arena, from.coefficients_} {}
699 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
701#if defined(PROTOBUF_CUSTOM_VTABLE)
704 : ::google::protobuf::Message(arena) {
708 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
709 from._internal_metadata_);
710 new (&
_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
711 ::memcpy(
reinterpret_cast<char*
>(&
_impl_) +
712 offsetof(Impl_, offset_),
713 reinterpret_cast<const char*
>(&from._impl_) +
714 offsetof(Impl_, offset_),
715 offsetof(Impl_, scaling_factor_) -
716 offsetof(Impl_, offset_) +
717 sizeof(Impl_::scaling_factor_));
721PROTOBUF_NDEBUG_INLINE LinearObjective::Impl_::Impl_(
722 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
723 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
725 literals_{visibility, arena},
726 coefficients_{visibility, arena},
727 scaling_factor_{1} {}
729inline void LinearObjective::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
730 new (&
_impl_) Impl_(internal_visibility(), arena);
737inline void LinearObjective::SharedDtor(
MessageLite& self) {
739 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
740 this_.CheckHasBitConsistency();
742 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
743 ABSL_DCHECK(this_.GetArena() ==
nullptr);
747inline void* PROTOBUF_NONNULL LinearObjective::PlacementNew_(
748 const void* PROTOBUF_NONNULL,
void* PROTOBUF_NONNULL mem,
749 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
752constexpr auto LinearObjective::InternalNewImpl_() {
753 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
756 InternalGetArenaOffset(
757 ::google::protobuf::Message::internal_visibility()),
760 InternalGetArenaOffset(
761 ::google::protobuf::Message::internal_visibility()),
763 if (arena_bits.has_value()) {
764 return ::google::protobuf::internal::MessageCreator::CopyInit(
765 sizeof(LinearObjective), alignof(LinearObjective), *arena_bits);
767 return ::google::protobuf::internal::MessageCreator(&LinearObjective::PlacementNew_,
768 sizeof(LinearObjective),
769 alignof(LinearObjective));
773 return ::google::protobuf::internal::ClassDataFull{
774 ::google::protobuf::internal::ClassData{
779 &LinearObjective::MergeImpl,
780 ::google::protobuf::Message::GetNewImpl<LinearObjective>(),
781#if defined(PROTOBUF_CUSTOM_VTABLE)
782 &LinearObjective::SharedDtor,
789 &LinearObjective::kDescriptorMethods,
795PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
799PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
800LinearObjective::GetClassData()
const {
805PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
806const ::_pbi::TcParseTable<2, 4, 0, 0, 2>
807LinearObjective::_table_ = {
812 offsetof(
decltype(_table_), field_lookup_table),
814 offsetof(
decltype(_table_), field_entries),
817 offsetof(
decltype(_table_), field_names),
820 ::_pbi::TcParser::GenericFallback,
821 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
822 ::_pbi::TcParser::GetTable<::operations_research::sat::LinearObjective>(),
826 {::_pbi::TcParser::FastF64S1,
830 {::_pbi::TcParser::FastV32R1,
834 {::_pbi::TcParser::FastV64R1,
838 {::_pbi::TcParser::FastF64S1,
859 ::google::protobuf::internal::TSanWrite(&
_impl_);
860 ::uint32_t cached_has_bits = 0;
862 (void) cached_has_bits;
864 cached_has_bits =
_impl_._has_bits_[0];
865 if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
866 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
869 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
870 _impl_.coefficients_.Clear();
873 if (BatchCheckHasBit(cached_has_bits, 0x0000000cU)) {
875 _impl_.scaling_factor_ = 1;
877 _impl_._has_bits_.Clear();
878 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
881#if defined(PROTOBUF_CUSTOM_VTABLE)
883 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
884 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
888 ::uint8_t* PROTOBUF_NONNULL target,
889 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream)
const {
892 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
893 this_.CheckHasBitConsistency();
896 ::uint32_t cached_has_bits = 0;
897 (void)cached_has_bits;
899 cached_has_bits = this_.
_impl_._has_bits_[0];
901 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
902 for (
int i = 0, n = this_._internal_literals_size();
i < n; ++
i) {
903 target = stream->EnsureSpace(target);
904 target = ::_pbi::WireFormatLite::WriteInt32ToArray(
905 1, this_._internal_literals().Get(
i), target);
910 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
911 for (
int i = 0, n = this_._internal_coefficients_size();
i < n; ++
i) {
912 target = stream->EnsureSpace(target);
913 target = ::_pbi::WireFormatLite::WriteInt64ToArray(
914 2, this_._internal_coefficients().Get(
i), target);
919 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
920 target = stream->EnsureSpace(target);
921 target = ::_pbi::WireFormatLite::WriteDoubleToArray(
922 3, this_._internal_offset(), target);
926 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
927 target = stream->EnsureSpace(target);
928 target = ::_pbi::WireFormatLite::WriteDoubleToArray(
929 4, this_._internal_scaling_factor(), target);
932 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
934 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
935 this_._internal_metadata_.
unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
941#if defined(PROTOBUF_CUSTOM_VTABLE)
949 ::size_t total_size = 0;
951 ::uint32_t cached_has_bits = 0;
953 (void)cached_has_bits;
955 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
956 cached_has_bits = this_.
_impl_._has_bits_[0];
957 total_size += ::absl::popcount(0x0000000cU & cached_has_bits) * 9;
958 if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
960 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
961 ::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
962 this_._internal_literals());
963 ::size_t tag_size = ::size_t{1} *
964 ::_pbi::FromIntSize(this_._internal_literals_size());
965 total_size += tag_size + data_size;
968 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
969 ::size_t data_size = ::_pbi::WireFormatLite::Int64Size(
970 this_._internal_coefficients());
971 ::size_t tag_size = ::size_t{1} *
972 ::_pbi::FromIntSize(this_._internal_coefficients_size());
973 total_size += tag_size + data_size;
976 return this_.MaybeComputeUnknownFieldsSize(total_size,
977 &this_.
_impl_._cached_size_);
980void LinearObjective::MergeImpl(::google::protobuf::MessageLite& to_msg,
981 const ::google::protobuf::MessageLite& from_msg) {
985 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
986 from.CheckHasBitConsistency();
989 ABSL_DCHECK_NE(&from, _this);
990 ::uint32_t cached_has_bits = 0;
991 (void)cached_has_bits;
993 cached_has_bits = from._impl_._has_bits_[0];
994 if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
995 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
996 _this->_internal_mutable_literals()->MergeFrom(from._internal_literals());
998 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
999 _this->_internal_mutable_coefficients()->MergeFrom(from._internal_coefficients());
1001 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
1002 _this->_impl_.offset_ = from._impl_.offset_;
1004 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
1005 _this->_impl_.scaling_factor_ = from._impl_.scaling_factor_;
1008 _this->_impl_._has_bits_[0] |= cached_has_bits;
1009 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1010 from._internal_metadata_);
1015 if (&from ==
this)
return;
1021void LinearObjective::InternalSwap(
LinearObjective* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1023 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1024 swap(
_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1025 _impl_.literals_.InternalSwap(&other->_impl_.literals_);
1026 _impl_.coefficients_.InternalSwap(&other->_impl_.coefficients_);
1027 ::google::protobuf::internal::memswap<
1031 reinterpret_cast<char*
>(&
_impl_.offset_),
1032 reinterpret_cast<char*
>(&other->_impl_.offset_));
1036 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1043 decltype(::std::declval<BooleanAssignment>()._impl_._has_bits_);
1049#if defined(PROTOBUF_CUSTOM_VTABLE)
1052 : ::google::protobuf::Message(arena) {
1057PROTOBUF_NDEBUG_INLINE BooleanAssignment::Impl_::Impl_(
1058 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
1059 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const Impl_& from,
1060 [[maybe_unused]] const ::operations_research::sat::BooleanAssignment& from_msg)
1061 : _has_bits_{from._has_bits_},
1063 literals_{visibility, arena, from.literals_} {}
1066 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
1068#if defined(PROTOBUF_CUSTOM_VTABLE)
1071 : ::google::protobuf::Message(arena) {
1075 _internal_metadata_.
MergeFrom<::google::protobuf::UnknownFieldSet>(
1076 from._internal_metadata_);
1077 new (&
_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
1081PROTOBUF_NDEBUG_INLINE BooleanAssignment::Impl_::Impl_(
1082 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
1083 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
1085 literals_{visibility, arena} {}
1087inline void BooleanAssignment::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
1088 new (&
_impl_) Impl_(internal_visibility(), arena);
1094inline void BooleanAssignment::SharedDtor(
MessageLite& self) {
1096 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
1097 this_.CheckHasBitConsistency();
1099 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
1100 ABSL_DCHECK(this_.GetArena() ==
nullptr);
1104inline void* PROTOBUF_NONNULL BooleanAssignment::PlacementNew_(
1105 const void* PROTOBUF_NONNULL,
void* PROTOBUF_NONNULL mem,
1106 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
1107 return ::new (mem) BooleanAssignment(arena);
1109constexpr auto BooleanAssignment::InternalNewImpl_() {
1110 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
1111 PROTOBUF_FIELD_OFFSET(BooleanAssignment,
_impl_.literals_) +
1113 InternalGetArenaOffset(
1114 ::google::protobuf::Message::internal_visibility()),
1116 if (arena_bits.has_value()) {
1117 return ::google::protobuf::internal::MessageCreator::ZeroInit(
1118 sizeof(BooleanAssignment), alignof(BooleanAssignment), *arena_bits);
1120 return ::google::protobuf::internal::MessageCreator(&BooleanAssignment::PlacementNew_,
1121 sizeof(BooleanAssignment),
1122 alignof(BooleanAssignment));
1126 return ::google::protobuf::internal::ClassDataFull{
1127 ::google::protobuf::internal::ClassData{
1132 &BooleanAssignment::MergeImpl,
1133 ::google::protobuf::Message::GetNewImpl<BooleanAssignment>(),
1134#if defined(PROTOBUF_CUSTOM_VTABLE)
1135 &BooleanAssignment::SharedDtor,
1142 &BooleanAssignment::kDescriptorMethods,
1148PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
1152PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
1153BooleanAssignment::GetClassData()
const {
1158PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1159const ::_pbi::TcParseTable<0, 1, 0, 0, 2>
1160BooleanAssignment::_table_ = {
1162 PROTOBUF_FIELD_OFFSET(BooleanAssignment,
_impl_._has_bits_),
1165 offsetof(
decltype(_table_), field_lookup_table),
1167 offsetof(
decltype(_table_), field_entries),
1170 offsetof(
decltype(_table_), field_names),
1173 ::_pbi::TcParser::GenericFallback,
1174 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
1175 ::_pbi::TcParser::GetTable<::operations_research::sat::BooleanAssignment>(),
1179 {::_pbi::TcParser::FastV32R1,
1181 PROTOBUF_FIELD_OFFSET(BooleanAssignment,
_impl_.literals_)}},
1194 ::google::protobuf::internal::TSanWrite(&
_impl_);
1195 ::uint32_t cached_has_bits = 0;
1197 (void) cached_has_bits;
1199 cached_has_bits =
_impl_._has_bits_[0];
1200 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1201 _impl_.literals_.Clear();
1203 _impl_._has_bits_.Clear();
1204 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
1207#if defined(PROTOBUF_CUSTOM_VTABLE)
1209 const ::google::protobuf::MessageLite&
base, ::uint8_t* PROTOBUF_NONNULL target,
1210 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
1211 const BooleanAssignment& this_ =
static_cast<const BooleanAssignment&
>(
base);
1214 ::uint8_t* PROTOBUF_NONNULL target,
1215 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream)
const {
1218 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
1219 this_.CheckHasBitConsistency();
1222 ::uint32_t cached_has_bits = 0;
1223 (void)cached_has_bits;
1225 cached_has_bits = this_.
_impl_._has_bits_[0];
1227 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1228 for (
int i = 0, n = this_._internal_literals_size();
i < n; ++
i) {
1229 target = stream->EnsureSpace(target);
1230 target = ::_pbi::WireFormatLite::WriteInt32ToArray(
1231 1, this_._internal_literals().Get(
i), target);
1235 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1237 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1238 this_._internal_metadata_.
unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1244#if defined(PROTOBUF_CUSTOM_VTABLE)
1246 const BooleanAssignment& this_ =
static_cast<const BooleanAssignment&
>(base);
1249 const BooleanAssignment& this_ = *
this;
1252 ::size_t total_size = 0;
1254 ::uint32_t cached_has_bits = 0;
1256 (void)cached_has_bits;
1258 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1261 cached_has_bits = this_._impl_._has_bits_[0];
1262 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1263 ::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
1264 this_._internal_literals());
1265 ::size_t tag_size = ::size_t{1} *
1266 ::_pbi::FromIntSize(this_._internal_literals_size());
1267 total_size += tag_size + data_size;
1270 return this_.MaybeComputeUnknownFieldsSize(total_size,
1271 &this_._impl_._cached_size_);
1274void BooleanAssignment::MergeImpl(::google::protobuf::MessageLite& to_msg,
1275 const ::google::protobuf::MessageLite& from_msg) {
1277 static_cast<BooleanAssignment*
>(&to_msg);
1278 auto& from =
static_cast<const BooleanAssignment&
>(from_msg);
1279 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
1280 from.CheckHasBitConsistency();
1283 ABSL_DCHECK_NE(&from, _this);
1284 ::uint32_t cached_has_bits = 0;
1285 (void)cached_has_bits;
1287 cached_has_bits = from._impl_._has_bits_[0];
1288 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1289 _this->_internal_mutable_literals()->MergeFrom(from._internal_literals());
1291 _this->_impl_._has_bits_[0] |= cached_has_bits;
1292 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1293 from._internal_metadata_);
1298 if (&from ==
this)
return;
1304void BooleanAssignment::InternalSwap(
BooleanAssignment* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1306 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1307 swap(
_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1308 _impl_.literals_.InternalSwap(&other->_impl_.literals_);
1312 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1319 decltype(::std::declval<LinearBooleanProblem>()._impl_._has_bits_);
1325#if defined(PROTOBUF_CUSTOM_VTABLE)
1328 : ::google::protobuf::Message(arena) {
1333PROTOBUF_NDEBUG_INLINE LinearBooleanProblem::Impl_::Impl_(
1334 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
1335 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const Impl_& from,
1336 [[maybe_unused]] const ::operations_research::sat::LinearBooleanProblem& from_msg)
1337 : _has_bits_{from._has_bits_},
1339 constraints_{visibility, arena, from.constraints_},
1340 var_names_{visibility, arena, from.var_names_},
1341 name_(arena, from.name_) {}
1344 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
1346#if defined(PROTOBUF_CUSTOM_VTABLE)
1349 : ::google::protobuf::Message(arena) {
1353 _internal_metadata_.
MergeFrom<::google::protobuf::UnknownFieldSet>(
1354 from._internal_metadata_);
1355 new (&
_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
1356 ::uint32_t cached_has_bits =
_impl_._has_bits_[0];
1357 _impl_.objective_ = (CheckHasBit(cached_has_bits, 0x00000008U))
1358 ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.objective_)
1360 _impl_.assignment_ = (CheckHasBit(cached_has_bits, 0x00000010U))
1361 ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.assignment_)
1363 ::memcpy(
reinterpret_cast<char*
>(&
_impl_) +
1364 offsetof(Impl_, num_variables_),
1365 reinterpret_cast<const char*
>(&from._impl_) +
1366 offsetof(Impl_, num_variables_),
1367 offsetof(Impl_, original_num_variables_) -
1368 offsetof(Impl_, num_variables_) +
1369 sizeof(Impl_::original_num_variables_));
1373PROTOBUF_NDEBUG_INLINE LinearBooleanProblem::Impl_::Impl_(
1374 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
1375 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
1377 constraints_{visibility, arena},
1378 var_names_{visibility, arena},
1381inline void LinearBooleanProblem::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
1382 new (&
_impl_) Impl_(internal_visibility(), arena);
1383 ::memset(
reinterpret_cast<char*
>(&
_impl_) +
1384 offsetof(Impl_, objective_),
1386 offsetof(Impl_, original_num_variables_) -
1387 offsetof(Impl_, objective_) +
1388 sizeof(Impl_::original_num_variables_));
1396 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
1397 this_.CheckHasBitConsistency();
1399 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
1400 ABSL_DCHECK(this_.GetArena() ==
nullptr);
1401 this_.
_impl_.name_.Destroy();
1402 delete this_.
_impl_.objective_;
1403 delete this_.
_impl_.assignment_;
1407inline void* PROTOBUF_NONNULL LinearBooleanProblem::PlacementNew_(
1408 const void* PROTOBUF_NONNULL,
void* PROTOBUF_NONNULL mem,
1409 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
1412constexpr auto LinearBooleanProblem::InternalNewImpl_() {
1413 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
1414 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.constraints_) +
1416 InternalGetArenaOffset(
1418 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.var_names_) +
1419 decltype(LinearBooleanProblem::
_impl_.var_names_)::
1420 InternalGetArenaOffset(
1423 if (arena_bits.has_value()) {
1424 return ::google::protobuf::internal::MessageCreator::CopyInit(
1425 sizeof(LinearBooleanProblem), alignof(LinearBooleanProblem), *arena_bits);
1427 return ::google::protobuf::internal::MessageCreator(&LinearBooleanProblem::PlacementNew_,
1428 sizeof(LinearBooleanProblem),
1429 alignof(LinearBooleanProblem));
1433 return ::google::protobuf::internal::ClassDataFull{
1434 ::google::protobuf::internal::ClassData{
1439 &LinearBooleanProblem::MergeImpl,
1440 ::google::protobuf::Message::GetNewImpl<LinearBooleanProblem>(),
1441#if defined(PROTOBUF_CUSTOM_VTABLE)
1442 &LinearBooleanProblem::SharedDtor,
1449 &LinearBooleanProblem::kDescriptorMethods,
1455PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
1459PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
1460LinearBooleanProblem::GetClassData()
const {
1465PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1466const ::_pbi::TcParseTable<3, 7, 3, 0, 2>
1467LinearBooleanProblem::_table_ = {
1469 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_._has_bits_),
1472 offsetof(
decltype(_table_), field_lookup_table),
1474 offsetof(
decltype(_table_), field_entries),
1477 offsetof(
decltype(_table_), aux_entries),
1480 ::_pbi::TcParser::GenericFallback,
1481 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
1482 ::_pbi::TcParser::GetTable<::operations_research::sat::LinearBooleanProblem>(),
1486 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(LinearBooleanProblem,
_impl_.original_num_variables_), 6>(),
1488 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.original_num_variables_)}},
1490 {::_pbi::TcParser::FastBS1,
1492 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.name_)}},
1493 {::_pbi::TcParser::MiniParse, {}},
1495 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(LinearBooleanProblem,
_impl_.num_variables_), 5>(),
1497 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.num_variables_)}},
1499 {::_pbi::TcParser::FastMtR1,
1501 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.constraints_)}},
1503 {::_pbi::TcParser::FastMtS1,
1505 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.objective_)}},
1507 {::_pbi::TcParser::FastBR1,
1509 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.var_names_)}},
1511 {::_pbi::TcParser::FastMtS1,
1513 PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.assignment_)}},
1518 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.name_),
_Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
1522 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.constraints_),
_Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
1524 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.objective_),
_Internal::kHasBitsOffset + 3, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
1526 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.var_names_),
_Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)},
1528 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.assignment_),
_Internal::kHasBitsOffset + 4, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
1530 {PROTOBUF_FIELD_OFFSET(LinearBooleanProblem,
_impl_.original_num_variables_),
_Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
1533 {::_pbi::TcParser::GetTable<::operations_research::sat::LinearBooleanConstraint>()},
1534 {::_pbi::TcParser::GetTable<::operations_research::sat::LinearObjective>()},
1535 {::_pbi::TcParser::GetTable<::operations_research::sat::BooleanAssignment>()},
1542 ::google::protobuf::internal::TSanWrite(&
_impl_);
1543 ::uint32_t cached_has_bits = 0;
1545 (void) cached_has_bits;
1547 cached_has_bits =
_impl_._has_bits_[0];
1548 if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
1549 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1550 _impl_.constraints_.Clear();
1552 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
1553 _impl_.var_names_.Clear();
1555 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
1556 _impl_.name_.ClearNonDefaultToEmpty();
1558 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
1559 ABSL_DCHECK(
_impl_.objective_ !=
nullptr);
1560 _impl_.objective_->Clear();
1562 if (CheckHasBit(cached_has_bits, 0x00000010U)) {
1563 ABSL_DCHECK(
_impl_.assignment_ !=
nullptr);
1564 _impl_.assignment_->Clear();
1567 if (BatchCheckHasBit(cached_has_bits, 0x00000060U)) {
1568 ::memset(&
_impl_.num_variables_, 0,
static_cast<::
size_t>(
1569 reinterpret_cast<char*
>(&
_impl_.original_num_variables_) -
1570 reinterpret_cast<char*
>(&
_impl_.num_variables_)) +
sizeof(
_impl_.original_num_variables_));
1572 _impl_._has_bits_.Clear();
1573 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
1576#if defined(PROTOBUF_CUSTOM_VTABLE)
1578 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
1579 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
1580 const LinearBooleanProblem& this_ =
static_cast<const LinearBooleanProblem&
>(base);
1583 ::uint8_t* PROTOBUF_NONNULL target,
1584 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream)
const {
1585 const LinearBooleanProblem& this_ = *
this;
1587 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
1588 this_.CheckHasBitConsistency();
1591 ::uint32_t cached_has_bits = 0;
1592 (void)cached_has_bits;
1594 cached_has_bits = this_._impl_._has_bits_[0];
1596 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
1597 const ::std::string& _s = this_._internal_name();
1598 target = stream->WriteStringMaybeAliased(1, _s, target);
1602 if (CheckHasBit(cached_has_bits, 0x00000020U)) {
1604 ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<3>(
1605 stream, this_._internal_num_variables(), target);
1609 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1610 for (
unsigned i = 0, n =
static_cast<unsigned>(
1611 this_._internal_constraints_size());
1613 const auto& repfield = this_._internal_constraints().Get(
i);
1615 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1616 4, repfield, repfield.GetCachedSize(),
1622 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
1623 target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1624 5, *this_._impl_.objective_, this_._impl_.objective_->GetCachedSize(), target,
1629 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
1630 for (
int i = 0, n = this_._internal_var_names_size();
i < n; ++
i) {
1631 const auto& s = this_._internal_var_names().Get(
i);
1632 target = stream->WriteString(6, s, target);
1637 if (CheckHasBit(cached_has_bits, 0x00000010U)) {
1638 target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1639 7, *this_._impl_.assignment_, this_._impl_.assignment_->GetCachedSize(), target,
1644 if (CheckHasBit(cached_has_bits, 0x00000040U)) {
1646 ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<8>(
1647 stream, this_._internal_original_num_variables(), target);
1650 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1652 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1653 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1659#if defined(PROTOBUF_CUSTOM_VTABLE)
1661 const LinearBooleanProblem& this_ =
static_cast<const LinearBooleanProblem&
>(base);
1664 const LinearBooleanProblem& this_ = *
this;
1667 ::size_t total_size = 0;
1669 ::uint32_t cached_has_bits = 0;
1671 (void)cached_has_bits;
1673 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1674 cached_has_bits = this_._impl_._has_bits_[0];
1675 if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) {
1677 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1678 total_size += 1UL * this_._internal_constraints_size();
1679 for (
const auto& msg : this_._internal_constraints()) {
1680 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1684 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
1686 1 * ::google::protobuf::internal::FromIntSize(this_._internal_var_names().size());
1687 for (
int i = 0, n = this_._internal_var_names().size();
i < n; ++
i) {
1688 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
1689 this_._internal_var_names().Get(
i));
1693 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
1694 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1695 this_._internal_name());
1698 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
1700 ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.objective_);
1703 if (CheckHasBit(cached_has_bits, 0x00000010U)) {
1705 ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.assignment_);
1708 if (CheckHasBit(cached_has_bits, 0x00000020U)) {
1709 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
1710 this_._internal_num_variables());
1713 if (CheckHasBit(cached_has_bits, 0x00000040U)) {
1714 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
1715 this_._internal_original_num_variables());
1718 return this_.MaybeComputeUnknownFieldsSize(total_size,
1719 &this_._impl_._cached_size_);
1722void LinearBooleanProblem::MergeImpl(::google::protobuf::MessageLite& to_msg,
1723 const ::google::protobuf::MessageLite& from_msg) {
1725 static_cast<LinearBooleanProblem*
>(&to_msg);
1726 auto& from =
static_cast<const LinearBooleanProblem&
>(from_msg);
1727 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
1728 from.CheckHasBitConsistency();
1732 ABSL_DCHECK_NE(&from, _this);
1733 ::uint32_t cached_has_bits = 0;
1734 (void)cached_has_bits;
1736 cached_has_bits = from._impl_._has_bits_[0];
1737 if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) {
1738 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1739 _this->_internal_mutable_constraints()->InternalMergeFromWithArena(
1740 ::google::protobuf::MessageLite::internal_visibility(), arena,
1741 from._internal_constraints());
1743 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
1744 _this->_internal_mutable_var_names()->InternalMergeFromWithArena(
1745 ::google::protobuf::MessageLite::internal_visibility(), arena,
1746 from._internal_var_names());
1748 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
1749 _this->_internal_set_name(from._internal_name());
1751 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
1752 ABSL_DCHECK(from._impl_.objective_ !=
nullptr);
1753 if (_this->_impl_.objective_ ==
nullptr) {
1754 _this->_impl_.objective_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.objective_);
1756 _this->_impl_.objective_->MergeFrom(*from._impl_.objective_);
1759 if (CheckHasBit(cached_has_bits, 0x00000010U)) {
1760 ABSL_DCHECK(from._impl_.assignment_ !=
nullptr);
1761 if (_this->_impl_.assignment_ ==
nullptr) {
1762 _this->_impl_.assignment_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.assignment_);
1764 _this->_impl_.assignment_->MergeFrom(*from._impl_.assignment_);
1767 if (CheckHasBit(cached_has_bits, 0x00000020U)) {
1768 _this->_impl_.num_variables_ = from._impl_.num_variables_;
1770 if (CheckHasBit(cached_has_bits, 0x00000040U)) {
1771 _this->_impl_.original_num_variables_ = from._impl_.original_num_variables_;
1774 _this->_impl_._has_bits_[0] |= cached_has_bits;
1775 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1776 from._internal_metadata_);
1781 if (&from ==
this)
return;
1787void LinearBooleanProblem::InternalSwap(
LinearBooleanProblem* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1789 auto* arena = GetArena();
1790 ABSL_DCHECK_EQ(arena, other->GetArena());
1791 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1792 swap(
_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1793 _impl_.constraints_.InternalSwap(&other->_impl_.constraints_);
1794 _impl_.var_names_.InternalSwap(&other->_impl_.var_names_);
1795 ::_pbi::ArenaStringPtr::InternalSwap(&
_impl_.name_, &other->_impl_.name_, arena);
1796 ::google::protobuf::internal::memswap<
1800 reinterpret_cast<char*
>(&
_impl_.objective_),
1801 reinterpret_cast<char*
>(&other->_impl_.objective_));
1805 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1815PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
1818 ::std::false_type{});
1819#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_
static const ::_pb::Message *PROTOBUF_NONNULL const file_default_instances[]
decltype(::std::declval< LinearBooleanConstraint >()._impl_._has_bits_) HasBits
static constexpr ::int32_t kHasBitsOffset
decltype(::std::declval< LinearObjective >()._impl_._has_bits_) HasBits
static constexpr ::int32_t kHasBitsOffset
static constexpr auto InternalGenerateClassData_()
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
~BooleanAssignment() PROTOBUF_FINAL
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
::size_t ByteSizeLong() const final
static constexpr ::int32_t kHasBitsOffset
static constexpr auto InternalGenerateClassData_()
friend class ::google::protobuf::MessageLite
friend void swap(LinearBooleanConstraint &a, LinearBooleanConstraint &b)
::google::protobuf::Metadata GetMetadata() const
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
void CopyFrom(const LinearBooleanConstraint &from)
LinearBooleanConstraint()
::size_t ByteSizeLong() const final
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
void MergeFrom(const LinearBooleanConstraint &from)
~LinearBooleanConstraint() PROTOBUF_FINAL
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
friend class ::google::protobuf::MessageLite
static constexpr auto InternalGenerateClassData_()
void CopyFrom(const LinearBooleanProblem &from)
void MergeFrom(const LinearBooleanProblem &from)
::google::protobuf::Metadata GetMetadata() const
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
~LinearBooleanProblem() PROTOBUF_FINAL
::size_t ByteSizeLong() const final
static constexpr ::int32_t kHasBitsOffset
friend class ::google::protobuf::MessageLite
::size_t ByteSizeLong() const final
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
void MergeFrom(const LinearObjective &from)
static constexpr auto InternalGenerateClassData_()
::google::protobuf::Metadata GetMetadata() const
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
~LinearObjective() PROTOBUF_FINAL
friend void swap(LinearObjective &a, LinearObjective &b)
void CopyFrom(const LinearObjective &from)
friend class ::google::protobuf::Arena
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
static constexpr ::_pbi::MigrationSchema *PROTOBUF_NULLABLE schemas
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_
~BooleanAssignmentDefaultTypeInternal()
PROTOBUF_CONSTEXPR BooleanAssignmentDefaultTypeInternal()
BooleanAssignment _instance
~LinearBooleanConstraintDefaultTypeInternal()
PROTOBUF_CONSTEXPR LinearBooleanConstraintDefaultTypeInternal()
LinearBooleanConstraint _instance
PROTOBUF_CONSTEXPR LinearBooleanProblemDefaultTypeInternal()
~LinearBooleanProblemDefaultTypeInternal()
LinearBooleanProblem _instance
~LinearObjectiveDefaultTypeInternal()
LinearObjective _instance
PROTOBUF_CONSTEXPR LinearObjectiveDefaultTypeInternal()