cavis/libnd4j/include/graph/generated/properties_generated.h

192 lines
6.8 KiB
C
Raw Normal View History

2019-06-06 14:21:15 +02:00
// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_PROPERTIES_ND4J_GRAPH_H_
#define FLATBUFFERS_GENERATED_PROPERTIES_ND4J_GRAPH_H_
#include "flatbuffers/flatbuffers.h"
#include "array_generated.h"
namespace nd4j {
namespace graph {
struct FlatProperties;
struct FlatProperties FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
enum {
VT_NAME = 4,
VT_I = 6,
VT_L = 8,
VT_D = 10,
VT_A = 12,
VT_B = 14,
VT_S = 16,
VT_SHAPE = 18
};
const flatbuffers::String *name() const {
return GetPointer<const flatbuffers::String *>(VT_NAME);
}
const flatbuffers::Vector<int32_t> *i() const {
return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_I);
}
const flatbuffers::Vector<int64_t> *l() const {
return GetPointer<const flatbuffers::Vector<int64_t> *>(VT_L);
}
const flatbuffers::Vector<double> *d() const {
return GetPointer<const flatbuffers::Vector<double> *>(VT_D);
}
const flatbuffers::Vector<flatbuffers::Offset<FlatArray>> *a() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<FlatArray>> *>(VT_A);
}
const flatbuffers::Vector<uint8_t> *b() const {
return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_B);
}
const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *s() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_S);
}
const flatbuffers::Vector<int32_t> *shape() const {
return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_SHAPE);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_NAME) &&
verifier.VerifyString(name()) &&
VerifyOffset(verifier, VT_I) &&
verifier.VerifyVector(i()) &&
VerifyOffset(verifier, VT_L) &&
verifier.VerifyVector(l()) &&
VerifyOffset(verifier, VT_D) &&
verifier.VerifyVector(d()) &&
VerifyOffset(verifier, VT_A) &&
verifier.VerifyVector(a()) &&
verifier.VerifyVectorOfTables(a()) &&
VerifyOffset(verifier, VT_B) &&
verifier.VerifyVector(b()) &&
VerifyOffset(verifier, VT_S) &&
verifier.VerifyVector(s()) &&
verifier.VerifyVectorOfStrings(s()) &&
VerifyOffset(verifier, VT_SHAPE) &&
verifier.VerifyVector(shape()) &&
verifier.EndTable();
}
};
struct FlatPropertiesBuilder {
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_name(flatbuffers::Offset<flatbuffers::String> name) {
fbb_.AddOffset(FlatProperties::VT_NAME, name);
}
void add_i(flatbuffers::Offset<flatbuffers::Vector<int32_t>> i) {
fbb_.AddOffset(FlatProperties::VT_I, i);
}
void add_l(flatbuffers::Offset<flatbuffers::Vector<int64_t>> l) {
fbb_.AddOffset(FlatProperties::VT_L, l);
}
void add_d(flatbuffers::Offset<flatbuffers::Vector<double>> d) {
fbb_.AddOffset(FlatProperties::VT_D, d);
}
void add_a(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatArray>>> a) {
fbb_.AddOffset(FlatProperties::VT_A, a);
}
void add_b(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> b) {
fbb_.AddOffset(FlatProperties::VT_B, b);
}
void add_s(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> s) {
fbb_.AddOffset(FlatProperties::VT_S, s);
}
void add_shape(flatbuffers::Offset<flatbuffers::Vector<int32_t>> shape) {
fbb_.AddOffset(FlatProperties::VT_SHAPE, shape);
}
explicit FlatPropertiesBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
FlatPropertiesBuilder &operator=(const FlatPropertiesBuilder &);
flatbuffers::Offset<FlatProperties> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<FlatProperties>(end);
return o;
}
};
inline flatbuffers::Offset<FlatProperties> CreateFlatProperties(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::String> name = 0,
flatbuffers::Offset<flatbuffers::Vector<int32_t>> i = 0,
flatbuffers::Offset<flatbuffers::Vector<int64_t>> l = 0,
flatbuffers::Offset<flatbuffers::Vector<double>> d = 0,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatArray>>> a = 0,
flatbuffers::Offset<flatbuffers::Vector<uint8_t>> b = 0,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> s = 0,
flatbuffers::Offset<flatbuffers::Vector<int32_t>> shape = 0) {
FlatPropertiesBuilder builder_(_fbb);
builder_.add_shape(shape);
builder_.add_s(s);
builder_.add_b(b);
builder_.add_a(a);
builder_.add_d(d);
builder_.add_l(l);
builder_.add_i(i);
builder_.add_name(name);
return builder_.Finish();
}
inline flatbuffers::Offset<FlatProperties> CreateFlatPropertiesDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const char *name = nullptr,
const std::vector<int32_t> *i = nullptr,
const std::vector<int64_t> *l = nullptr,
const std::vector<double> *d = nullptr,
const std::vector<flatbuffers::Offset<FlatArray>> *a = nullptr,
const std::vector<uint8_t> *b = nullptr,
const std::vector<flatbuffers::Offset<flatbuffers::String>> *s = nullptr,
const std::vector<int32_t> *shape = nullptr) {
return nd4j::graph::CreateFlatProperties(
_fbb,
name ? _fbb.CreateString(name) : 0,
i ? _fbb.CreateVector<int32_t>(*i) : 0,
l ? _fbb.CreateVector<int64_t>(*l) : 0,
d ? _fbb.CreateVector<double>(*d) : 0,
a ? _fbb.CreateVector<flatbuffers::Offset<FlatArray>>(*a) : 0,
b ? _fbb.CreateVector<uint8_t>(*b) : 0,
s ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*s) : 0,
shape ? _fbb.CreateVector<int32_t>(*shape) : 0);
}
inline const nd4j::graph::FlatProperties *GetFlatProperties(const void *buf) {
return flatbuffers::GetRoot<nd4j::graph::FlatProperties>(buf);
}
inline const nd4j::graph::FlatProperties *GetSizePrefixedFlatProperties(const void *buf) {
return flatbuffers::GetSizePrefixedRoot<nd4j::graph::FlatProperties>(buf);
}
inline bool VerifyFlatPropertiesBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifyBuffer<nd4j::graph::FlatProperties>(nullptr);
}
inline bool VerifySizePrefixedFlatPropertiesBuffer(
flatbuffers::Verifier &verifier) {
return verifier.VerifySizePrefixedBuffer<nd4j::graph::FlatProperties>(nullptr);
}
inline void FinishFlatPropertiesBuffer(
flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<nd4j::graph::FlatProperties> root) {
fbb.Finish(root);
}
inline void FinishSizePrefixedFlatPropertiesBuffer(
flatbuffers::FlatBufferBuilder &fbb,
flatbuffers::Offset<nd4j::graph::FlatProperties> root) {
fbb.FinishSizePrefixed(root);
}
} // namespace graph
} // namespace nd4j
#endif // FLATBUFFERS_GENERATED_PROPERTIES_ND4J_GRAPH_H_