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