Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
vector_bin_packing.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/packing/vector_bin_packing.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 packing {
29namespace vbp {
30
31inline constexpr VectorBinPackingOneBinInSolution::Impl_::Impl_(
32 ::_pbi::ConstantInitialized) noexcept
33 : item_indices_{},
34 _item_indices_cached_byte_size_{0},
35 item_copies_{},
36 _item_copies_cached_byte_size_{0},
37 _cached_size_{0} {}
38
39template <typename>
40PROTOBUF_CONSTEXPR VectorBinPackingOneBinInSolution::VectorBinPackingOneBinInSolution(::_pbi::ConstantInitialized)
41#if defined(PROTOBUF_CUSTOM_VTABLE)
42 : ::google::protobuf::Message(VectorBinPackingOneBinInSolution_class_data_.base()),
43#else // PROTOBUF_CUSTOM_VTABLE
44 : ::google::protobuf::Message(),
45#endif // PROTOBUF_CUSTOM_VTABLE
46 _impl_(::_pbi::ConstantInitialized()) {
47}
55
56PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
58
59inline constexpr Item::Impl_::Impl_(
60 ::_pbi::ConstantInitialized) noexcept
61 : _cached_size_{0},
62 resource_usage_{},
63 _resource_usage_cached_byte_size_{0},
64 name_(
65 &::google::protobuf::internal::fixed_address_empty_string,
66 ::_pbi::ConstantInitialized()),
67 num_copies_{0},
68 max_number_of_copies_per_bin_{0},
69 penalty_per_missing_copy_{0},
70 num_optional_copies_{0} {}
71
72template <typename>
73PROTOBUF_CONSTEXPR Item::Item(::_pbi::ConstantInitialized)
74#if defined(PROTOBUF_CUSTOM_VTABLE)
75 : ::google::protobuf::Message(Item_class_data_.base()),
76#else // PROTOBUF_CUSTOM_VTABLE
77 : ::google::protobuf::Message(),
78#endif // PROTOBUF_CUSTOM_VTABLE
79 _impl_(::_pbi::ConstantInitialized()) {
80}
82 PROTOBUF_CONSTEXPR ItemDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
84 union {
86 };
87};
88
89PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
90 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ItemDefaultTypeInternal _Item_default_instance_;
91
92inline constexpr VectorBinPackingSolution::Impl_::Impl_(
93 ::_pbi::ConstantInitialized) noexcept
94 : _cached_size_{0},
95 bins_{},
96 solver_info_(
97 &::google::protobuf::internal::fixed_address_empty_string,
98 ::_pbi::ConstantInitialized()),
99 objective_value_{0},
100 solve_time_in_seconds_{0},
101 arc_flow_time_in_seconds_{0},
103
104template <typename>
105PROTOBUF_CONSTEXPR VectorBinPackingSolution::VectorBinPackingSolution(::_pbi::ConstantInitialized)
106#if defined(PROTOBUF_CUSTOM_VTABLE)
107 : ::google::protobuf::Message(VectorBinPackingSolution_class_data_.base()),
108#else // PROTOBUF_CUSTOM_VTABLE
109 : ::google::protobuf::Message(),
110#endif // PROTOBUF_CUSTOM_VTABLE
111 _impl_(::_pbi::ConstantInitialized()) {
112}
120
121PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
123
124inline constexpr VectorBinPackingProblem::Impl_::Impl_(
125 ::_pbi::ConstantInitialized) noexcept
126 : _cached_size_{0},
127 resource_capacity_{},
128 _resource_capacity_cached_byte_size_{0},
129 resource_name_{},
130 item_{},
131 name_(
132 &::google::protobuf::internal::fixed_address_empty_string,
133 ::_pbi::ConstantInitialized()),
134 cost_per_bin_{0},
135 max_bins_{0} {}
136
137template <typename>
138PROTOBUF_CONSTEXPR VectorBinPackingProblem::VectorBinPackingProblem(::_pbi::ConstantInitialized)
139#if defined(PROTOBUF_CUSTOM_VTABLE)
140 : ::google::protobuf::Message(VectorBinPackingProblem_class_data_.base()),
141#else // PROTOBUF_CUSTOM_VTABLE
142 : ::google::protobuf::Message(),
143#endif // PROTOBUF_CUSTOM_VTABLE
144 _impl_(::_pbi::ConstantInitialized()) {
145}
153
154PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
156} // namespace vbp
157} // namespace packing
158} // namespace operations_research
159static const ::_pb::EnumDescriptor* PROTOBUF_NONNULL
161static constexpr const ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
163const ::uint32_t
165 protodesc_cold) = {
166 0x081, // bitmap
167 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::Item, _impl_._has_bits_),
168 9, // hasbit index offset
169 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::Item, _impl_.name_),
170 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::Item, _impl_.resource_usage_),
171 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::Item, _impl_.num_copies_),
172 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::Item, _impl_.num_optional_copies_),
173 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::Item, _impl_.max_number_of_copies_per_bin_),
174 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::Item, _impl_.penalty_per_missing_copy_),
175 0,
176 ~0u,
177 1,
178 4,
179 2,
180 3,
181 0x081, // bitmap
182 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingProblem, _impl_._has_bits_),
183 9, // hasbit index offset
184 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingProblem, _impl_.name_),
185 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingProblem, _impl_.resource_capacity_),
186 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingProblem, _impl_.resource_name_),
187 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingProblem, _impl_.item_),
188 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingProblem, _impl_.max_bins_),
189 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingProblem, _impl_.cost_per_bin_),
190 0,
191 ~0u,
192 ~0u,
193 ~0u,
194 2,
195 1,
196 0x000, // bitmap
197 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingOneBinInSolution, _impl_.item_indices_),
198 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingOneBinInSolution, _impl_.item_copies_),
199 0x081, // bitmap
200 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingSolution, _impl_._has_bits_),
201 9, // hasbit index offset
202 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingSolution, _impl_.solver_info_),
203 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingSolution, _impl_.bins_),
204 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingSolution, _impl_.status_),
205 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingSolution, _impl_.objective_value_),
206 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingSolution, _impl_.solve_time_in_seconds_),
207 PROTOBUF_FIELD_OFFSET(::operations_research::packing::vbp::VectorBinPackingSolution, _impl_.arc_flow_time_in_seconds_),
208 0,
209 ~0u,
210 4,
211 1,
212 2,
213 3,
214};
215
216static const ::_pbi::MigrationSchema
217 schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
222};
229const char descriptor_table_protodef_ortools_2fpacking_2fvector_5fbin_5fpacking_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
230 protodesc_cold) = {
231 "\n(ortools/packing/vector_bin_packing.pro"
232 "to\022\037operations_research.packing.vbp\"\245\001\n\004"
233 "Item\022\014\n\004name\030\001 \001(\t\022\026\n\016resource_usage\030\002 \003"
234 "(\003\022\022\n\nnum_copies\030\003 \001(\005\022\033\n\023num_optional_c"
235 "opies\030\005 \001(\005\022$\n\034max_number_of_copies_per_"
236 "bin\030\004 \001(\005\022 \n\030penalty_per_missing_copy\030\006 "
237 "\001(\001\"\314\001\n\027VectorBinPackingProblem\022\014\n\004name\030"
238 "\001 \001(\t\022\031\n\021resource_capacity\030\002 \003(\003\022\025\n\rreso"
239 "urce_name\030\003 \003(\t\0223\n\004item\030\004 \003(\0132%.operatio"
240 "ns_research.packing.vbp.Item\022\020\n\010max_bins"
241 "\030\005 \001(\005\022\031\n\014cost_per_bin\030\006 \001(\001H\000\210\001\001B\017\n\r_co"
242 "st_per_bin\"M\n VectorBinPackingOneBinInSo"
243 "lution\022\024\n\014item_indices\030\001 \003(\005\022\023\n\013item_cop"
244 "ies\030\002 \003(\005\"\250\002\n\030VectorBinPackingSolution\022\023"
245 "\n\013solver_info\030\001 \001(\t\022O\n\004bins\030\002 \003(\0132A.oper"
246 "ations_research.packing.vbp.VectorBinPac"
247 "kingOneBinInSolution\022L\n\006status\030\003 \001(\0162<.o"
248 "perations_research.packing.vbp.VectorBin"
249 "PackingSolveStatus\022\027\n\017objective_value\030\004 "
250 "\001(\001\022\035\n\025solve_time_in_seconds\030\005 \001(\001\022 \n\030ar"
251 "c_flow_time_in_seconds\030\006 \001(\001*y\n\033VectorBi"
252 "nPackingSolveStatus\022/\n+VECTOR_BIN_PACKIN"
253 "G_SOLVE_STATUS_UNSPECIFIED\020\000\022\013\n\007OPTIMAL\020"
254 "\001\022\014\n\010FEASIBLE\020\002\022\016\n\nINFEASIBLE\020\003B\?\n\036com.g"
255 "oogle.ortools.packing.vbpP\001\252\002\032Google.OrT"
256 "ools.Packing.Vbpb\006proto3"
257};
259PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ortools_2fpacking_2fvector_5fbin_5fpacking_2eproto = {
260 false,
261 false,
262 1024,
263 descriptor_table_protodef_ortools_2fpacking_2fvector_5fbin_5fpacking_2eproto,
264 "ortools/packing/vector_bin_packing.proto",
266 nullptr,
267 0,
268 4,
269 schemas,
274};
275namespace operations_research {
276namespace packing {
277namespace vbp {
278const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL VectorBinPackingSolveStatus_descriptor() {
279 ::google::protobuf::internal::AssignDescriptors(&descriptor_table_ortools_2fpacking_2fvector_5fbin_5fpacking_2eproto);
281}
282PROTOBUF_CONSTINIT const uint32_t VectorBinPackingSolveStatus_internal_data_[] = {
283 262144u, 0u, };
284// ===================================================================
285
286class Item::_Internal {
287 public:
288 using HasBits =
289 decltype(::std::declval<Item>()._impl_._has_bits_);
290 static constexpr ::int32_t kHasBitsOffset =
291 8 * PROTOBUF_FIELD_OFFSET(Item, _impl_._has_bits_);
292};
293
294Item::Item(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
295#if defined(PROTOBUF_CUSTOM_VTABLE)
296 : ::google::protobuf::Message(arena, Item_class_data_.base()) {
297#else // PROTOBUF_CUSTOM_VTABLE
298 : ::google::protobuf::Message(arena) {
299#endif // PROTOBUF_CUSTOM_VTABLE
300 SharedCtor(arena);
301 // @@protoc_insertion_point(arena_constructor:operations_research.packing.vbp.Item)
302}
303PROTOBUF_NDEBUG_INLINE Item::Impl_::Impl_(
304 ::google::protobuf::internal::InternalVisibility visibility,
305 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
306 const ::operations_research::packing::vbp::Item& from_msg)
307 : _has_bits_{from._has_bits_},
308 _cached_size_{0},
309 resource_usage_{visibility, arena, from.resource_usage_},
310 _resource_usage_cached_byte_size_{0},
311 name_(arena, from.name_) {}
312
314 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
315 const Item& from)
316#if defined(PROTOBUF_CUSTOM_VTABLE)
317 : ::google::protobuf::Message(arena, Item_class_data_.base()) {
318#else // PROTOBUF_CUSTOM_VTABLE
319 : ::google::protobuf::Message(arena) {
320#endif // PROTOBUF_CUSTOM_VTABLE
321 Item* const _this = this;
322 (void)_this;
323 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
324 from._internal_metadata_);
325 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
326 ::memcpy(reinterpret_cast<char *>(&_impl_) +
327 offsetof(Impl_, num_copies_),
328 reinterpret_cast<const char *>(&from._impl_) +
329 offsetof(Impl_, num_copies_),
330 offsetof(Impl_, num_optional_copies_) -
331 offsetof(Impl_, num_copies_) +
332 sizeof(Impl_::num_optional_copies_));
333
334 // @@protoc_insertion_point(copy_constructor:operations_research.packing.vbp.Item)
335}
336PROTOBUF_NDEBUG_INLINE Item::Impl_::Impl_(
337 ::google::protobuf::internal::InternalVisibility visibility,
338 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
339 : _cached_size_{0},
340 resource_usage_{visibility, arena},
341 _resource_usage_cached_byte_size_{0},
342 name_(arena) {}
343
344inline void Item::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
345 new (&_impl_) Impl_(internal_visibility(), arena);
346 ::memset(reinterpret_cast<char *>(&_impl_) +
347 offsetof(Impl_, num_copies_),
348 0,
349 offsetof(Impl_, num_optional_copies_) -
350 offsetof(Impl_, num_copies_) +
351 sizeof(Impl_::num_optional_copies_));
352}
353Item::~Item() {
354 // @@protoc_insertion_point(destructor:operations_research.packing.vbp.Item)
355 SharedDtor(*this);
356}
357inline void Item::SharedDtor(MessageLite& self) {
358 Item& this_ = static_cast<Item&>(self);
359 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
360 ABSL_DCHECK(this_.GetArena() == nullptr);
361 this_._impl_.name_.Destroy();
362 this_._impl_.~Impl_();
363}
364
365inline void* PROTOBUF_NONNULL Item::PlacementNew_(
366 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
367 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
368 return ::new (mem) Item(arena);
369}
370constexpr auto Item::InternalNewImpl_() {
371 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
372 PROTOBUF_FIELD_OFFSET(Item, _impl_.resource_usage_) +
373 decltype(Item::_impl_.resource_usage_)::
374 InternalGetArenaOffset(
375 ::google::protobuf::Message::internal_visibility()),
376 });
377 if (arena_bits.has_value()) {
378 return ::google::protobuf::internal::MessageCreator::CopyInit(
379 sizeof(Item), alignof(Item), *arena_bits);
380 } else {
381 return ::google::protobuf::internal::MessageCreator(&Item::PlacementNew_,
382 sizeof(Item),
383 alignof(Item));
384 }
385}
386constexpr auto Item::InternalGenerateClassData_() {
387 return ::google::protobuf::internal::ClassDataFull{
388 ::google::protobuf::internal::ClassData{
389 &_Item_default_instance_._instance,
390 &_table_.header,
391 nullptr, // OnDemandRegisterArenaDtor
392 nullptr, // IsInitialized
393 &Item::MergeImpl,
394 ::google::protobuf::Message::GetNewImpl<Item>(),
395#if defined(PROTOBUF_CUSTOM_VTABLE)
396 &Item::SharedDtor,
397 ::google::protobuf::Message::GetClearImpl<Item>(), &Item::ByteSizeLong,
399#endif // PROTOBUF_CUSTOM_VTABLE
400 PROTOBUF_FIELD_OFFSET(Item, _impl_._cached_size_),
401 false,
402 },
403 &Item::kDescriptorMethods,
405 nullptr, // tracker
406 };
407}
408
409PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
410 ::google::protobuf::internal::ClassDataFull Item_class_data_ =
412
413PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
414Item::GetClassData() const {
415 ::google::protobuf::internal::PrefetchToLocalCache(&Item_class_data_);
416 ::google::protobuf::internal::PrefetchToLocalCache(Item_class_data_.tc_table);
417 return Item_class_data_.base();
418}
419PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
420const ::_pbi::TcParseTable<3, 6, 0, 49, 2>
421Item::_table_ = {
422 {
423 PROTOBUF_FIELD_OFFSET(Item, _impl_._has_bits_),
424 0, // no _extensions_
425 6, 56, // max_field_number, fast_idx_mask
426 offsetof(decltype(_table_), field_lookup_table),
427 4294967232, // skipmap
428 offsetof(decltype(_table_), field_entries),
429 6, // num_field_entries
430 0, // num_aux_entries
431 offsetof(decltype(_table_), field_names), // no aux_entries
432 Item_class_data_.base(),
433 nullptr, // post_loop_handler
434 ::_pbi::TcParser::GenericFallback, // fallback
435 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
436 ::_pbi::TcParser::GetTable<::operations_research::packing::vbp::Item>(), // to_prefetch
437 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
438 }, {{
439 {::_pbi::TcParser::MiniParse, {}},
440 // string name = 1;
441 {::_pbi::TcParser::FastUS1,
442 {10, 0, 0, PROTOBUF_FIELD_OFFSET(Item, _impl_.name_)}},
443 // repeated int64 resource_usage = 2;
444 {::_pbi::TcParser::FastV64P1,
445 {18, 63, 0, PROTOBUF_FIELD_OFFSET(Item, _impl_.resource_usage_)}},
446 // int32 num_copies = 3;
447 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Item, _impl_.num_copies_), 1>(),
448 {24, 1, 0, PROTOBUF_FIELD_OFFSET(Item, _impl_.num_copies_)}},
449 // int32 max_number_of_copies_per_bin = 4;
450 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Item, _impl_.max_number_of_copies_per_bin_), 2>(),
451 {32, 2, 0, PROTOBUF_FIELD_OFFSET(Item, _impl_.max_number_of_copies_per_bin_)}},
452 // int32 num_optional_copies = 5;
453 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Item, _impl_.num_optional_copies_), 4>(),
454 {40, 4, 0, PROTOBUF_FIELD_OFFSET(Item, _impl_.num_optional_copies_)}},
455 // double penalty_per_missing_copy = 6;
456 {::_pbi::TcParser::FastF64S1,
457 {49, 3, 0, PROTOBUF_FIELD_OFFSET(Item, _impl_.penalty_per_missing_copy_)}},
458 {::_pbi::TcParser::MiniParse, {}},
459 }}, {{
460 65535, 65535
461 }}, {{
462 // string name = 1;
463 {PROTOBUF_FIELD_OFFSET(Item, _impl_.name_), _Internal::kHasBitsOffset + 0, 0,
464 (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
465 // repeated int64 resource_usage = 2;
466 {PROTOBUF_FIELD_OFFSET(Item, _impl_.resource_usage_), -1, 0,
467 (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)},
468 // int32 num_copies = 3;
469 {PROTOBUF_FIELD_OFFSET(Item, _impl_.num_copies_), _Internal::kHasBitsOffset + 1, 0,
470 (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
471 // int32 max_number_of_copies_per_bin = 4;
472 {PROTOBUF_FIELD_OFFSET(Item, _impl_.max_number_of_copies_per_bin_), _Internal::kHasBitsOffset + 2, 0,
473 (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
474 // int32 num_optional_copies = 5;
475 {PROTOBUF_FIELD_OFFSET(Item, _impl_.num_optional_copies_), _Internal::kHasBitsOffset + 4, 0,
476 (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
477 // double penalty_per_missing_copy = 6;
478 {PROTOBUF_FIELD_OFFSET(Item, _impl_.penalty_per_missing_copy_), _Internal::kHasBitsOffset + 3, 0,
479 (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
480 }},
481 // no aux_entries
482 {{
483 "\44\4\0\0\0\0\0\0"
484 "operations_research.packing.vbp.Item"
485 "name"
486 }},
487};
488PROTOBUF_NOINLINE void Item::Clear() {
489// @@protoc_insertion_point(message_clear_start:operations_research.packing.vbp.Item)
490 ::google::protobuf::internal::TSanWrite(&_impl_);
491 ::uint32_t cached_has_bits = 0;
492 // Prevent compiler warnings about cached_has_bits being unused
493 (void) cached_has_bits;
494
495 _impl_.resource_usage_.Clear();
496 cached_has_bits = _impl_._has_bits_[0];
497 if ((cached_has_bits & 0x00000001u) != 0) {
498 _impl_.name_.ClearNonDefaultToEmpty();
499 }
500 if ((cached_has_bits & 0x0000001eu) != 0) {
501 ::memset(&_impl_.num_copies_, 0, static_cast<::size_t>(
502 reinterpret_cast<char*>(&_impl_.num_optional_copies_) -
503 reinterpret_cast<char*>(&_impl_.num_copies_)) + sizeof(_impl_.num_optional_copies_));
504 }
505 _impl_._has_bits_.Clear();
506 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
507}
508
509#if defined(PROTOBUF_CUSTOM_VTABLE)
510::uint8_t* PROTOBUF_NONNULL Item::_InternalSerialize(
511 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
512 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
513 const Item& this_ = static_cast<const Item&>(base);
514#else // PROTOBUF_CUSTOM_VTABLE
515::uint8_t* PROTOBUF_NONNULL Item::_InternalSerialize(
516 ::uint8_t* PROTOBUF_NONNULL target,
517 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
518 const Item& this_ = *this;
519#endif // PROTOBUF_CUSTOM_VTABLE
520 // @@protoc_insertion_point(serialize_to_array_start:operations_research.packing.vbp.Item)
521 ::uint32_t cached_has_bits = 0;
522 (void)cached_has_bits;
523
524 // string name = 1;
525 if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
526 if (!this_._internal_name().empty()) {
527 const ::std::string& _s = this_._internal_name();
528 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
529 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "operations_research.packing.vbp.Item.name");
530 target = stream->WriteStringMaybeAliased(1, _s, target);
531 }
532 }
533
534 // repeated int64 resource_usage = 2;
535 {
536 int byte_size = this_._impl_._resource_usage_cached_byte_size_.Get();
537 if (byte_size > 0) {
538 target = stream->WriteInt64Packed(
539 2, this_._internal_resource_usage(), byte_size, target);
540 }
541 }
542
543 // int32 num_copies = 3;
544 if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
545 if (this_._internal_num_copies() != 0) {
546 target =
547 ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<3>(
548 stream, this_._internal_num_copies(), target);
549 }
550 }
551
552 // int32 max_number_of_copies_per_bin = 4;
553 if ((this_._impl_._has_bits_[0] & 0x00000004u) != 0) {
554 if (this_._internal_max_number_of_copies_per_bin() != 0) {
555 target =
556 ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<4>(
557 stream, this_._internal_max_number_of_copies_per_bin(), target);
558 }
559 }
560
561 // int32 num_optional_copies = 5;
562 if ((this_._impl_._has_bits_[0] & 0x00000010u) != 0) {
563 if (this_._internal_num_optional_copies() != 0) {
564 target =
565 ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<5>(
566 stream, this_._internal_num_optional_copies(), target);
567 }
568 }
569
570 // double penalty_per_missing_copy = 6;
571 if ((this_._impl_._has_bits_[0] & 0x00000008u) != 0) {
572 if (::absl::bit_cast<::uint64_t>(this_._internal_penalty_per_missing_copy()) != 0) {
573 target = stream->EnsureSpace(target);
574 target = ::_pbi::WireFormatLite::WriteDoubleToArray(
575 6, this_._internal_penalty_per_missing_copy(), target);
576 }
577 }
578
579 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
580 target =
581 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
582 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
583 }
584 // @@protoc_insertion_point(serialize_to_array_end:operations_research.packing.vbp.Item)
585 return target;
586}
587
588#if defined(PROTOBUF_CUSTOM_VTABLE)
589::size_t Item::ByteSizeLong(const MessageLite& base) {
590 const Item& this_ = static_cast<const Item&>(base);
591#else // PROTOBUF_CUSTOM_VTABLE
592::size_t Item::ByteSizeLong() const {
593 const Item& this_ = *this;
594#endif // PROTOBUF_CUSTOM_VTABLE
595 // @@protoc_insertion_point(message_byte_size_start:operations_research.packing.vbp.Item)
596 ::size_t total_size = 0;
597
598 ::uint32_t cached_has_bits = 0;
599 // Prevent compiler warnings about cached_has_bits being unused
600 (void)cached_has_bits;
601
602 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
603 {
604 // repeated int64 resource_usage = 2;
605 {
606 total_size +=
607 ::_pbi::WireFormatLite::Int64SizeWithPackedTagSize(
608 this_._internal_resource_usage(), 1,
609 this_._impl_._resource_usage_cached_byte_size_);
610 }
611 }
612 cached_has_bits = this_._impl_._has_bits_[0];
613 if ((cached_has_bits & 0x0000001fu) != 0) {
614 // string name = 1;
615 if ((cached_has_bits & 0x00000001u) != 0) {
616 if (!this_._internal_name().empty()) {
617 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
618 this_._internal_name());
619 }
620 }
621 // int32 num_copies = 3;
622 if ((cached_has_bits & 0x00000002u) != 0) {
623 if (this_._internal_num_copies() != 0) {
624 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
625 this_._internal_num_copies());
626 }
627 }
628 // int32 max_number_of_copies_per_bin = 4;
629 if ((cached_has_bits & 0x00000004u) != 0) {
630 if (this_._internal_max_number_of_copies_per_bin() != 0) {
631 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
632 this_._internal_max_number_of_copies_per_bin());
633 }
634 }
635 // double penalty_per_missing_copy = 6;
636 if ((cached_has_bits & 0x00000008u) != 0) {
637 if (::absl::bit_cast<::uint64_t>(this_._internal_penalty_per_missing_copy()) != 0) {
638 total_size += 9;
639 }
640 }
641 // int32 num_optional_copies = 5;
642 if ((cached_has_bits & 0x00000010u) != 0) {
643 if (this_._internal_num_optional_copies() != 0) {
644 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
645 this_._internal_num_optional_copies());
646 }
647 }
648 }
649 return this_.MaybeComputeUnknownFieldsSize(total_size,
650 &this_._impl_._cached_size_);
651}
652
653void Item::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
654 auto* const _this = static_cast<Item*>(&to_msg);
655 auto& from = static_cast<const Item&>(from_msg);
656 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.packing.vbp.Item)
657 ABSL_DCHECK_NE(&from, _this);
658 ::uint32_t cached_has_bits = 0;
659 (void) cached_has_bits;
660
661 _this->_internal_mutable_resource_usage()->MergeFrom(from._internal_resource_usage());
662 cached_has_bits = from._impl_._has_bits_[0];
663 if ((cached_has_bits & 0x0000001fu) != 0) {
664 if ((cached_has_bits & 0x00000001u) != 0) {
665 if (!from._internal_name().empty()) {
666 _this->_internal_set_name(from._internal_name());
667 } else {
668 if (_this->_impl_.name_.IsDefault()) {
669 _this->_internal_set_name("");
670 }
671 }
672 }
673 if ((cached_has_bits & 0x00000002u) != 0) {
674 if (from._internal_num_copies() != 0) {
675 _this->_impl_.num_copies_ = from._impl_.num_copies_;
676 }
677 }
678 if ((cached_has_bits & 0x00000004u) != 0) {
679 if (from._internal_max_number_of_copies_per_bin() != 0) {
680 _this->_impl_.max_number_of_copies_per_bin_ = from._impl_.max_number_of_copies_per_bin_;
681 }
682 }
683 if ((cached_has_bits & 0x00000008u) != 0) {
684 if (::absl::bit_cast<::uint64_t>(from._internal_penalty_per_missing_copy()) != 0) {
685 _this->_impl_.penalty_per_missing_copy_ = from._impl_.penalty_per_missing_copy_;
686 }
687 }
688 if ((cached_has_bits & 0x00000010u) != 0) {
689 if (from._internal_num_optional_copies() != 0) {
690 _this->_impl_.num_optional_copies_ = from._impl_.num_optional_copies_;
691 }
692 }
693 }
694 _this->_impl_._has_bits_[0] |= cached_has_bits;
695 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
696}
697
698void Item::CopyFrom(const Item& from) {
699// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.packing.vbp.Item)
700 if (&from == this) return;
701 Clear();
702 MergeFrom(from);
703}
704
705
706void Item::InternalSwap(Item* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
707 using ::std::swap;
708 auto* arena = GetArena();
709 ABSL_DCHECK_EQ(arena, other->GetArena());
710 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
711 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
712 _impl_.resource_usage_.InternalSwap(&other->_impl_.resource_usage_);
713 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
714 ::google::protobuf::internal::memswap<
715 PROTOBUF_FIELD_OFFSET(Item, _impl_.num_optional_copies_)
716 + sizeof(Item::_impl_.num_optional_copies_)
717 - PROTOBUF_FIELD_OFFSET(Item, _impl_.num_copies_)>(
718 reinterpret_cast<char*>(&_impl_.num_copies_),
719 reinterpret_cast<char*>(&other->_impl_.num_copies_));
720}
721
722::google::protobuf::Metadata Item::GetMetadata() const {
723 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
724}
725// ===================================================================
726
728 public:
729 using HasBits =
730 decltype(::std::declval<VectorBinPackingProblem>()._impl_._has_bits_);
731 static constexpr ::int32_t kHasBitsOffset =
732 8 * PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_._has_bits_);
734
735VectorBinPackingProblem::VectorBinPackingProblem(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
736#if defined(PROTOBUF_CUSTOM_VTABLE)
737 : ::google::protobuf::Message(arena, VectorBinPackingProblem_class_data_.base()) {
738#else // PROTOBUF_CUSTOM_VTABLE
739 : ::google::protobuf::Message(arena) {
740#endif // PROTOBUF_CUSTOM_VTABLE
741 SharedCtor(arena);
742 // @@protoc_insertion_point(arena_constructor:operations_research.packing.vbp.VectorBinPackingProblem)
743}
744PROTOBUF_NDEBUG_INLINE VectorBinPackingProblem::Impl_::Impl_(
745 ::google::protobuf::internal::InternalVisibility visibility,
746 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
747 const ::operations_research::packing::vbp::VectorBinPackingProblem& from_msg)
748 : _has_bits_{from._has_bits_},
749 _cached_size_{0},
750 resource_capacity_{visibility, arena, from.resource_capacity_},
751 _resource_capacity_cached_byte_size_{0},
752 resource_name_{visibility, arena, from.resource_name_},
753 item_{visibility, arena, from.item_},
754 name_(arena, from.name_) {}
755
757 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
759#if defined(PROTOBUF_CUSTOM_VTABLE)
760 : ::google::protobuf::Message(arena, VectorBinPackingProblem_class_data_.base()) {
761#else // PROTOBUF_CUSTOM_VTABLE
762 : ::google::protobuf::Message(arena) {
763#endif // PROTOBUF_CUSTOM_VTABLE
764 VectorBinPackingProblem* const _this = this;
765 (void)_this;
766 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
767 from._internal_metadata_);
768 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
769 ::memcpy(reinterpret_cast<char *>(&_impl_) +
770 offsetof(Impl_, cost_per_bin_),
771 reinterpret_cast<const char *>(&from._impl_) +
772 offsetof(Impl_, cost_per_bin_),
773 offsetof(Impl_, max_bins_) -
774 offsetof(Impl_, cost_per_bin_) +
775 sizeof(Impl_::max_bins_));
776
777 // @@protoc_insertion_point(copy_constructor:operations_research.packing.vbp.VectorBinPackingProblem)
778}
779PROTOBUF_NDEBUG_INLINE VectorBinPackingProblem::Impl_::Impl_(
780 ::google::protobuf::internal::InternalVisibility visibility,
781 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
782 : _cached_size_{0},
783 resource_capacity_{visibility, arena},
784 _resource_capacity_cached_byte_size_{0},
785 resource_name_{visibility, arena},
786 item_{visibility, arena},
787 name_(arena) {}
788
789inline void VectorBinPackingProblem::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
790 new (&_impl_) Impl_(internal_visibility(), arena);
791 ::memset(reinterpret_cast<char *>(&_impl_) +
792 offsetof(Impl_, cost_per_bin_),
793 0,
794 offsetof(Impl_, max_bins_) -
795 offsetof(Impl_, cost_per_bin_) +
796 sizeof(Impl_::max_bins_));
797}
799 // @@protoc_insertion_point(destructor:operations_research.packing.vbp.VectorBinPackingProblem)
800 SharedDtor(*this);
801}
802inline void VectorBinPackingProblem::SharedDtor(MessageLite& self) {
803 VectorBinPackingProblem& this_ = static_cast<VectorBinPackingProblem&>(self);
804 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
805 ABSL_DCHECK(this_.GetArena() == nullptr);
806 this_._impl_.name_.Destroy();
807 this_._impl_.~Impl_();
808}
809
810inline void* PROTOBUF_NONNULL VectorBinPackingProblem::PlacementNew_(
811 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
812 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
813 return ::new (mem) VectorBinPackingProblem(arena);
814}
816 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
817 PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.resource_capacity_) +
818 decltype(VectorBinPackingProblem::_impl_.resource_capacity_)::
819 InternalGetArenaOffset(
820 ::google::protobuf::Message::internal_visibility()),
821 PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.resource_name_) +
822 decltype(VectorBinPackingProblem::_impl_.resource_name_)::
823 InternalGetArenaOffset(
824 ::google::protobuf::Message::internal_visibility()),
825 PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.item_) +
826 decltype(VectorBinPackingProblem::_impl_.item_)::
827 InternalGetArenaOffset(
828 ::google::protobuf::Message::internal_visibility()),
829 });
830 if (arena_bits.has_value()) {
831 return ::google::protobuf::internal::MessageCreator::CopyInit(
832 sizeof(VectorBinPackingProblem), alignof(VectorBinPackingProblem), *arena_bits);
833 } else {
834 return ::google::protobuf::internal::MessageCreator(&VectorBinPackingProblem::PlacementNew_,
835 sizeof(VectorBinPackingProblem),
836 alignof(VectorBinPackingProblem));
837 }
838}
840 return ::google::protobuf::internal::ClassDataFull{
841 ::google::protobuf::internal::ClassData{
843 &_table_.header,
844 nullptr, // OnDemandRegisterArenaDtor
845 nullptr, // IsInitialized
846 &VectorBinPackingProblem::MergeImpl,
847 ::google::protobuf::Message::GetNewImpl<VectorBinPackingProblem>(),
848#if defined(PROTOBUF_CUSTOM_VTABLE)
849 &VectorBinPackingProblem::SharedDtor,
850 ::google::protobuf::Message::GetClearImpl<VectorBinPackingProblem>(), &VectorBinPackingProblem::ByteSizeLong,
852#endif // PROTOBUF_CUSTOM_VTABLE
853 PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_._cached_size_),
854 false,
855 },
856 &VectorBinPackingProblem::kDescriptorMethods,
858 nullptr, // tracker
859 };
860}
861
862PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
863 ::google::protobuf::internal::ClassDataFull VectorBinPackingProblem_class_data_ =
866PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
868 ::google::protobuf::internal::PrefetchToLocalCache(&VectorBinPackingProblem_class_data_);
869 ::google::protobuf::internal::PrefetchToLocalCache(VectorBinPackingProblem_class_data_.tc_table);
871}
872PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
873const ::_pbi::TcParseTable<3, 6, 1, 81, 2>
874VectorBinPackingProblem::_table_ = {
875 {
876 PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_._has_bits_),
877 0, // no _extensions_
878 6, 56, // max_field_number, fast_idx_mask
879 offsetof(decltype(_table_), field_lookup_table),
880 4294967232, // skipmap
881 offsetof(decltype(_table_), field_entries),
882 6, // num_field_entries
883 1, // num_aux_entries
884 offsetof(decltype(_table_), aux_entries),
886 nullptr, // post_loop_handler
887 ::_pbi::TcParser::GenericFallback, // fallback
888 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
889 ::_pbi::TcParser::GetTable<::operations_research::packing::vbp::VectorBinPackingProblem>(), // to_prefetch
890 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
891 }, {{
892 {::_pbi::TcParser::MiniParse, {}},
893 // string name = 1;
894 {::_pbi::TcParser::FastUS1,
895 {10, 0, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.name_)}},
896 // repeated int64 resource_capacity = 2;
897 {::_pbi::TcParser::FastV64P1,
898 {18, 63, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.resource_capacity_)}},
899 // repeated string resource_name = 3;
900 {::_pbi::TcParser::FastUR1,
901 {26, 63, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.resource_name_)}},
902 // repeated .operations_research.packing.vbp.Item item = 4;
903 {::_pbi::TcParser::FastMtR1,
904 {34, 63, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.item_)}},
905 // int32 max_bins = 5;
906 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(VectorBinPackingProblem, _impl_.max_bins_), 2>(),
907 {40, 2, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.max_bins_)}},
908 // optional double cost_per_bin = 6;
909 {::_pbi::TcParser::FastF64S1,
910 {49, 1, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.cost_per_bin_)}},
911 {::_pbi::TcParser::MiniParse, {}},
912 }}, {{
913 65535, 65535
914 }}, {{
915 // string name = 1;
916 {PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.name_), _Internal::kHasBitsOffset + 0, 0,
917 (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
918 // repeated int64 resource_capacity = 2;
919 {PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.resource_capacity_), -1, 0,
920 (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)},
921 // repeated string resource_name = 3;
922 {PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.resource_name_), -1, 0,
923 (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
924 // repeated .operations_research.packing.vbp.Item item = 4;
925 {PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.item_), -1, 0,
926 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
927 // int32 max_bins = 5;
928 {PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.max_bins_), _Internal::kHasBitsOffset + 2, 0,
929 (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
930 // optional double cost_per_bin = 6;
931 {PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.cost_per_bin_), _Internal::kHasBitsOffset + 1, 0,
932 (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
933 }},
934 {{
935 {::_pbi::TcParser::GetTable<::operations_research::packing::vbp::Item>()},
936 }},
937 {{
938 "\67\4\0\15\0\0\0\0"
939 "operations_research.packing.vbp.VectorBinPackingProblem"
940 "name"
941 "resource_name"
942 }},
943};
944PROTOBUF_NOINLINE void VectorBinPackingProblem::Clear() {
945// @@protoc_insertion_point(message_clear_start:operations_research.packing.vbp.VectorBinPackingProblem)
946 ::google::protobuf::internal::TSanWrite(&_impl_);
947 ::uint32_t cached_has_bits = 0;
948 // Prevent compiler warnings about cached_has_bits being unused
949 (void) cached_has_bits;
950
951 _impl_.resource_capacity_.Clear();
952 _impl_.resource_name_.Clear();
953 _impl_.item_.Clear();
954 cached_has_bits = _impl_._has_bits_[0];
955 if ((cached_has_bits & 0x00000001u) != 0) {
956 _impl_.name_.ClearNonDefaultToEmpty();
957 }
958 if ((cached_has_bits & 0x00000006u) != 0) {
959 ::memset(&_impl_.cost_per_bin_, 0, static_cast<::size_t>(
960 reinterpret_cast<char*>(&_impl_.max_bins_) -
961 reinterpret_cast<char*>(&_impl_.cost_per_bin_)) + sizeof(_impl_.max_bins_));
962 }
963 _impl_._has_bits_.Clear();
964 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
965}
966
967#if defined(PROTOBUF_CUSTOM_VTABLE)
968::uint8_t* PROTOBUF_NONNULL VectorBinPackingProblem::_InternalSerialize(
969 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
970 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
971 const VectorBinPackingProblem& this_ = static_cast<const VectorBinPackingProblem&>(base);
972#else // PROTOBUF_CUSTOM_VTABLE
973::uint8_t* PROTOBUF_NONNULL VectorBinPackingProblem::_InternalSerialize(
974 ::uint8_t* PROTOBUF_NONNULL target,
975 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
976 const VectorBinPackingProblem& this_ = *this;
977#endif // PROTOBUF_CUSTOM_VTABLE
978 // @@protoc_insertion_point(serialize_to_array_start:operations_research.packing.vbp.VectorBinPackingProblem)
979 ::uint32_t cached_has_bits = 0;
980 (void)cached_has_bits;
981
982 // string name = 1;
983 if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
984 if (!this_._internal_name().empty()) {
985 const ::std::string& _s = this_._internal_name();
986 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
987 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "operations_research.packing.vbp.VectorBinPackingProblem.name");
988 target = stream->WriteStringMaybeAliased(1, _s, target);
989 }
990 }
991
992 // repeated int64 resource_capacity = 2;
993 {
994 int byte_size = this_._impl_._resource_capacity_cached_byte_size_.Get();
995 if (byte_size > 0) {
996 target = stream->WriteInt64Packed(
997 2, this_._internal_resource_capacity(), byte_size, target);
998 }
999 }
1000
1001 // repeated string resource_name = 3;
1002 for (int i = 0, n = this_._internal_resource_name_size(); i < n; ++i) {
1003 const auto& s = this_._internal_resource_name().Get(i);
1004 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1005 s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "operations_research.packing.vbp.VectorBinPackingProblem.resource_name");
1006 target = stream->WriteString(3, s, target);
1007 }
1008
1009 // repeated .operations_research.packing.vbp.Item item = 4;
1010 for (unsigned i = 0, n = static_cast<unsigned>(
1011 this_._internal_item_size());
1012 i < n; i++) {
1013 const auto& repfield = this_._internal_item().Get(i);
1014 target =
1015 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1016 4, repfield, repfield.GetCachedSize(),
1017 target, stream);
1018 }
1019
1020 // int32 max_bins = 5;
1021 if ((this_._impl_._has_bits_[0] & 0x00000004u) != 0) {
1022 if (this_._internal_max_bins() != 0) {
1023 target =
1024 ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<5>(
1025 stream, this_._internal_max_bins(), target);
1026 }
1027 }
1028
1029 cached_has_bits = this_._impl_._has_bits_[0];
1030 // optional double cost_per_bin = 6;
1031 if ((cached_has_bits & 0x00000002u) != 0) {
1032 target = stream->EnsureSpace(target);
1033 target = ::_pbi::WireFormatLite::WriteDoubleToArray(
1034 6, this_._internal_cost_per_bin(), target);
1035 }
1036
1037 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1038 target =
1039 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1040 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1041 }
1042 // @@protoc_insertion_point(serialize_to_array_end:operations_research.packing.vbp.VectorBinPackingProblem)
1043 return target;
1044}
1045
1046#if defined(PROTOBUF_CUSTOM_VTABLE)
1048 const VectorBinPackingProblem& this_ = static_cast<const VectorBinPackingProblem&>(base);
1049#else // PROTOBUF_CUSTOM_VTABLE
1051 const VectorBinPackingProblem& this_ = *this;
1052#endif // PROTOBUF_CUSTOM_VTABLE
1053 // @@protoc_insertion_point(message_byte_size_start:operations_research.packing.vbp.VectorBinPackingProblem)
1054 ::size_t total_size = 0;
1055
1056 ::uint32_t cached_has_bits = 0;
1057 // Prevent compiler warnings about cached_has_bits being unused
1058 (void)cached_has_bits;
1059
1060 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1061 {
1062 // repeated int64 resource_capacity = 2;
1063 {
1064 total_size +=
1065 ::_pbi::WireFormatLite::Int64SizeWithPackedTagSize(
1066 this_._internal_resource_capacity(), 1,
1067 this_._impl_._resource_capacity_cached_byte_size_);
1068 }
1069 // repeated string resource_name = 3;
1070 {
1071 total_size +=
1072 1 * ::google::protobuf::internal::FromIntSize(this_._internal_resource_name().size());
1073 for (int i = 0, n = this_._internal_resource_name().size(); i < n; ++i) {
1074 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
1075 this_._internal_resource_name().Get(i));
1076 }
1077 }
1078 // repeated .operations_research.packing.vbp.Item item = 4;
1079 {
1080 total_size += 1UL * this_._internal_item_size();
1081 for (const auto& msg : this_._internal_item()) {
1082 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1083 }
1084 }
1085 }
1086 cached_has_bits = this_._impl_._has_bits_[0];
1087 total_size += static_cast<bool>(0x00000002u & cached_has_bits) * 9;
1088 if ((cached_has_bits & 0x00000005u) != 0) {
1089 // string name = 1;
1090 if ((cached_has_bits & 0x00000001u) != 0) {
1091 if (!this_._internal_name().empty()) {
1092 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1093 this_._internal_name());
1094 }
1095 }
1096 // int32 max_bins = 5;
1097 if ((cached_has_bits & 0x00000004u) != 0) {
1098 if (this_._internal_max_bins() != 0) {
1099 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
1100 this_._internal_max_bins());
1101 }
1102 }
1103 }
1104 return this_.MaybeComputeUnknownFieldsSize(total_size,
1105 &this_._impl_._cached_size_);
1106}
1107
1108void VectorBinPackingProblem::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
1109 auto* const _this = static_cast<VectorBinPackingProblem*>(&to_msg);
1110 auto& from = static_cast<const VectorBinPackingProblem&>(from_msg);
1111 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.packing.vbp.VectorBinPackingProblem)
1112 ABSL_DCHECK_NE(&from, _this);
1113 ::uint32_t cached_has_bits = 0;
1114 (void) cached_has_bits;
1115
1116 _this->_internal_mutable_resource_capacity()->MergeFrom(from._internal_resource_capacity());
1117 _this->_internal_mutable_resource_name()->MergeFrom(from._internal_resource_name());
1118 _this->_internal_mutable_item()->MergeFrom(
1119 from._internal_item());
1120 cached_has_bits = from._impl_._has_bits_[0];
1121 if ((cached_has_bits & 0x00000007u) != 0) {
1122 if ((cached_has_bits & 0x00000001u) != 0) {
1123 if (!from._internal_name().empty()) {
1124 _this->_internal_set_name(from._internal_name());
1125 } else {
1126 if (_this->_impl_.name_.IsDefault()) {
1127 _this->_internal_set_name("");
1128 }
1129 }
1130 }
1131 if ((cached_has_bits & 0x00000002u) != 0) {
1132 _this->_impl_.cost_per_bin_ = from._impl_.cost_per_bin_;
1133 }
1134 if ((cached_has_bits & 0x00000004u) != 0) {
1135 if (from._internal_max_bins() != 0) {
1136 _this->_impl_.max_bins_ = from._impl_.max_bins_;
1137 }
1138 }
1139 }
1140 _this->_impl_._has_bits_[0] |= cached_has_bits;
1141 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
1142}
1143
1144void VectorBinPackingProblem::CopyFrom(const VectorBinPackingProblem& from) {
1145// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.packing.vbp.VectorBinPackingProblem)
1146 if (&from == this) return;
1147 Clear();
1148 MergeFrom(from);
1149}
1150
1151
1152void VectorBinPackingProblem::InternalSwap(VectorBinPackingProblem* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1153 using ::std::swap;
1154 auto* arena = GetArena();
1155 ABSL_DCHECK_EQ(arena, other->GetArena());
1156 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1157 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1158 _impl_.resource_capacity_.InternalSwap(&other->_impl_.resource_capacity_);
1159 _impl_.resource_name_.InternalSwap(&other->_impl_.resource_name_);
1160 _impl_.item_.InternalSwap(&other->_impl_.item_);
1161 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
1162 ::google::protobuf::internal::memswap<
1163 PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.max_bins_)
1164 + sizeof(VectorBinPackingProblem::_impl_.max_bins_)
1165 - PROTOBUF_FIELD_OFFSET(VectorBinPackingProblem, _impl_.cost_per_bin_)>(
1166 reinterpret_cast<char*>(&_impl_.cost_per_bin_),
1167 reinterpret_cast<char*>(&other->_impl_.cost_per_bin_));
1168}
1169
1170::google::protobuf::Metadata VectorBinPackingProblem::GetMetadata() const {
1171 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1173// ===================================================================
1174
1176 public:
1177};
1179VectorBinPackingOneBinInSolution::VectorBinPackingOneBinInSolution(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
1180#if defined(PROTOBUF_CUSTOM_VTABLE)
1181 : ::google::protobuf::Message(arena, VectorBinPackingOneBinInSolution_class_data_.base()) {
1182#else // PROTOBUF_CUSTOM_VTABLE
1183 : ::google::protobuf::Message(arena) {
1184#endif // PROTOBUF_CUSTOM_VTABLE
1185 SharedCtor(arena);
1186 // @@protoc_insertion_point(arena_constructor:operations_research.packing.vbp.VectorBinPackingOneBinInSolution)
1187}
1188PROTOBUF_NDEBUG_INLINE VectorBinPackingOneBinInSolution::Impl_::Impl_(
1189 ::google::protobuf::internal::InternalVisibility visibility,
1190 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
1191 const ::operations_research::packing::vbp::VectorBinPackingOneBinInSolution& from_msg)
1192 : item_indices_{visibility, arena, from.item_indices_},
1193 _item_indices_cached_byte_size_{0},
1194 item_copies_{visibility, arena, from.item_copies_},
1195 _item_copies_cached_byte_size_{0},
1196 _cached_size_{0} {}
1197
1199 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
1200 const VectorBinPackingOneBinInSolution& from)
1201#if defined(PROTOBUF_CUSTOM_VTABLE)
1202 : ::google::protobuf::Message(arena, VectorBinPackingOneBinInSolution_class_data_.base()) {
1203#else // PROTOBUF_CUSTOM_VTABLE
1204 : ::google::protobuf::Message(arena) {
1205#endif // PROTOBUF_CUSTOM_VTABLE
1206 VectorBinPackingOneBinInSolution* const _this = this;
1207 (void)_this;
1208 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1209 from._internal_metadata_);
1210 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
1211
1212 // @@protoc_insertion_point(copy_constructor:operations_research.packing.vbp.VectorBinPackingOneBinInSolution)
1213}
1214PROTOBUF_NDEBUG_INLINE VectorBinPackingOneBinInSolution::Impl_::Impl_(
1215 ::google::protobuf::internal::InternalVisibility visibility,
1216 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
1217 : item_indices_{visibility, arena},
1218 _item_indices_cached_byte_size_{0},
1219 item_copies_{visibility, arena},
1220 _item_copies_cached_byte_size_{0},
1221 _cached_size_{0} {}
1222
1223inline void VectorBinPackingOneBinInSolution::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
1224 new (&_impl_) Impl_(internal_visibility(), arena);
1225}
1227 // @@protoc_insertion_point(destructor:operations_research.packing.vbp.VectorBinPackingOneBinInSolution)
1228 SharedDtor(*this);
1230inline void VectorBinPackingOneBinInSolution::SharedDtor(MessageLite& self) {
1232 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
1233 ABSL_DCHECK(this_.GetArena() == nullptr);
1234 this_._impl_.~Impl_();
1235}
1236
1237inline void* PROTOBUF_NONNULL VectorBinPackingOneBinInSolution::PlacementNew_(
1238 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
1239 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
1240 return ::new (mem) VectorBinPackingOneBinInSolution(arena);
1241}
1243 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
1244 PROTOBUF_FIELD_OFFSET(VectorBinPackingOneBinInSolution, _impl_.item_indices_) +
1246 InternalGetArenaOffset(
1247 ::google::protobuf::Message::internal_visibility()),
1248 PROTOBUF_FIELD_OFFSET(VectorBinPackingOneBinInSolution, _impl_.item_copies_) +
1249 decltype(VectorBinPackingOneBinInSolution::_impl_.item_copies_)::
1250 InternalGetArenaOffset(
1251 ::google::protobuf::Message::internal_visibility()),
1252 });
1253 if (arena_bits.has_value()) {
1254 return ::google::protobuf::internal::MessageCreator::ZeroInit(
1255 sizeof(VectorBinPackingOneBinInSolution), alignof(VectorBinPackingOneBinInSolution), *arena_bits);
1256 } else {
1257 return ::google::protobuf::internal::MessageCreator(&VectorBinPackingOneBinInSolution::PlacementNew_,
1258 sizeof(VectorBinPackingOneBinInSolution),
1259 alignof(VectorBinPackingOneBinInSolution));
1260 }
1261}
1263 return ::google::protobuf::internal::ClassDataFull{
1264 ::google::protobuf::internal::ClassData{
1266 &_table_.header,
1267 nullptr, // OnDemandRegisterArenaDtor
1268 nullptr, // IsInitialized
1269 &VectorBinPackingOneBinInSolution::MergeImpl,
1270 ::google::protobuf::Message::GetNewImpl<VectorBinPackingOneBinInSolution>(),
1271#if defined(PROTOBUF_CUSTOM_VTABLE)
1272 &VectorBinPackingOneBinInSolution::SharedDtor,
1273 ::google::protobuf::Message::GetClearImpl<VectorBinPackingOneBinInSolution>(), &VectorBinPackingOneBinInSolution::ByteSizeLong,
1275#endif // PROTOBUF_CUSTOM_VTABLE
1276 PROTOBUF_FIELD_OFFSET(VectorBinPackingOneBinInSolution, _impl_._cached_size_),
1277 false,
1278 },
1279 &VectorBinPackingOneBinInSolution::kDescriptorMethods,
1281 nullptr, // tracker
1282 };
1283}
1284
1285PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
1286 ::google::protobuf::internal::ClassDataFull VectorBinPackingOneBinInSolution_class_data_ =
1288
1289PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
1291 ::google::protobuf::internal::PrefetchToLocalCache(&VectorBinPackingOneBinInSolution_class_data_);
1292 ::google::protobuf::internal::PrefetchToLocalCache(VectorBinPackingOneBinInSolution_class_data_.tc_table);
1294}
1295PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1296const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
1297VectorBinPackingOneBinInSolution::_table_ = {
1298 {
1299 0, // no _has_bits_
1300 0, // no _extensions_
1301 2, 8, // max_field_number, fast_idx_mask
1302 offsetof(decltype(_table_), field_lookup_table),
1303 4294967292, // skipmap
1304 offsetof(decltype(_table_), field_entries),
1305 2, // num_field_entries
1306 0, // num_aux_entries
1307 offsetof(decltype(_table_), field_names), // no aux_entries
1309 nullptr, // post_loop_handler
1310 ::_pbi::TcParser::GenericFallback, // fallback
1311 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
1312 ::_pbi::TcParser::GetTable<::operations_research::packing::vbp::VectorBinPackingOneBinInSolution>(), // to_prefetch
1313 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
1314 }, {{
1315 // repeated int32 item_copies = 2;
1316 {::_pbi::TcParser::FastV32P1,
1317 {18, 63, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingOneBinInSolution, _impl_.item_copies_)}},
1318 // repeated int32 item_indices = 1;
1319 {::_pbi::TcParser::FastV32P1,
1320 {10, 63, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingOneBinInSolution, _impl_.item_indices_)}},
1321 }}, {{
1322 65535, 65535
1323 }}, {{
1324 // repeated int32 item_indices = 1;
1325 {PROTOBUF_FIELD_OFFSET(VectorBinPackingOneBinInSolution, _impl_.item_indices_), 0, 0,
1326 (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt32)},
1327 // repeated int32 item_copies = 2;
1328 {PROTOBUF_FIELD_OFFSET(VectorBinPackingOneBinInSolution, _impl_.item_copies_), 0, 0,
1329 (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt32)},
1330 }},
1331 // no aux_entries
1332 {{
1333 }},
1334};
1335PROTOBUF_NOINLINE void VectorBinPackingOneBinInSolution::Clear() {
1336// @@protoc_insertion_point(message_clear_start:operations_research.packing.vbp.VectorBinPackingOneBinInSolution)
1337 ::google::protobuf::internal::TSanWrite(&_impl_);
1338 ::uint32_t cached_has_bits = 0;
1339 // Prevent compiler warnings about cached_has_bits being unused
1340 (void) cached_has_bits;
1341
1342 _impl_.item_indices_.Clear();
1343 _impl_.item_copies_.Clear();
1344 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
1345}
1346
1347#if defined(PROTOBUF_CUSTOM_VTABLE)
1349 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
1350 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
1352#else // PROTOBUF_CUSTOM_VTABLE
1354 ::uint8_t* PROTOBUF_NONNULL target,
1355 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
1357#endif // PROTOBUF_CUSTOM_VTABLE
1358 // @@protoc_insertion_point(serialize_to_array_start:operations_research.packing.vbp.VectorBinPackingOneBinInSolution)
1359 ::uint32_t cached_has_bits = 0;
1360 (void)cached_has_bits;
1361
1362 // repeated int32 item_indices = 1;
1363 {
1364 int byte_size = this_._impl_._item_indices_cached_byte_size_.Get();
1365 if (byte_size > 0) {
1366 target = stream->WriteInt32Packed(
1367 1, this_._internal_item_indices(), byte_size, target);
1368 }
1369 }
1370
1371 // repeated int32 item_copies = 2;
1372 {
1373 int byte_size = this_._impl_._item_copies_cached_byte_size_.Get();
1374 if (byte_size > 0) {
1375 target = stream->WriteInt32Packed(
1376 2, this_._internal_item_copies(), byte_size, target);
1377 }
1378 }
1379
1380 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1381 target =
1382 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1383 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1384 }
1385 // @@protoc_insertion_point(serialize_to_array_end:operations_research.packing.vbp.VectorBinPackingOneBinInSolution)
1386 return target;
1387}
1388
1389#if defined(PROTOBUF_CUSTOM_VTABLE)
1391 const VectorBinPackingOneBinInSolution& this_ = static_cast<const VectorBinPackingOneBinInSolution&>(base);
1392#else // PROTOBUF_CUSTOM_VTABLE
1394 const VectorBinPackingOneBinInSolution& this_ = *this;
1395#endif // PROTOBUF_CUSTOM_VTABLE
1396 // @@protoc_insertion_point(message_byte_size_start:operations_research.packing.vbp.VectorBinPackingOneBinInSolution)
1397 ::size_t total_size = 0;
1398
1399 ::uint32_t cached_has_bits = 0;
1400 // Prevent compiler warnings about cached_has_bits being unused
1401 (void)cached_has_bits;
1402
1403 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1404 {
1405 // repeated int32 item_indices = 1;
1406 {
1407 total_size +=
1408 ::_pbi::WireFormatLite::Int32SizeWithPackedTagSize(
1409 this_._internal_item_indices(), 1,
1410 this_._impl_._item_indices_cached_byte_size_);
1411 }
1412 // repeated int32 item_copies = 2;
1413 {
1414 total_size +=
1415 ::_pbi::WireFormatLite::Int32SizeWithPackedTagSize(
1416 this_._internal_item_copies(), 1,
1417 this_._impl_._item_copies_cached_byte_size_);
1418 }
1419 }
1420 return this_.MaybeComputeUnknownFieldsSize(total_size,
1421 &this_._impl_._cached_size_);
1422}
1423
1424void VectorBinPackingOneBinInSolution::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
1425 auto* const _this = static_cast<VectorBinPackingOneBinInSolution*>(&to_msg);
1426 auto& from = static_cast<const VectorBinPackingOneBinInSolution&>(from_msg);
1427 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.packing.vbp.VectorBinPackingOneBinInSolution)
1428 ABSL_DCHECK_NE(&from, _this);
1429 ::uint32_t cached_has_bits = 0;
1430 (void) cached_has_bits;
1431
1432 _this->_internal_mutable_item_indices()->MergeFrom(from._internal_item_indices());
1433 _this->_internal_mutable_item_copies()->MergeFrom(from._internal_item_copies());
1434 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
1435}
1436
1438// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.packing.vbp.VectorBinPackingOneBinInSolution)
1439 if (&from == this) return;
1441 MergeFrom(from);
1442}
1443
1444
1445void VectorBinPackingOneBinInSolution::InternalSwap(VectorBinPackingOneBinInSolution* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1446 using ::std::swap;
1447 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1448 _impl_.item_indices_.InternalSwap(&other->_impl_.item_indices_);
1449 _impl_.item_copies_.InternalSwap(&other->_impl_.item_copies_);
1450}
1451
1452::google::protobuf::Metadata VectorBinPackingOneBinInSolution::GetMetadata() const {
1453 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1454}
1455// ===================================================================
1456
1458 public:
1459 using HasBits =
1460 decltype(::std::declval<VectorBinPackingSolution>()._impl_._has_bits_);
1461 static constexpr ::int32_t kHasBitsOffset =
1462 8 * PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_._has_bits_);
1464
1465VectorBinPackingSolution::VectorBinPackingSolution(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
1466#if defined(PROTOBUF_CUSTOM_VTABLE)
1467 : ::google::protobuf::Message(arena, VectorBinPackingSolution_class_data_.base()) {
1468#else // PROTOBUF_CUSTOM_VTABLE
1469 : ::google::protobuf::Message(arena) {
1470#endif // PROTOBUF_CUSTOM_VTABLE
1471 SharedCtor(arena);
1472 // @@protoc_insertion_point(arena_constructor:operations_research.packing.vbp.VectorBinPackingSolution)
1473}
1474PROTOBUF_NDEBUG_INLINE VectorBinPackingSolution::Impl_::Impl_(
1475 ::google::protobuf::internal::InternalVisibility visibility,
1476 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
1477 const ::operations_research::packing::vbp::VectorBinPackingSolution& from_msg)
1478 : _has_bits_{from._has_bits_},
1479 _cached_size_{0},
1480 bins_{visibility, arena, from.bins_},
1481 solver_info_(arena, from.solver_info_) {}
1482
1484 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
1485 const VectorBinPackingSolution& from)
1486#if defined(PROTOBUF_CUSTOM_VTABLE)
1487 : ::google::protobuf::Message(arena, VectorBinPackingSolution_class_data_.base()) {
1488#else // PROTOBUF_CUSTOM_VTABLE
1489 : ::google::protobuf::Message(arena) {
1490#endif // PROTOBUF_CUSTOM_VTABLE
1491 VectorBinPackingSolution* const _this = this;
1492 (void)_this;
1493 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1494 from._internal_metadata_);
1495 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
1496 ::memcpy(reinterpret_cast<char *>(&_impl_) +
1497 offsetof(Impl_, objective_value_),
1498 reinterpret_cast<const char *>(&from._impl_) +
1499 offsetof(Impl_, objective_value_),
1500 offsetof(Impl_, status_) -
1501 offsetof(Impl_, objective_value_) +
1502 sizeof(Impl_::status_));
1503
1504 // @@protoc_insertion_point(copy_constructor:operations_research.packing.vbp.VectorBinPackingSolution)
1505}
1506PROTOBUF_NDEBUG_INLINE VectorBinPackingSolution::Impl_::Impl_(
1507 ::google::protobuf::internal::InternalVisibility visibility,
1508 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
1509 : _cached_size_{0},
1510 bins_{visibility, arena},
1511 solver_info_(arena) {}
1512
1513inline void VectorBinPackingSolution::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
1514 new (&_impl_) Impl_(internal_visibility(), arena);
1515 ::memset(reinterpret_cast<char *>(&_impl_) +
1516 offsetof(Impl_, objective_value_),
1517 0,
1518 offsetof(Impl_, status_) -
1519 offsetof(Impl_, objective_value_) +
1520 sizeof(Impl_::status_));
1521}
1523 // @@protoc_insertion_point(destructor:operations_research.packing.vbp.VectorBinPackingSolution)
1524 SharedDtor(*this);
1525}
1526inline void VectorBinPackingSolution::SharedDtor(MessageLite& self) {
1527 VectorBinPackingSolution& this_ = static_cast<VectorBinPackingSolution&>(self);
1528 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
1529 ABSL_DCHECK(this_.GetArena() == nullptr);
1530 this_._impl_.solver_info_.Destroy();
1531 this_._impl_.~Impl_();
1532}
1533
1534inline void* PROTOBUF_NONNULL VectorBinPackingSolution::PlacementNew_(
1535 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
1536 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
1537 return ::new (mem) VectorBinPackingSolution(arena);
1540 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
1541 PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.bins_) +
1542 decltype(VectorBinPackingSolution::_impl_.bins_)::
1543 InternalGetArenaOffset(
1544 ::google::protobuf::Message::internal_visibility()),
1545 });
1546 if (arena_bits.has_value()) {
1547 return ::google::protobuf::internal::MessageCreator::CopyInit(
1548 sizeof(VectorBinPackingSolution), alignof(VectorBinPackingSolution), *arena_bits);
1549 } else {
1550 return ::google::protobuf::internal::MessageCreator(&VectorBinPackingSolution::PlacementNew_,
1552 alignof(VectorBinPackingSolution));
1553 }
1554}
1556 return ::google::protobuf::internal::ClassDataFull{
1557 ::google::protobuf::internal::ClassData{
1559 &_table_.header,
1560 nullptr, // OnDemandRegisterArenaDtor
1561 nullptr, // IsInitialized
1562 &VectorBinPackingSolution::MergeImpl,
1563 ::google::protobuf::Message::GetNewImpl<VectorBinPackingSolution>(),
1564#if defined(PROTOBUF_CUSTOM_VTABLE)
1565 &VectorBinPackingSolution::SharedDtor,
1566 ::google::protobuf::Message::GetClearImpl<VectorBinPackingSolution>(), &VectorBinPackingSolution::ByteSizeLong,
1568#endif // PROTOBUF_CUSTOM_VTABLE
1569 PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_._cached_size_),
1570 false,
1571 },
1572 &VectorBinPackingSolution::kDescriptorMethods,
1574 nullptr, // tracker
1575 };
1576}
1577
1578PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
1579 ::google::protobuf::internal::ClassDataFull VectorBinPackingSolution_class_data_ =
1581
1582PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
1584 ::google::protobuf::internal::PrefetchToLocalCache(&VectorBinPackingSolution_class_data_);
1585 ::google::protobuf::internal::PrefetchToLocalCache(VectorBinPackingSolution_class_data_.tc_table);
1588PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
1589const ::_pbi::TcParseTable<3, 6, 1, 76, 2>
1590VectorBinPackingSolution::_table_ = {
1591 {
1592 PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_._has_bits_),
1593 0, // no _extensions_
1594 6, 56, // max_field_number, fast_idx_mask
1595 offsetof(decltype(_table_), field_lookup_table),
1596 4294967232, // skipmap
1597 offsetof(decltype(_table_), field_entries),
1598 6, // num_field_entries
1599 1, // num_aux_entries
1600 offsetof(decltype(_table_), aux_entries),
1602 nullptr, // post_loop_handler
1603 ::_pbi::TcParser::GenericFallback, // fallback
1604 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
1605 ::_pbi::TcParser::GetTable<::operations_research::packing::vbp::VectorBinPackingSolution>(), // to_prefetch
1606 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
1607 }, {{
1608 {::_pbi::TcParser::MiniParse, {}},
1609 // string solver_info = 1;
1610 {::_pbi::TcParser::FastUS1,
1611 {10, 0, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.solver_info_)}},
1612 // repeated .operations_research.packing.vbp.VectorBinPackingOneBinInSolution bins = 2;
1613 {::_pbi::TcParser::FastMtR1,
1614 {18, 63, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.bins_)}},
1615 // .operations_research.packing.vbp.VectorBinPackingSolveStatus status = 3;
1616 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(VectorBinPackingSolution, _impl_.status_), 4>(),
1617 {24, 4, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.status_)}},
1618 // double objective_value = 4;
1619 {::_pbi::TcParser::FastF64S1,
1620 {33, 1, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.objective_value_)}},
1621 // double solve_time_in_seconds = 5;
1622 {::_pbi::TcParser::FastF64S1,
1623 {41, 2, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.solve_time_in_seconds_)}},
1624 // double arc_flow_time_in_seconds = 6;
1625 {::_pbi::TcParser::FastF64S1,
1626 {49, 3, 0, PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.arc_flow_time_in_seconds_)}},
1627 {::_pbi::TcParser::MiniParse, {}},
1628 }}, {{
1629 65535, 65535
1630 }}, {{
1631 // string solver_info = 1;
1632 {PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.solver_info_), _Internal::kHasBitsOffset + 0, 0,
1633 (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
1634 // repeated .operations_research.packing.vbp.VectorBinPackingOneBinInSolution bins = 2;
1635 {PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.bins_), -1, 0,
1636 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
1637 // .operations_research.packing.vbp.VectorBinPackingSolveStatus status = 3;
1638 {PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.status_), _Internal::kHasBitsOffset + 4, 0,
1639 (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
1640 // double objective_value = 4;
1641 {PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.objective_value_), _Internal::kHasBitsOffset + 1, 0,
1642 (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
1643 // double solve_time_in_seconds = 5;
1644 {PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.solve_time_in_seconds_), _Internal::kHasBitsOffset + 2, 0,
1645 (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
1646 // double arc_flow_time_in_seconds = 6;
1647 {PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.arc_flow_time_in_seconds_), _Internal::kHasBitsOffset + 3, 0,
1648 (0 | ::_fl::kFcOptional | ::_fl::kDouble)},
1649 }},
1650 {{
1651 {::_pbi::TcParser::GetTable<::operations_research::packing::vbp::VectorBinPackingOneBinInSolution>()},
1652 }},
1653 {{
1654 "\70\13\0\0\0\0\0\0"
1655 "operations_research.packing.vbp.VectorBinPackingSolution"
1656 "solver_info"
1657 }},
1658};
1659PROTOBUF_NOINLINE void VectorBinPackingSolution::Clear() {
1660// @@protoc_insertion_point(message_clear_start:operations_research.packing.vbp.VectorBinPackingSolution)
1661 ::google::protobuf::internal::TSanWrite(&_impl_);
1662 ::uint32_t cached_has_bits = 0;
1663 // Prevent compiler warnings about cached_has_bits being unused
1664 (void) cached_has_bits;
1665
1666 _impl_.bins_.Clear();
1667 cached_has_bits = _impl_._has_bits_[0];
1668 if ((cached_has_bits & 0x00000001u) != 0) {
1669 _impl_.solver_info_.ClearNonDefaultToEmpty();
1670 }
1671 if ((cached_has_bits & 0x0000001eu) != 0) {
1672 ::memset(&_impl_.objective_value_, 0, static_cast<::size_t>(
1673 reinterpret_cast<char*>(&_impl_.status_) -
1674 reinterpret_cast<char*>(&_impl_.objective_value_)) + sizeof(_impl_.status_));
1675 }
1676 _impl_._has_bits_.Clear();
1677 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
1678}
1679
1680#if defined(PROTOBUF_CUSTOM_VTABLE)
1681::uint8_t* PROTOBUF_NONNULL VectorBinPackingSolution::_InternalSerialize(
1682 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
1683 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
1684 const VectorBinPackingSolution& this_ = static_cast<const VectorBinPackingSolution&>(base);
1685#else // PROTOBUF_CUSTOM_VTABLE
1686::uint8_t* PROTOBUF_NONNULL VectorBinPackingSolution::_InternalSerialize(
1687 ::uint8_t* PROTOBUF_NONNULL target,
1688 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
1689 const VectorBinPackingSolution& this_ = *this;
1690#endif // PROTOBUF_CUSTOM_VTABLE
1691 // @@protoc_insertion_point(serialize_to_array_start:operations_research.packing.vbp.VectorBinPackingSolution)
1692 ::uint32_t cached_has_bits = 0;
1693 (void)cached_has_bits;
1694
1695 // string solver_info = 1;
1696 if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
1697 if (!this_._internal_solver_info().empty()) {
1698 const ::std::string& _s = this_._internal_solver_info();
1699 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1700 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "operations_research.packing.vbp.VectorBinPackingSolution.solver_info");
1701 target = stream->WriteStringMaybeAliased(1, _s, target);
1702 }
1703 }
1704
1705 // repeated .operations_research.packing.vbp.VectorBinPackingOneBinInSolution bins = 2;
1706 for (unsigned i = 0, n = static_cast<unsigned>(
1707 this_._internal_bins_size());
1708 i < n; i++) {
1709 const auto& repfield = this_._internal_bins().Get(i);
1710 target =
1711 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1712 2, repfield, repfield.GetCachedSize(),
1713 target, stream);
1714 }
1715
1716 // .operations_research.packing.vbp.VectorBinPackingSolveStatus status = 3;
1717 if ((this_._impl_._has_bits_[0] & 0x00000010u) != 0) {
1718 if (this_._internal_status() != 0) {
1719 target = stream->EnsureSpace(target);
1720 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1721 3, this_._internal_status(), target);
1722 }
1723 }
1724
1725 // double objective_value = 4;
1726 if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
1727 if (::absl::bit_cast<::uint64_t>(this_._internal_objective_value()) != 0) {
1728 target = stream->EnsureSpace(target);
1729 target = ::_pbi::WireFormatLite::WriteDoubleToArray(
1730 4, this_._internal_objective_value(), target);
1731 }
1732 }
1733
1734 // double solve_time_in_seconds = 5;
1735 if ((this_._impl_._has_bits_[0] & 0x00000004u) != 0) {
1736 if (::absl::bit_cast<::uint64_t>(this_._internal_solve_time_in_seconds()) != 0) {
1737 target = stream->EnsureSpace(target);
1738 target = ::_pbi::WireFormatLite::WriteDoubleToArray(
1739 5, this_._internal_solve_time_in_seconds(), target);
1740 }
1741 }
1742
1743 // double arc_flow_time_in_seconds = 6;
1744 if ((this_._impl_._has_bits_[0] & 0x00000008u) != 0) {
1745 if (::absl::bit_cast<::uint64_t>(this_._internal_arc_flow_time_in_seconds()) != 0) {
1746 target = stream->EnsureSpace(target);
1747 target = ::_pbi::WireFormatLite::WriteDoubleToArray(
1748 6, this_._internal_arc_flow_time_in_seconds(), target);
1749 }
1750 }
1751
1752 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1753 target =
1754 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1755 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1756 }
1757 // @@protoc_insertion_point(serialize_to_array_end:operations_research.packing.vbp.VectorBinPackingSolution)
1758 return target;
1759}
1760
1761#if defined(PROTOBUF_CUSTOM_VTABLE)
1763 const VectorBinPackingSolution& this_ = static_cast<const VectorBinPackingSolution&>(base);
1764#else // PROTOBUF_CUSTOM_VTABLE
1766 const VectorBinPackingSolution& this_ = *this;
1767#endif // PROTOBUF_CUSTOM_VTABLE
1768 // @@protoc_insertion_point(message_byte_size_start:operations_research.packing.vbp.VectorBinPackingSolution)
1769 ::size_t total_size = 0;
1770
1771 ::uint32_t cached_has_bits = 0;
1772 // Prevent compiler warnings about cached_has_bits being unused
1773 (void)cached_has_bits;
1774
1775 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1776 {
1777 // repeated .operations_research.packing.vbp.VectorBinPackingOneBinInSolution bins = 2;
1778 {
1779 total_size += 1UL * this_._internal_bins_size();
1780 for (const auto& msg : this_._internal_bins()) {
1781 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1782 }
1783 }
1784 }
1785 cached_has_bits = this_._impl_._has_bits_[0];
1786 if ((cached_has_bits & 0x0000001fu) != 0) {
1787 // string solver_info = 1;
1788 if ((cached_has_bits & 0x00000001u) != 0) {
1789 if (!this_._internal_solver_info().empty()) {
1790 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
1791 this_._internal_solver_info());
1792 }
1793 }
1794 // double objective_value = 4;
1795 if ((cached_has_bits & 0x00000002u) != 0) {
1796 if (::absl::bit_cast<::uint64_t>(this_._internal_objective_value()) != 0) {
1797 total_size += 9;
1798 }
1799 }
1800 // double solve_time_in_seconds = 5;
1801 if ((cached_has_bits & 0x00000004u) != 0) {
1802 if (::absl::bit_cast<::uint64_t>(this_._internal_solve_time_in_seconds()) != 0) {
1803 total_size += 9;
1804 }
1805 }
1806 // double arc_flow_time_in_seconds = 6;
1807 if ((cached_has_bits & 0x00000008u) != 0) {
1808 if (::absl::bit_cast<::uint64_t>(this_._internal_arc_flow_time_in_seconds()) != 0) {
1809 total_size += 9;
1810 }
1811 }
1812 // .operations_research.packing.vbp.VectorBinPackingSolveStatus status = 3;
1813 if ((cached_has_bits & 0x00000010u) != 0) {
1814 if (this_._internal_status() != 0) {
1815 total_size += 1 +
1816 ::_pbi::WireFormatLite::EnumSize(this_._internal_status());
1817 }
1818 }
1819 }
1820 return this_.MaybeComputeUnknownFieldsSize(total_size,
1821 &this_._impl_._cached_size_);
1822}
1823
1824void VectorBinPackingSolution::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
1825 auto* const _this = static_cast<VectorBinPackingSolution*>(&to_msg);
1826 auto& from = static_cast<const VectorBinPackingSolution&>(from_msg);
1827 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.packing.vbp.VectorBinPackingSolution)
1828 ABSL_DCHECK_NE(&from, _this);
1829 ::uint32_t cached_has_bits = 0;
1830 (void) cached_has_bits;
1831
1832 _this->_internal_mutable_bins()->MergeFrom(
1833 from._internal_bins());
1834 cached_has_bits = from._impl_._has_bits_[0];
1835 if ((cached_has_bits & 0x0000001fu) != 0) {
1836 if ((cached_has_bits & 0x00000001u) != 0) {
1837 if (!from._internal_solver_info().empty()) {
1838 _this->_internal_set_solver_info(from._internal_solver_info());
1839 } else {
1840 if (_this->_impl_.solver_info_.IsDefault()) {
1841 _this->_internal_set_solver_info("");
1842 }
1843 }
1844 }
1845 if ((cached_has_bits & 0x00000002u) != 0) {
1846 if (::absl::bit_cast<::uint64_t>(from._internal_objective_value()) != 0) {
1847 _this->_impl_.objective_value_ = from._impl_.objective_value_;
1848 }
1849 }
1850 if ((cached_has_bits & 0x00000004u) != 0) {
1851 if (::absl::bit_cast<::uint64_t>(from._internal_solve_time_in_seconds()) != 0) {
1852 _this->_impl_.solve_time_in_seconds_ = from._impl_.solve_time_in_seconds_;
1853 }
1854 }
1855 if ((cached_has_bits & 0x00000008u) != 0) {
1856 if (::absl::bit_cast<::uint64_t>(from._internal_arc_flow_time_in_seconds()) != 0) {
1857 _this->_impl_.arc_flow_time_in_seconds_ = from._impl_.arc_flow_time_in_seconds_;
1858 }
1859 }
1860 if ((cached_has_bits & 0x00000010u) != 0) {
1861 if (from._internal_status() != 0) {
1862 _this->_impl_.status_ = from._impl_.status_;
1863 }
1864 }
1865 }
1866 _this->_impl_._has_bits_[0] |= cached_has_bits;
1867 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
1868}
1869
1871// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.packing.vbp.VectorBinPackingSolution)
1872 if (&from == this) return;
1873 Clear();
1875}
1876
1877
1878void VectorBinPackingSolution::InternalSwap(VectorBinPackingSolution* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1879 using ::std::swap;
1880 auto* arena = GetArena();
1881 ABSL_DCHECK_EQ(arena, other->GetArena());
1882 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1883 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1884 _impl_.bins_.InternalSwap(&other->_impl_.bins_);
1885 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.solver_info_, &other->_impl_.solver_info_, arena);
1886 ::google::protobuf::internal::memswap<
1887 PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.status_)
1888 + sizeof(VectorBinPackingSolution::_impl_.status_)
1889 - PROTOBUF_FIELD_OFFSET(VectorBinPackingSolution, _impl_.objective_value_)>(
1890 reinterpret_cast<char*>(&_impl_.objective_value_),
1891 reinterpret_cast<char*>(&other->_impl_.objective_value_));
1892}
1893
1894::google::protobuf::Metadata VectorBinPackingSolution::GetMetadata() const {
1895 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1896}
1897// @@protoc_insertion_point(namespace_scope)
1898} // namespace vbp
1899} // namespace packing
1900} // namespace operations_research
1901namespace google {
1902namespace protobuf {
1903} // namespace protobuf
1904} // namespace google
1905// @@protoc_insertion_point(global_scope)
1906PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
1907 _static_init2_ [[maybe_unused]] =
1909 ::std::false_type{});
1910#include "google/protobuf/port_undef.inc"
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< Item >()._impl_._has_bits_) HasBits
friend class ::google::protobuf::MessageLite
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
::google::protobuf::Metadata GetMetadata() const
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
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 VectorBinPackingOneBinInSolution &from)
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
decltype(::std::declval< VectorBinPackingProblem >()._impl_._has_bits_) HasBits
::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)
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
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
friend void swap(VectorBinPackingSolution &a, VectorBinPackingSolution &b)
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL VectorBinPackingSolveStatus_descriptor()
PROTOBUF_CONSTINIT const uint32_t VectorBinPackingSolveStatus_internal_data_[]
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull VectorBinPackingSolution_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull Item_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull VectorBinPackingProblem_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VectorBinPackingSolutionDefaultTypeInternal _VectorBinPackingSolution_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull VectorBinPackingOneBinInSolution_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ItemDefaultTypeInternal _Item_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VectorBinPackingOneBinInSolutionDefaultTypeInternal _VectorBinPackingOneBinInSolution_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VectorBinPackingProblemDefaultTypeInternal _VectorBinPackingProblem_default_instance_
In SWIG mode, we don't want anything besides these top-level includes.
static constexpr ::_pbi::MigrationSchema *PROTOBUF_NULLABLE schemas
static const ::_pb::EnumDescriptor *PROTOBUF_NONNULL file_level_enum_descriptors_ortools_2fpacking_2fvector_5fbin_5fpacking_2eproto[1]
static constexprconst ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE file_level_service_descriptors_ortools_2fpacking_2fvector_5fbin_5fpacking_2eproto
PROTOBUF_CONSTINITconst ::_pbi::DescriptorTable descriptor_table_ortools_2fpacking_2fvector_5fbin_5fpacking_2eproto
::absl::once_flag descriptor_table_ortools_2fpacking_2fvector_5fbin_5fpacking_2eproto_once
const ::uint32_t TableStruct_ortools_2fpacking_2fvector_5fbin_5fpacking_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold)