Google OR-Tools v9.14
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.31.1
5
7
8#include <algorithm>
9#include <type_traits>
10#include "google/protobuf/io/coded_stream.h"
11#include "google/protobuf/generated_message_tctable_impl.h"
12#include "google/protobuf/extension_set.h"
13#include "google/protobuf/generated_message_util.h"
14#include "google/protobuf/wire_format_lite.h"
15#include "google/protobuf/descriptor.h"
16#include "google/protobuf/generated_message_reflection.h"
17#include "google/protobuf/reflection_ops.h"
18#include "google/protobuf/wire_format.h"
19// @@protoc_insertion_point(includes)
20
21// Must be included last.
22#include "google/protobuf/port_def.inc"
23PROTOBUF_PRAGMA_INIT_SEG
24namespace _pb = ::google::protobuf;
26namespace _fl = ::google::protobuf::internal::field_layout;
27namespace operations_research {
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 ::google::protobuf::internal::InternalVisibility visibility,
135 ::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 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
154 ABSL_DCHECK(this_.GetArena() == nullptr);
155 this_._impl_.~Impl_();
156}
157
158inline void* PROTOBUF_NONNULL Int128::PlacementNew_(
159 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
160 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
161 return ::new (mem) Int128(arena);
162}
163constexpr auto Int128::InternalNewImpl_() {
164 return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Int128),
165 alignof(Int128));
166}
167constexpr auto Int128::InternalGenerateClassData_() {
168 return ::google::protobuf::internal::ClassDataFull{
169 ::google::protobuf::internal::ClassData{
170 &_Int128_default_instance_._instance,
171 &_table_.header,
172 nullptr, // OnDemandRegisterArenaDtor
173 nullptr, // IsInitialized
174 &Int128::MergeImpl,
175 ::google::protobuf::Message::GetNewImpl<Int128>(),
176#if defined(PROTOBUF_CUSTOM_VTABLE)
177 &Int128::SharedDtor,
178 ::google::protobuf::Message::GetClearImpl<Int128>(), &Int128::ByteSizeLong,
180#endif // PROTOBUF_CUSTOM_VTABLE
181 PROTOBUF_FIELD_OFFSET(Int128, _impl_._cached_size_),
182 false,
183 },
184 &Int128::kDescriptorMethods,
186 nullptr, // tracker
187 };
188}
189
190PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
191 ::google::protobuf::internal::ClassDataFull Int128_class_data_ =
193
194PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
195Int128::GetClassData() const {
196 ::google::protobuf::internal::PrefetchToLocalCache(&Int128_class_data_);
197 ::google::protobuf::internal::PrefetchToLocalCache(Int128_class_data_.tc_table);
198 return Int128_class_data_.base();
199}
200PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
201const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
202Int128::_table_ = {
203 {
204 PROTOBUF_FIELD_OFFSET(Int128, _impl_._has_bits_),
205 0, // no _extensions_
206 2, 8, // max_field_number, fast_idx_mask
207 offsetof(decltype(_table_), field_lookup_table),
208 4294967292, // skipmap
209 offsetof(decltype(_table_), field_entries),
210 2, // num_field_entries
211 0, // num_aux_entries
212 offsetof(decltype(_table_), field_names), // no aux_entries
213 Int128_class_data_.base(),
214 nullptr, // post_loop_handler
215 ::_pbi::TcParser::GenericFallback, // fallback
216 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
217 ::_pbi::TcParser::GetTable<::operations_research::Int128>(), // to_prefetch
218 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
219 }, {{
220 // uint64 low = 2;
221 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Int128, _impl_.low_), 1>(),
222 {16, 1, 0, PROTOBUF_FIELD_OFFSET(Int128, _impl_.low_)}},
223 // int64 high = 1;
224 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Int128, _impl_.high_), 0>(),
225 {8, 0, 0, PROTOBUF_FIELD_OFFSET(Int128, _impl_.high_)}},
226 }}, {{
227 65535, 65535
228 }}, {{
229 // int64 high = 1;
230 {PROTOBUF_FIELD_OFFSET(Int128, _impl_.high_), _Internal::kHasBitsOffset + 0, 0,
231 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
232 // uint64 low = 2;
233 {PROTOBUF_FIELD_OFFSET(Int128, _impl_.low_), _Internal::kHasBitsOffset + 1, 0,
234 (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
235 }},
236 // no aux_entries
237 {{
238 }},
239};
240PROTOBUF_NOINLINE void Int128::Clear() {
241// @@protoc_insertion_point(message_clear_start:operations_research.Int128)
242 ::google::protobuf::internal::TSanWrite(&_impl_);
243 ::uint32_t cached_has_bits = 0;
244 // Prevent compiler warnings about cached_has_bits being unused
245 (void) cached_has_bits;
246
247 cached_has_bits = _impl_._has_bits_[0];
248 if ((cached_has_bits & 0x00000003u) != 0) {
249 ::memset(&_impl_.high_, 0, static_cast<::size_t>(
250 reinterpret_cast<char*>(&_impl_.low_) -
251 reinterpret_cast<char*>(&_impl_.high_)) + sizeof(_impl_.low_));
252 }
253 _impl_._has_bits_.Clear();
254 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
255}
256
257#if defined(PROTOBUF_CUSTOM_VTABLE)
258::uint8_t* PROTOBUF_NONNULL Int128::_InternalSerialize(
259 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
260 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
261 const Int128& this_ = static_cast<const Int128&>(base);
262#else // PROTOBUF_CUSTOM_VTABLE
263::uint8_t* PROTOBUF_NONNULL Int128::_InternalSerialize(
264 ::uint8_t* PROTOBUF_NONNULL target,
265 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
266 const Int128& this_ = *this;
267#endif // PROTOBUF_CUSTOM_VTABLE
268 // @@protoc_insertion_point(serialize_to_array_start:operations_research.Int128)
269 ::uint32_t cached_has_bits = 0;
270 (void)cached_has_bits;
271
272 // int64 high = 1;
273 if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
274 if (this_._internal_high() != 0) {
275 target =
276 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
277 stream, this_._internal_high(), target);
278 }
279 }
280
281 // uint64 low = 2;
282 if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
283 if (this_._internal_low() != 0) {
284 target = stream->EnsureSpace(target);
285 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
286 2, this_._internal_low(), target);
287 }
288 }
289
290 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
291 target =
292 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
293 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
294 }
295 // @@protoc_insertion_point(serialize_to_array_end:operations_research.Int128)
296 return target;
297}
298
299#if defined(PROTOBUF_CUSTOM_VTABLE)
300::size_t Int128::ByteSizeLong(const MessageLite& base) {
301 const Int128& this_ = static_cast<const Int128&>(base);
302#else // PROTOBUF_CUSTOM_VTABLE
303::size_t Int128::ByteSizeLong() const {
304 const Int128& this_ = *this;
305#endif // PROTOBUF_CUSTOM_VTABLE
306 // @@protoc_insertion_point(message_byte_size_start:operations_research.Int128)
307 ::size_t total_size = 0;
308
309 ::uint32_t cached_has_bits = 0;
310 // Prevent compiler warnings about cached_has_bits being unused
311 (void)cached_has_bits;
312
313 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
314 cached_has_bits = this_._impl_._has_bits_[0];
315 if ((cached_has_bits & 0x00000003u) != 0) {
316 // int64 high = 1;
317 if ((cached_has_bits & 0x00000001u) != 0) {
318 if (this_._internal_high() != 0) {
319 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
320 this_._internal_high());
321 }
322 }
323 // uint64 low = 2;
324 if ((cached_has_bits & 0x00000002u) != 0) {
325 if (this_._internal_low() != 0) {
326 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
327 this_._internal_low());
328 }
329 }
330 }
331 return this_.MaybeComputeUnknownFieldsSize(total_size,
332 &this_._impl_._cached_size_);
333}
334
335void Int128::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
336 auto* const _this = static_cast<Int128*>(&to_msg);
337 auto& from = static_cast<const Int128&>(from_msg);
338 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.Int128)
339 ABSL_DCHECK_NE(&from, _this);
340 ::uint32_t cached_has_bits = 0;
341 (void) cached_has_bits;
342
343 cached_has_bits = from._impl_._has_bits_[0];
344 if ((cached_has_bits & 0x00000003u) != 0) {
345 if ((cached_has_bits & 0x00000001u) != 0) {
346 if (from._internal_high() != 0) {
347 _this->_impl_.high_ = from._impl_.high_;
348 }
349 }
350 if ((cached_has_bits & 0x00000002u) != 0) {
351 if (from._internal_low() != 0) {
352 _this->_impl_.low_ = from._impl_.low_;
353 }
354 }
355 }
356 _this->_impl_._has_bits_[0] |= cached_has_bits;
357 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
358}
359
360void Int128::CopyFrom(const Int128& from) {
361// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.Int128)
362 if (&from == this) return;
363 Clear();
364 MergeFrom(from);
365}
366
367
368void Int128::InternalSwap(Int128* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
369 using ::std::swap;
370 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
371 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
372 ::google::protobuf::internal::memswap<
373 PROTOBUF_FIELD_OFFSET(Int128, _impl_.low_)
374 + sizeof(Int128::_impl_.low_)
375 - PROTOBUF_FIELD_OFFSET(Int128, _impl_.high_)>(
376 reinterpret_cast<char*>(&_impl_.high_),
377 reinterpret_cast<char*>(&other->_impl_.high_));
378}
379
380::google::protobuf::Metadata Int128::GetMetadata() const {
381 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
382}
383// @@protoc_insertion_point(namespace_scope)
384} // namespace operations_research
385namespace google {
386namespace protobuf {
387} // namespace protobuf
388} // namespace google
389// @@protoc_insertion_point(global_scope)
390PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
391 _static_init2_ [[maybe_unused]] =
393 ::std::false_type{});
394#include "google/protobuf/port_undef.inc"
static PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::std::false_type _static_init2_
@protoc_insertion_point(global_scope)
static const ::_pb::Message *PROTOBUF_NONNULL const file_default_instances[]
decltype(::std::declval< 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:304
friend class ::google::protobuf::MessageLite
Definition int128.pb.h:250
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
Definition int128.pb.cc:159
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:264
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
Definition int128.pb.cc:241
::google::protobuf::Metadata GetMetadata() const
Definition int128.pb.cc:381
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:361
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
Definition int128.pb.cc:196
static constexpr auto InternalGenerateClassData_()
Definition int128.pb.cc:168
static constexpr auto InternalNewImpl_()
Definition int128.pb.cc:164
~Int128() PROTOBUF_FINAL
Definition int128.pb.cc:148
void MergeFrom(const Int128 &from)
Definition int128.pb.h:154
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
In SWIG mode, we don't want anything besides these top-level includes.
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:192
static constexpr ::_pbi::MigrationSchema *PROTOBUF_NULLABLE schemas
static const ::uint32_t offsets[]
Definition int128.pb.h:50