-
Notifications
You must be signed in to change notification settings - Fork 5
/
PartitionInfo_generated.h
513 lines (475 loc) · 17.6 KB
/
PartitionInfo_generated.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_PARTITIONINFO_PARTITIONINFO_H_
#define FLATBUFFERS_GENERATED_PARTITIONINFO_PARTITIONINFO_H_
#include "flatbuffers/flatbuffers.h"
// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
FLATBUFFERS_VERSION_MINOR == 3 &&
FLATBUFFERS_VERSION_REVISION == 25,
"Non-compatible flatbuffers version included");
namespace PartitionInfo {
struct PartitionLog;
struct PartitionLogBuilder;
struct GraphMetadata;
struct GraphMetadataBuilder;
struct PartitionConfiguration;
struct PartitionConfigurationBuilder;
struct RunTime;
struct RunTimeBuilder;
struct PartitionMetrics;
struct PartitionMetricsBuilder;
struct MemoryConsumption;
struct MemoryConsumptionBuilder;
struct PartitionLog FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
typedef PartitionLogBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_GRAPH_METADATA = 4,
VT_PARTITION_CONFIGURATION = 6,
VT_RUNTIME = 8,
VT_MEMORY_CONSUMPTION = 10,
VT_METRICS = 12
};
const PartitionInfo::GraphMetadata *graph_metadata() const {
return GetPointer<const PartitionInfo::GraphMetadata *>(VT_GRAPH_METADATA);
}
const PartitionInfo::PartitionConfiguration *partition_configuration() const {
return GetPointer<const PartitionInfo::PartitionConfiguration *>(VT_PARTITION_CONFIGURATION);
}
const PartitionInfo::RunTime *runtime() const {
return GetPointer<const PartitionInfo::RunTime *>(VT_RUNTIME);
}
const PartitionInfo::MemoryConsumption *memory_consumption() const {
return GetPointer<const PartitionInfo::MemoryConsumption *>(VT_MEMORY_CONSUMPTION);
}
const PartitionInfo::PartitionMetrics *metrics() const {
return GetPointer<const PartitionInfo::PartitionMetrics *>(VT_METRICS);
}
bool Verify(::flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_GRAPH_METADATA) &&
verifier.VerifyTable(graph_metadata()) &&
VerifyOffset(verifier, VT_PARTITION_CONFIGURATION) &&
verifier.VerifyTable(partition_configuration()) &&
VerifyOffset(verifier, VT_RUNTIME) &&
verifier.VerifyTable(runtime()) &&
VerifyOffset(verifier, VT_MEMORY_CONSUMPTION) &&
verifier.VerifyTable(memory_consumption()) &&
VerifyOffset(verifier, VT_METRICS) &&
verifier.VerifyTable(metrics()) &&
verifier.EndTable();
}
};
struct PartitionLogBuilder {
typedef PartitionLog Table;
::flatbuffers::FlatBufferBuilder &fbb_;
::flatbuffers::uoffset_t start_;
void add_graph_metadata(::flatbuffers::Offset<PartitionInfo::GraphMetadata> graph_metadata) {
fbb_.AddOffset(PartitionLog::VT_GRAPH_METADATA, graph_metadata);
}
void add_partition_configuration(::flatbuffers::Offset<PartitionInfo::PartitionConfiguration> partition_configuration) {
fbb_.AddOffset(PartitionLog::VT_PARTITION_CONFIGURATION, partition_configuration);
}
void add_runtime(::flatbuffers::Offset<PartitionInfo::RunTime> runtime) {
fbb_.AddOffset(PartitionLog::VT_RUNTIME, runtime);
}
void add_memory_consumption(::flatbuffers::Offset<PartitionInfo::MemoryConsumption> memory_consumption) {
fbb_.AddOffset(PartitionLog::VT_MEMORY_CONSUMPTION, memory_consumption);
}
void add_metrics(::flatbuffers::Offset<PartitionInfo::PartitionMetrics> metrics) {
fbb_.AddOffset(PartitionLog::VT_METRICS, metrics);
}
explicit PartitionLogBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
::flatbuffers::Offset<PartitionLog> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = ::flatbuffers::Offset<PartitionLog>(end);
return o;
}
};
inline ::flatbuffers::Offset<PartitionLog> CreatePartitionLog(
::flatbuffers::FlatBufferBuilder &_fbb,
::flatbuffers::Offset<PartitionInfo::GraphMetadata> graph_metadata = 0,
::flatbuffers::Offset<PartitionInfo::PartitionConfiguration> partition_configuration = 0,
::flatbuffers::Offset<PartitionInfo::RunTime> runtime = 0,
::flatbuffers::Offset<PartitionInfo::MemoryConsumption> memory_consumption = 0,
::flatbuffers::Offset<PartitionInfo::PartitionMetrics> metrics = 0) {
PartitionLogBuilder builder_(_fbb);
builder_.add_metrics(metrics);
builder_.add_memory_consumption(memory_consumption);
builder_.add_runtime(runtime);
builder_.add_partition_configuration(partition_configuration);
builder_.add_graph_metadata(graph_metadata);
return builder_.Finish();
}
struct GraphMetadata FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
typedef GraphMetadataBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_FILENAME = 4,
VT_NUM_NODES = 6,
VT_NUM_EDGES = 8
};
const ::flatbuffers::String *filename() const {
return GetPointer<const ::flatbuffers::String *>(VT_FILENAME);
}
uint64_t num_nodes() const {
return GetField<uint64_t>(VT_NUM_NODES, 0);
}
uint64_t num_edges() const {
return GetField<uint64_t>(VT_NUM_EDGES, 0);
}
bool Verify(::flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_FILENAME) &&
verifier.VerifyString(filename()) &&
VerifyField<uint64_t>(verifier, VT_NUM_NODES, 8) &&
VerifyField<uint64_t>(verifier, VT_NUM_EDGES, 8) &&
verifier.EndTable();
}
};
struct GraphMetadataBuilder {
typedef GraphMetadata Table;
::flatbuffers::FlatBufferBuilder &fbb_;
::flatbuffers::uoffset_t start_;
void add_filename(::flatbuffers::Offset<::flatbuffers::String> filename) {
fbb_.AddOffset(GraphMetadata::VT_FILENAME, filename);
}
void add_num_nodes(uint64_t num_nodes) {
fbb_.AddElement<uint64_t>(GraphMetadata::VT_NUM_NODES, num_nodes, 0);
}
void add_num_edges(uint64_t num_edges) {
fbb_.AddElement<uint64_t>(GraphMetadata::VT_NUM_EDGES, num_edges, 0);
}
explicit GraphMetadataBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
::flatbuffers::Offset<GraphMetadata> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = ::flatbuffers::Offset<GraphMetadata>(end);
return o;
}
};
inline ::flatbuffers::Offset<GraphMetadata> CreateGraphMetadata(
::flatbuffers::FlatBufferBuilder &_fbb,
::flatbuffers::Offset<::flatbuffers::String> filename = 0,
uint64_t num_nodes = 0,
uint64_t num_edges = 0) {
GraphMetadataBuilder builder_(_fbb);
builder_.add_num_edges(num_edges);
builder_.add_num_nodes(num_nodes);
builder_.add_filename(filename);
return builder_.Finish();
}
inline ::flatbuffers::Offset<GraphMetadata> CreateGraphMetadataDirect(
::flatbuffers::FlatBufferBuilder &_fbb,
const char *filename = nullptr,
uint64_t num_nodes = 0,
uint64_t num_edges = 0) {
auto filename__ = filename ? _fbb.CreateString(filename) : 0;
return PartitionInfo::CreateGraphMetadata(
_fbb,
filename__,
num_nodes,
num_edges);
}
struct PartitionConfiguration FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
typedef PartitionConfigurationBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_K = 4,
VT_SEED = 6,
VT_STREAM_BUFFER = 8,
VT_MODEL_MODE = 10,
VT_ALPHA = 12
};
uint32_t k() const {
return GetField<uint32_t>(VT_K, 0);
}
int32_t seed() const {
return GetField<int32_t>(VT_SEED, 0);
}
uint64_t stream_buffer() const {
return GetField<uint64_t>(VT_STREAM_BUFFER, 0);
}
int32_t model_mode() const {
return GetField<int32_t>(VT_MODEL_MODE, 0);
}
int32_t alpha() const {
return GetField<int32_t>(VT_ALPHA, 0);
}
bool Verify(::flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<uint32_t>(verifier, VT_K, 4) &&
VerifyField<int32_t>(verifier, VT_SEED, 4) &&
VerifyField<uint64_t>(verifier, VT_STREAM_BUFFER, 8) &&
VerifyField<int32_t>(verifier, VT_MODEL_MODE, 4) &&
VerifyField<int32_t>(verifier, VT_ALPHA, 4) &&
verifier.EndTable();
}
};
struct PartitionConfigurationBuilder {
typedef PartitionConfiguration Table;
::flatbuffers::FlatBufferBuilder &fbb_;
::flatbuffers::uoffset_t start_;
void add_k(uint32_t k) {
fbb_.AddElement<uint32_t>(PartitionConfiguration::VT_K, k, 0);
}
void add_seed(int32_t seed) {
fbb_.AddElement<int32_t>(PartitionConfiguration::VT_SEED, seed, 0);
}
void add_stream_buffer(uint64_t stream_buffer) {
fbb_.AddElement<uint64_t>(PartitionConfiguration::VT_STREAM_BUFFER, stream_buffer, 0);
}
void add_model_mode(int32_t model_mode) {
fbb_.AddElement<int32_t>(PartitionConfiguration::VT_MODEL_MODE, model_mode, 0);
}
void add_alpha(int32_t alpha) {
fbb_.AddElement<int32_t>(PartitionConfiguration::VT_ALPHA, alpha, 0);
}
explicit PartitionConfigurationBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
::flatbuffers::Offset<PartitionConfiguration> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = ::flatbuffers::Offset<PartitionConfiguration>(end);
return o;
}
};
inline ::flatbuffers::Offset<PartitionConfiguration> CreatePartitionConfiguration(
::flatbuffers::FlatBufferBuilder &_fbb,
uint32_t k = 0,
int32_t seed = 0,
uint64_t stream_buffer = 0,
int32_t model_mode = 0,
int32_t alpha = 0) {
PartitionConfigurationBuilder builder_(_fbb);
builder_.add_stream_buffer(stream_buffer);
builder_.add_alpha(alpha);
builder_.add_model_mode(model_mode);
builder_.add_seed(seed);
builder_.add_k(k);
return builder_.Finish();
}
struct RunTime FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
typedef RunTimeBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_IO_TIME = 4,
VT_PARTITION_TIME = 6,
VT_MODEL_CONSTRUCTION_TIME = 8,
VT_MAPPING_TIME = 10,
VT_TOTAL_TIME = 12
};
double io_time() const {
return GetField<double>(VT_IO_TIME, 0.0);
}
double partition_time() const {
return GetField<double>(VT_PARTITION_TIME, 0.0);
}
double model_construction_time() const {
return GetField<double>(VT_MODEL_CONSTRUCTION_TIME, 0.0);
}
double mapping_time() const {
return GetField<double>(VT_MAPPING_TIME, 0.0);
}
double total_time() const {
return GetField<double>(VT_TOTAL_TIME, 0.0);
}
bool Verify(::flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<double>(verifier, VT_IO_TIME, 8) &&
VerifyField<double>(verifier, VT_PARTITION_TIME, 8) &&
VerifyField<double>(verifier, VT_MODEL_CONSTRUCTION_TIME, 8) &&
VerifyField<double>(verifier, VT_MAPPING_TIME, 8) &&
VerifyField<double>(verifier, VT_TOTAL_TIME, 8) &&
verifier.EndTable();
}
};
struct RunTimeBuilder {
typedef RunTime Table;
::flatbuffers::FlatBufferBuilder &fbb_;
::flatbuffers::uoffset_t start_;
void add_io_time(double io_time) {
fbb_.AddElement<double>(RunTime::VT_IO_TIME, io_time, 0.0);
}
void add_partition_time(double partition_time) {
fbb_.AddElement<double>(RunTime::VT_PARTITION_TIME, partition_time, 0.0);
}
void add_model_construction_time(double model_construction_time) {
fbb_.AddElement<double>(RunTime::VT_MODEL_CONSTRUCTION_TIME, model_construction_time, 0.0);
}
void add_mapping_time(double mapping_time) {
fbb_.AddElement<double>(RunTime::VT_MAPPING_TIME, mapping_time, 0.0);
}
void add_total_time(double total_time) {
fbb_.AddElement<double>(RunTime::VT_TOTAL_TIME, total_time, 0.0);
}
explicit RunTimeBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
::flatbuffers::Offset<RunTime> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = ::flatbuffers::Offset<RunTime>(end);
return o;
}
};
inline ::flatbuffers::Offset<RunTime> CreateRunTime(
::flatbuffers::FlatBufferBuilder &_fbb,
double io_time = 0.0,
double partition_time = 0.0,
double model_construction_time = 0.0,
double mapping_time = 0.0,
double total_time = 0.0) {
RunTimeBuilder builder_(_fbb);
builder_.add_total_time(total_time);
builder_.add_mapping_time(mapping_time);
builder_.add_model_construction_time(model_construction_time);
builder_.add_partition_time(partition_time);
builder_.add_io_time(io_time);
return builder_.Finish();
}
struct PartitionMetrics FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
typedef PartitionMetricsBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_EDGE_CUT = 4,
VT_VERTEX_CUT = 6,
VT_REPLICAS = 8,
VT_REPLICATION_FACTOR = 10,
VT_BALANCE = 12
};
int32_t edge_cut() const {
return GetField<int32_t>(VT_EDGE_CUT, 0);
}
uint32_t vertex_cut() const {
return GetField<uint32_t>(VT_VERTEX_CUT, 0);
}
uint32_t replicas() const {
return GetField<uint32_t>(VT_REPLICAS, 0);
}
double replication_factor() const {
return GetField<double>(VT_REPLICATION_FACTOR, 0.0);
}
double balance() const {
return GetField<double>(VT_BALANCE, 0.0);
}
bool Verify(::flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<int32_t>(verifier, VT_EDGE_CUT, 4) &&
VerifyField<uint32_t>(verifier, VT_VERTEX_CUT, 4) &&
VerifyField<uint32_t>(verifier, VT_REPLICAS, 4) &&
VerifyField<double>(verifier, VT_REPLICATION_FACTOR, 8) &&
VerifyField<double>(verifier, VT_BALANCE, 8) &&
verifier.EndTable();
}
};
struct PartitionMetricsBuilder {
typedef PartitionMetrics Table;
::flatbuffers::FlatBufferBuilder &fbb_;
::flatbuffers::uoffset_t start_;
void add_edge_cut(int32_t edge_cut) {
fbb_.AddElement<int32_t>(PartitionMetrics::VT_EDGE_CUT, edge_cut, 0);
}
void add_vertex_cut(uint32_t vertex_cut) {
fbb_.AddElement<uint32_t>(PartitionMetrics::VT_VERTEX_CUT, vertex_cut, 0);
}
void add_replicas(uint32_t replicas) {
fbb_.AddElement<uint32_t>(PartitionMetrics::VT_REPLICAS, replicas, 0);
}
void add_replication_factor(double replication_factor) {
fbb_.AddElement<double>(PartitionMetrics::VT_REPLICATION_FACTOR, replication_factor, 0.0);
}
void add_balance(double balance) {
fbb_.AddElement<double>(PartitionMetrics::VT_BALANCE, balance, 0.0);
}
explicit PartitionMetricsBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
::flatbuffers::Offset<PartitionMetrics> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = ::flatbuffers::Offset<PartitionMetrics>(end);
return o;
}
};
inline ::flatbuffers::Offset<PartitionMetrics> CreatePartitionMetrics(
::flatbuffers::FlatBufferBuilder &_fbb,
int32_t edge_cut = 0,
uint32_t vertex_cut = 0,
uint32_t replicas = 0,
double replication_factor = 0.0,
double balance = 0.0) {
PartitionMetricsBuilder builder_(_fbb);
builder_.add_balance(balance);
builder_.add_replication_factor(replication_factor);
builder_.add_replicas(replicas);
builder_.add_vertex_cut(vertex_cut);
builder_.add_edge_cut(edge_cut);
return builder_.Finish();
}
struct MemoryConsumption FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
typedef MemoryConsumptionBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_MAX_RSS = 4
};
int64_t max_rss() const {
return GetField<int64_t>(VT_MAX_RSS, 0);
}
bool Verify(::flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<int64_t>(verifier, VT_MAX_RSS, 8) &&
verifier.EndTable();
}
};
struct MemoryConsumptionBuilder {
typedef MemoryConsumption Table;
::flatbuffers::FlatBufferBuilder &fbb_;
::flatbuffers::uoffset_t start_;
void add_max_rss(int64_t max_rss) {
fbb_.AddElement<int64_t>(MemoryConsumption::VT_MAX_RSS, max_rss, 0);
}
explicit MemoryConsumptionBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
::flatbuffers::Offset<MemoryConsumption> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = ::flatbuffers::Offset<MemoryConsumption>(end);
return o;
}
};
inline ::flatbuffers::Offset<MemoryConsumption> CreateMemoryConsumption(
::flatbuffers::FlatBufferBuilder &_fbb,
int64_t max_rss = 0) {
MemoryConsumptionBuilder builder_(_fbb);
builder_.add_max_rss(max_rss);
return builder_.Finish();
}
inline const PartitionInfo::PartitionLog *GetPartitionLog(const void *buf) {
return ::flatbuffers::GetRoot<PartitionInfo::PartitionLog>(buf);
}
inline const PartitionInfo::PartitionLog *GetSizePrefixedPartitionLog(const void *buf) {
return ::flatbuffers::GetSizePrefixedRoot<PartitionInfo::PartitionLog>(buf);
}
inline bool VerifyPartitionLogBuffer(
::flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<PartitionInfo::PartitionLog>(nullptr);
}
inline bool VerifySizePrefixedPartitionLogBuffer(
::flatbuffers::Verifier &verifier) {
return verifier.VerifySizePrefixedBuffer<PartitionInfo::PartitionLog>(nullptr);
}
inline void FinishPartitionLogBuffer(
::flatbuffers::FlatBufferBuilder &fbb,
::flatbuffers::Offset<PartitionInfo::PartitionLog> root) {
fbb.Finish(root);
}
inline void FinishSizePrefixedPartitionLogBuffer(
::flatbuffers::FlatBufferBuilder &fbb,
::flatbuffers::Offset<PartitionInfo::PartitionLog> root) {
fbb.FinishSizePrefixed(root);
}
} // namespace PartitionInfo
#endif // FLATBUFFERS_GENERATED_PARTITIONINFO_PARTITIONINFO_H_