Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
int128.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/util/int128.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 {
28
29inline constexpr Int128::Impl_::Impl_(
30 ::_pbi::ConstantInitialized) noexcept
31 : _cached_size_{0},
32 high_{::int64_t{0}},
33 low_{::uint64_t{0u}} {}
34
35template <typename>
36PROTOBUF_CONSTEXPR Int128::Int128(::_pbi::ConstantInitialized)
37#if defined(PROTOBUF_CUSTOM_VTABLE)
38 : ::google::protobuf::Message(Int128_class_data_.base()),
39#else // PROTOBUF_CUSTOM_VTABLE
40 : ::google::protobuf::Message(),
41#endif // PROTOBUF_CUSTOM_VTABLE
42 _impl_(::_pbi::ConstantInitialized()) {
43}
45 PROTOBUF_CONSTEXPR Int128DefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
47 union {
49 };
50};
51
52PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
53 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Int128DefaultTypeInternal _Int128_default_instance_;
54} // namespace operations_research
55static constexpr const ::_pb::EnumDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
57static constexpr const ::_pb::ServiceDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
59const ::uint32_t
61 protodesc_cold) = {
62 0x081, // bitmap
63 PROTOBUF_FIELD_OFFSET(::operations_research::Int128, _impl_._has_bits_),
64 5, // hasbit index offset
65 PROTOBUF_FIELD_OFFSET(::operations_research::Int128, _impl_.high_),
66 PROTOBUF_FIELD_OFFSET(::operations_research::Int128, _impl_.low_),
67 0,
68 1,
69};
70
71static const ::_pbi::MigrationSchema
72 schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
74};
75static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = {
77};
78const char descriptor_table_protodef_ortools_2futil_2fint128_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
79 protodesc_cold) = {
80 "\n\031ortools/util/int128.proto\022\023operations_"
81 "research\"#\n\006Int128\022\014\n\004high\030\001 \001(\003\022\013\n\003low\030"
82 "\002 \001(\004B1\n\027com.google.ortools.utilP\001\252\002\023Goo"
83 "gle.OrTools.Utilb\006proto3"
84};
86PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ortools_2futil_2fint128_2eproto = {
87 false,
88 false,
89 144,
90 descriptor_table_protodef_ortools_2futil_2fint128_2eproto,
91 "ortools/util/int128.proto",
93 nullptr,
94 0,
95 1,
96 schemas,
101};
102namespace operations_research {
103// ===================================================================
104
105class Int128::_Internal {
106 public:
107 using HasBits =
108 decltype(::std::declval<Int128>()._impl_._has_bits_);
109 static constexpr ::int32_t kHasBitsOffset =
110 8 * PROTOBUF_FIELD_OFFSET(Int128, _impl_._has_bits_);
111};
112
113Int128::Int128(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
114#if defined(PROTOBUF_CUSTOM_VTABLE)
115 : ::google::protobuf::Message(arena, Int128_class_data_.base()) {
116#else // PROTOBUF_CUSTOM_VTABLE
117 : ::google::protobuf::Message(arena) {
118#endif // PROTOBUF_CUSTOM_VTABLE
119 SharedCtor(arena);
120 // @@protoc_insertion_point(arena_constructor:operations_research.Int128)
121}
123 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Int128& from)
124#if defined(PROTOBUF_CUSTOM_VTABLE)
125 : ::google::protobuf::Message(arena, Int128_class_data_.base()),
126#else // PROTOBUF_CUSTOM_VTABLE
127 : ::google::protobuf::Message(arena),
128#endif // PROTOBUF_CUSTOM_VTABLE
129 _impl_(from._impl_) {
130 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
131 from._internal_metadata_);
132}
133PROTOBUF_NDEBUG_INLINE Int128::Impl_::Impl_(
134 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
135 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
136 : _cached_size_{0} {}
137
138inline void Int128::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
139 new (&_impl_) Impl_(internal_visibility(), arena);
140 ::memset(reinterpret_cast<char*>(&_impl_) +
141 offsetof(Impl_, high_),
142 0,
143 offsetof(Impl_, low_) -
144 offsetof(Impl_, high_) +
145 sizeof(Impl_::low_));
146}
148 // @@protoc_insertion_point(destructor:operations_research.Int128)
149 SharedDtor(*this);
150}
151inline void Int128::SharedDtor(MessageLite& self) {
152 Int128& this_ = static_cast<Int128&>(self);
153 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
154 this_.CheckHasBitConsistency();
155 }
156 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
157 ABSL_DCHECK(this_.GetArena() == nullptr);
158 this_._impl_.~Impl_();
159}
160
161inline void* PROTOBUF_NONNULL Int128::PlacementNew_(
162 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
163 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
164 return ::new (mem) Int128(arena);
165}
166constexpr auto Int128::InternalNewImpl_() {
167 return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Int128),
168 alignof(Int128));
169}
170constexpr auto Int128::InternalGenerateClassData_() {
171 return ::google::protobuf::internal::ClassDataFull{
172 ::google::protobuf::internal::ClassData{
173 &_Int128_default_instance_._instance,
174 &_table_.header,
175 nullptr, // OnDemandRegisterArenaDtor
176 nullptr, // IsInitialized
177 &Int128::MergeImpl,
178 ::google::protobuf::Message::GetNewImpl<Int128>(),
179#if defined(PROTOBUF_CUSTOM_VTABLE)
180 &Int128::SharedDtor,
181 ::google::protobuf::Message::GetClearImpl<Int128>(), &Int128::ByteSizeLong,
183#endif // PROTOBUF_CUSTOM_VTABLE
184 PROTOBUF_FIELD_OFFSET(Int128, _impl_._cached_size_),
185 false,
186 },
187 &Int128::kDescriptorMethods,
189 nullptr, // tracker
190 };
191}
192
193PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
194 ::google::protobuf::internal::ClassDataFull Int128_class_data_ =
196
197PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
198Int128::GetClassData() const {
199 ::google::protobuf::internal::PrefetchToLocalCache(&Int128_class_data_);
200 ::google::protobuf::internal::PrefetchToLocalCache(Int128_class_data_.tc_table);
201 return Int128_class_data_.base();
202}
203PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
204const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
205Int128::_table_ = {
206 {
207 PROTOBUF_FIELD_OFFSET(Int128, _impl_._has_bits_),
208 0, // no _extensions_
209 2, 8, // max_field_number, fast_idx_mask
210 offsetof(decltype(_table_), field_lookup_table),
211 4294967292, // skipmap
212 offsetof(decltype(_table_), field_entries),
213 2, // num_field_entries
214 0, // num_aux_entries
215 offsetof(decltype(_table_), field_names), // no aux_entries
216 Int128_class_data_.base(),
217 nullptr, // post_loop_handler
218 ::_pbi::TcParser::GenericFallback, // fallback
219 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
220 ::_pbi::TcParser::GetTable<::operations_research::Int128>(), // to_prefetch
221 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
222 }, {{
223 // uint64 low = 2;
224 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Int128, _impl_.low_), 1>(),
225 {16, 1, 0,
226 PROTOBUF_FIELD_OFFSET(Int128, _impl_.low_)}},
227 // int64 high = 1;
228 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Int128, _impl_.high_), 0>(),
229 {8, 0, 0,
230 PROTOBUF_FIELD_OFFSET(Int128, _impl_.high_)}},
231 }}, {{
232 65535, 65535
233 }}, {{
234 // int64 high = 1;
235 {PROTOBUF_FIELD_OFFSET(Int128, _impl_.high_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
236 // uint64 low = 2;
237 {PROTOBUF_FIELD_OFFSET(Int128, _impl_.low_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
238 }},
239 // no aux_entries
240 {{
241 }},
242};
243PROTOBUF_NOINLINE void Int128::Clear() {
244// @@protoc_insertion_point(message_clear_start:operations_research.Int128)
245 ::google::protobuf::internal::TSanWrite(&_impl_);
246 ::uint32_t cached_has_bits = 0;
247 // Prevent compiler warnings about cached_has_bits being unused
248 (void) cached_has_bits;
249
250 cached_has_bits = _impl_._has_bits_[0];
251 if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
252 ::memset(&_impl_.high_, 0, static_cast<::size_t>(
253 reinterpret_cast<char*>(&_impl_.low_) -
254 reinterpret_cast<char*>(&_impl_.high_)) + sizeof(_impl_.low_));
255 }
256 _impl_._has_bits_.Clear();
257 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
258}
259
260#if defined(PROTOBUF_CUSTOM_VTABLE)
261::uint8_t* PROTOBUF_NONNULL Int128::_InternalSerialize(
262 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
263 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
264 const Int128& this_ = static_cast<const Int128&>(base);
265#else // PROTOBUF_CUSTOM_VTABLE
266::uint8_t* PROTOBUF_NONNULL Int128::_InternalSerialize(
267 ::uint8_t* PROTOBUF_NONNULL target,
268 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
269 const Int128& this_ = *this;
270#endif // PROTOBUF_CUSTOM_VTABLE
271 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
272 this_.CheckHasBitConsistency();
273 }
274 // @@protoc_insertion_point(serialize_to_array_start:operations_research.Int128)
275 ::uint32_t cached_has_bits = 0;
276 (void)cached_has_bits;
277
278 cached_has_bits = this_._impl_._has_bits_[0];
279 // int64 high = 1;
280 if (CheckHasBit(cached_has_bits, 0x00000001U)) {
281 if (this_._internal_high() != 0) {
282 target =
283 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
284 stream, this_._internal_high(), target);
285 }
286 }
287
288 // uint64 low = 2;
289 if (CheckHasBit(cached_has_bits, 0x00000002U)) {
290 if (this_._internal_low() != 0) {
291 target = stream->EnsureSpace(target);
292 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
293 2, this_._internal_low(), target);
294 }
295 }
296
297 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
298 target =
299 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
300 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
301 }
302 // @@protoc_insertion_point(serialize_to_array_end:operations_research.Int128)
303 return target;
304}
305
306#if defined(PROTOBUF_CUSTOM_VTABLE)
307::size_t Int128::ByteSizeLong(const MessageLite& base) {
308 const Int128& this_ = static_cast<const Int128&>(base);
309#else // PROTOBUF_CUSTOM_VTABLE
310::size_t Int128::ByteSizeLong() const {
311 const Int128& this_ = *this;
312#endif // PROTOBUF_CUSTOM_VTABLE
313 // @@protoc_insertion_point(message_byte_size_start:operations_research.Int128)
314 ::size_t total_size = 0;
315
316 ::uint32_t cached_has_bits = 0;
317 // Prevent compiler warnings about cached_has_bits being unused
318 (void)cached_has_bits;
319
320 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
321 cached_has_bits = this_._impl_._has_bits_[0];
322 if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
323 // int64 high = 1;
324 if (CheckHasBit(cached_has_bits, 0x00000001U)) {
325 if (this_._internal_high() != 0) {
326 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
327 this_._internal_high());
328 }
329 }
330 // uint64 low = 2;
331 if (CheckHasBit(cached_has_bits, 0x00000002U)) {
332 if (this_._internal_low() != 0) {
333 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
334 this_._internal_low());
335 }
336 }
337 }
338 return this_.MaybeComputeUnknownFieldsSize(total_size,
339 &this_._impl_._cached_size_);
340}
341
342void Int128::MergeImpl(::google::protobuf::MessageLite& to_msg,
343 const ::google::protobuf::MessageLite& from_msg) {
344 auto* const _this =
345 static_cast<Int128*>(&to_msg);
346 auto& from = static_cast<const Int128&>(from_msg);
347 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
348 from.CheckHasBitConsistency();
349 }
350 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.Int128)
351 ABSL_DCHECK_NE(&from, _this);
352 ::uint32_t cached_has_bits = 0;
353 (void)cached_has_bits;
354
355 cached_has_bits = from._impl_._has_bits_[0];
356 if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
357 if (CheckHasBit(cached_has_bits, 0x00000001U)) {
358 if (from._internal_high() != 0) {
359 _this->_impl_.high_ = from._impl_.high_;
360 }
361 }
362 if (CheckHasBit(cached_has_bits, 0x00000002U)) {
363 if (from._internal_low() != 0) {
364 _this->_impl_.low_ = from._impl_.low_;
365 }
366 }
367 }
368 _this->_impl_._has_bits_[0] |= cached_has_bits;
369 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
370 from._internal_metadata_);
371}
372
373void Int128::CopyFrom(const Int128& from) {
374 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.Int128)
375 if (&from == this) return;
376 Clear();
377 MergeFrom(from);
378}
379
380
381void Int128::InternalSwap(Int128* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
382 using ::std::swap;
383 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
384 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
385 ::google::protobuf::internal::memswap<
386 PROTOBUF_FIELD_OFFSET(Int128, _impl_.low_)
387 + sizeof(Int128::_impl_.low_)
388 - PROTOBUF_FIELD_OFFSET(Int128, _impl_.high_)>(
389 reinterpret_cast<char*>(&_impl_.high_),
390 reinterpret_cast<char*>(&other->_impl_.high_));
391}
392
393::google::protobuf::Metadata Int128::GetMetadata() const {
394 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
395}
396// @@protoc_insertion_point(namespace_scope)
397} // namespace operations_research
398namespace google {
399namespace protobuf {
400} // namespace protobuf
401} // namespace google
402// @@protoc_insertion_point(global_scope)
403PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
404 _static_init2_ [[maybe_unused]] =
406 ::std::false_type{});
407#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< Int128 >()._impl_._has_bits_) HasBits
Definition int128.pb.cc:108
static constexpr ::int32_t kHasBitsOffset
Definition int128.pb.cc:110
::size_t ByteSizeLong() const final
Definition int128.pb.cc:311
friend class ::google::protobuf::MessageLite
Definition int128.pb.h:249
friend void swap(Int128 &a, Int128 &b)
Definition int128.pb.h:131
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
Definition int128.pb.cc:267
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
Definition int128.pb.cc:244
::google::protobuf::Metadata GetMetadata() const
Definition int128.pb.cc:394
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
Definition int128.pb.h:108
void CopyFrom(const Int128 &from)
Definition int128.pb.cc:374
static constexpr auto InternalGenerateClassData_()
Definition int128.pb.cc:171
~Int128() PROTOBUF_FINAL
Definition int128.pb.cc:148
void MergeFrom(const Int128 &from)
Definition int128.pb.h:154
static constexpr ::_pbi::MigrationSchema *PROTOBUF_NULLABLE schemas
static constexprconst ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE file_level_service_descriptors_ortools_2futil_2fint128_2eproto
Definition int128.pb.cc:58
static constexprconst ::_pb::EnumDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE file_level_enum_descriptors_ortools_2futil_2fint128_2eproto
Definition int128.pb.cc:56
const ::uint32_t TableStruct_ortools_2futil_2fint128_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold)
PROTOBUF_CONSTINITconst ::_pbi::DescriptorTable descriptor_table_ortools_2futil_2fint128_2eproto
Definition int128.pb.cc:86
::absl::once_flag descriptor_table_ortools_2futil_2fint128_2eproto_once
Definition int128.pb.cc:85
OR-Tools root namespace.
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Int128DefaultTypeInternal _Int128_default_instance_
Definition int128.pb.cc:53
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull Int128_class_data_
Definition int128.pb.cc:195
static const ::uint32_t offsets[]
Definition int128.pb.h:50