378 lines
15 KiB
C++
378 lines
15 KiB
C++
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
|
|
#ifndef FLATBUFFERS_GENERATED_GRAPH_ND4J_GRAPH_H_
|
|
#define FLATBUFFERS_GENERATED_GRAPH_ND4J_GRAPH_H_
|
|
|
|
#include "flatbuffers/flatbuffers.h"
|
|
|
|
#include "array_generated.h"
|
|
#include "config_generated.h"
|
|
#include "node_generated.h"
|
|
#include "properties_generated.h"
|
|
#include "request_generated.h"
|
|
#include "result_generated.h"
|
|
#include "utils_generated.h"
|
|
#include "variable_generated.h"
|
|
|
|
namespace sd {
|
|
namespace graph {
|
|
|
|
struct UpdaterState;
|
|
|
|
struct FlatGraph;
|
|
|
|
struct FlatDropRequest;
|
|
|
|
struct FlatResponse;
|
|
|
|
struct UpdaterState FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|
enum {
|
|
VT_PARAMNAME = 4,
|
|
VT_UPDATERSTATEKEYS = 6,
|
|
VT_UPDATERSTATEVALUES = 8
|
|
};
|
|
const flatbuffers::String *paramName() const {
|
|
return GetPointer<const flatbuffers::String *>(VT_PARAMNAME);
|
|
}
|
|
const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *updaterStateKeys() const {
|
|
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_UPDATERSTATEKEYS);
|
|
}
|
|
const flatbuffers::Vector<flatbuffers::Offset<FlatArray>> *updaterStateValues() const {
|
|
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<FlatArray>> *>(VT_UPDATERSTATEVALUES);
|
|
}
|
|
bool Verify(flatbuffers::Verifier &verifier) const {
|
|
return VerifyTableStart(verifier) &&
|
|
VerifyOffset(verifier, VT_PARAMNAME) &&
|
|
verifier.VerifyString(paramName()) &&
|
|
VerifyOffset(verifier, VT_UPDATERSTATEKEYS) &&
|
|
verifier.VerifyVector(updaterStateKeys()) &&
|
|
verifier.VerifyVectorOfStrings(updaterStateKeys()) &&
|
|
VerifyOffset(verifier, VT_UPDATERSTATEVALUES) &&
|
|
verifier.VerifyVector(updaterStateValues()) &&
|
|
verifier.VerifyVectorOfTables(updaterStateValues()) &&
|
|
verifier.EndTable();
|
|
}
|
|
};
|
|
|
|
struct UpdaterStateBuilder {
|
|
flatbuffers::FlatBufferBuilder &fbb_;
|
|
flatbuffers::uoffset_t start_;
|
|
void add_paramName(flatbuffers::Offset<flatbuffers::String> paramName) {
|
|
fbb_.AddOffset(UpdaterState::VT_PARAMNAME, paramName);
|
|
}
|
|
void add_updaterStateKeys(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> updaterStateKeys) {
|
|
fbb_.AddOffset(UpdaterState::VT_UPDATERSTATEKEYS, updaterStateKeys);
|
|
}
|
|
void add_updaterStateValues(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatArray>>> updaterStateValues) {
|
|
fbb_.AddOffset(UpdaterState::VT_UPDATERSTATEVALUES, updaterStateValues);
|
|
}
|
|
explicit UpdaterStateBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
|
: fbb_(_fbb) {
|
|
start_ = fbb_.StartTable();
|
|
}
|
|
UpdaterStateBuilder &operator=(const UpdaterStateBuilder &);
|
|
flatbuffers::Offset<UpdaterState> Finish() {
|
|
const auto end = fbb_.EndTable(start_);
|
|
auto o = flatbuffers::Offset<UpdaterState>(end);
|
|
return o;
|
|
}
|
|
};
|
|
|
|
inline flatbuffers::Offset<UpdaterState> CreateUpdaterState(
|
|
flatbuffers::FlatBufferBuilder &_fbb,
|
|
flatbuffers::Offset<flatbuffers::String> paramName = 0,
|
|
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> updaterStateKeys = 0,
|
|
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatArray>>> updaterStateValues = 0) {
|
|
UpdaterStateBuilder builder_(_fbb);
|
|
builder_.add_updaterStateValues(updaterStateValues);
|
|
builder_.add_updaterStateKeys(updaterStateKeys);
|
|
builder_.add_paramName(paramName);
|
|
return builder_.Finish();
|
|
}
|
|
|
|
inline flatbuffers::Offset<UpdaterState> CreateUpdaterStateDirect(
|
|
flatbuffers::FlatBufferBuilder &_fbb,
|
|
const char *paramName = nullptr,
|
|
const std::vector<flatbuffers::Offset<flatbuffers::String>> *updaterStateKeys = nullptr,
|
|
const std::vector<flatbuffers::Offset<FlatArray>> *updaterStateValues = nullptr) {
|
|
return sd::graph::CreateUpdaterState(
|
|
_fbb,
|
|
paramName ? _fbb.CreateString(paramName) : 0,
|
|
updaterStateKeys ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*updaterStateKeys) : 0,
|
|
updaterStateValues ? _fbb.CreateVector<flatbuffers::Offset<FlatArray>>(*updaterStateValues) : 0);
|
|
}
|
|
|
|
struct FlatGraph FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|
enum {
|
|
VT_ID = 4,
|
|
VT_VARIABLES = 6,
|
|
VT_NODES = 8,
|
|
VT_OUTPUTS = 10,
|
|
VT_CONFIGURATION = 12,
|
|
VT_PLACEHOLDERS = 14,
|
|
VT_LOSSVARIABLES = 16,
|
|
VT_TRAININGCONFIG = 18,
|
|
VT_UPDATERSTATE = 20
|
|
};
|
|
int64_t id() const {
|
|
return GetField<int64_t>(VT_ID, 0);
|
|
}
|
|
const flatbuffers::Vector<flatbuffers::Offset<FlatVariable>> *variables() const {
|
|
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<FlatVariable>> *>(VT_VARIABLES);
|
|
}
|
|
const flatbuffers::Vector<flatbuffers::Offset<FlatNode>> *nodes() const {
|
|
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<FlatNode>> *>(VT_NODES);
|
|
}
|
|
const flatbuffers::Vector<flatbuffers::Offset<IntPair>> *outputs() const {
|
|
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<IntPair>> *>(VT_OUTPUTS);
|
|
}
|
|
const FlatConfiguration *configuration() const {
|
|
return GetPointer<const FlatConfiguration *>(VT_CONFIGURATION);
|
|
}
|
|
const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *placeholders() const {
|
|
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_PLACEHOLDERS);
|
|
}
|
|
const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *lossVariables() const {
|
|
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_LOSSVARIABLES);
|
|
}
|
|
const flatbuffers::String *trainingConfig() const {
|
|
return GetPointer<const flatbuffers::String *>(VT_TRAININGCONFIG);
|
|
}
|
|
const flatbuffers::Vector<flatbuffers::Offset<UpdaterState>> *updaterState() const {
|
|
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<UpdaterState>> *>(VT_UPDATERSTATE);
|
|
}
|
|
bool Verify(flatbuffers::Verifier &verifier) const {
|
|
return VerifyTableStart(verifier) &&
|
|
VerifyField<int64_t>(verifier, VT_ID) &&
|
|
VerifyOffset(verifier, VT_VARIABLES) &&
|
|
verifier.VerifyVector(variables()) &&
|
|
verifier.VerifyVectorOfTables(variables()) &&
|
|
VerifyOffset(verifier, VT_NODES) &&
|
|
verifier.VerifyVector(nodes()) &&
|
|
verifier.VerifyVectorOfTables(nodes()) &&
|
|
VerifyOffset(verifier, VT_OUTPUTS) &&
|
|
verifier.VerifyVector(outputs()) &&
|
|
verifier.VerifyVectorOfTables(outputs()) &&
|
|
VerifyOffset(verifier, VT_CONFIGURATION) &&
|
|
verifier.VerifyTable(configuration()) &&
|
|
VerifyOffset(verifier, VT_PLACEHOLDERS) &&
|
|
verifier.VerifyVector(placeholders()) &&
|
|
verifier.VerifyVectorOfStrings(placeholders()) &&
|
|
VerifyOffset(verifier, VT_LOSSVARIABLES) &&
|
|
verifier.VerifyVector(lossVariables()) &&
|
|
verifier.VerifyVectorOfStrings(lossVariables()) &&
|
|
VerifyOffset(verifier, VT_TRAININGCONFIG) &&
|
|
verifier.VerifyString(trainingConfig()) &&
|
|
VerifyOffset(verifier, VT_UPDATERSTATE) &&
|
|
verifier.VerifyVector(updaterState()) &&
|
|
verifier.VerifyVectorOfTables(updaterState()) &&
|
|
verifier.EndTable();
|
|
}
|
|
};
|
|
|
|
struct FlatGraphBuilder {
|
|
flatbuffers::FlatBufferBuilder &fbb_;
|
|
flatbuffers::uoffset_t start_;
|
|
void add_id(int64_t id) {
|
|
fbb_.AddElement<int64_t>(FlatGraph::VT_ID, id, 0);
|
|
}
|
|
void add_variables(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatVariable>>> variables) {
|
|
fbb_.AddOffset(FlatGraph::VT_VARIABLES, variables);
|
|
}
|
|
void add_nodes(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatNode>>> nodes) {
|
|
fbb_.AddOffset(FlatGraph::VT_NODES, nodes);
|
|
}
|
|
void add_outputs(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<IntPair>>> outputs) {
|
|
fbb_.AddOffset(FlatGraph::VT_OUTPUTS, outputs);
|
|
}
|
|
void add_configuration(flatbuffers::Offset<FlatConfiguration> configuration) {
|
|
fbb_.AddOffset(FlatGraph::VT_CONFIGURATION, configuration);
|
|
}
|
|
void add_placeholders(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> placeholders) {
|
|
fbb_.AddOffset(FlatGraph::VT_PLACEHOLDERS, placeholders);
|
|
}
|
|
void add_lossVariables(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> lossVariables) {
|
|
fbb_.AddOffset(FlatGraph::VT_LOSSVARIABLES, lossVariables);
|
|
}
|
|
void add_trainingConfig(flatbuffers::Offset<flatbuffers::String> trainingConfig) {
|
|
fbb_.AddOffset(FlatGraph::VT_TRAININGCONFIG, trainingConfig);
|
|
}
|
|
void add_updaterState(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<UpdaterState>>> updaterState) {
|
|
fbb_.AddOffset(FlatGraph::VT_UPDATERSTATE, updaterState);
|
|
}
|
|
explicit FlatGraphBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
|
: fbb_(_fbb) {
|
|
start_ = fbb_.StartTable();
|
|
}
|
|
FlatGraphBuilder &operator=(const FlatGraphBuilder &);
|
|
flatbuffers::Offset<FlatGraph> Finish() {
|
|
const auto end = fbb_.EndTable(start_);
|
|
auto o = flatbuffers::Offset<FlatGraph>(end);
|
|
return o;
|
|
}
|
|
};
|
|
|
|
inline flatbuffers::Offset<FlatGraph> CreateFlatGraph(
|
|
flatbuffers::FlatBufferBuilder &_fbb,
|
|
int64_t id = 0,
|
|
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatVariable>>> variables = 0,
|
|
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatNode>>> nodes = 0,
|
|
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<IntPair>>> outputs = 0,
|
|
flatbuffers::Offset<FlatConfiguration> configuration = 0,
|
|
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> placeholders = 0,
|
|
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> lossVariables = 0,
|
|
flatbuffers::Offset<flatbuffers::String> trainingConfig = 0,
|
|
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<UpdaterState>>> updaterState = 0) {
|
|
FlatGraphBuilder builder_(_fbb);
|
|
builder_.add_id(id);
|
|
builder_.add_updaterState(updaterState);
|
|
builder_.add_trainingConfig(trainingConfig);
|
|
builder_.add_lossVariables(lossVariables);
|
|
builder_.add_placeholders(placeholders);
|
|
builder_.add_configuration(configuration);
|
|
builder_.add_outputs(outputs);
|
|
builder_.add_nodes(nodes);
|
|
builder_.add_variables(variables);
|
|
return builder_.Finish();
|
|
}
|
|
|
|
inline flatbuffers::Offset<FlatGraph> CreateFlatGraphDirect(
|
|
flatbuffers::FlatBufferBuilder &_fbb,
|
|
int64_t id = 0,
|
|
const std::vector<flatbuffers::Offset<FlatVariable>> *variables = nullptr,
|
|
const std::vector<flatbuffers::Offset<FlatNode>> *nodes = nullptr,
|
|
const std::vector<flatbuffers::Offset<IntPair>> *outputs = nullptr,
|
|
flatbuffers::Offset<FlatConfiguration> configuration = 0,
|
|
const std::vector<flatbuffers::Offset<flatbuffers::String>> *placeholders = nullptr,
|
|
const std::vector<flatbuffers::Offset<flatbuffers::String>> *lossVariables = nullptr,
|
|
const char *trainingConfig = nullptr,
|
|
const std::vector<flatbuffers::Offset<UpdaterState>> *updaterState = nullptr) {
|
|
return sd::graph::CreateFlatGraph(
|
|
_fbb,
|
|
id,
|
|
variables ? _fbb.CreateVector<flatbuffers::Offset<FlatVariable>>(*variables) : 0,
|
|
nodes ? _fbb.CreateVector<flatbuffers::Offset<FlatNode>>(*nodes) : 0,
|
|
outputs ? _fbb.CreateVector<flatbuffers::Offset<IntPair>>(*outputs) : 0,
|
|
configuration,
|
|
placeholders ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*placeholders) : 0,
|
|
lossVariables ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*lossVariables) : 0,
|
|
trainingConfig ? _fbb.CreateString(trainingConfig) : 0,
|
|
updaterState ? _fbb.CreateVector<flatbuffers::Offset<UpdaterState>>(*updaterState) : 0);
|
|
}
|
|
|
|
struct FlatDropRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|
enum {
|
|
VT_ID = 4
|
|
};
|
|
int64_t id() const {
|
|
return GetField<int64_t>(VT_ID, 0);
|
|
}
|
|
bool Verify(flatbuffers::Verifier &verifier) const {
|
|
return VerifyTableStart(verifier) &&
|
|
VerifyField<int64_t>(verifier, VT_ID) &&
|
|
verifier.EndTable();
|
|
}
|
|
};
|
|
|
|
struct FlatDropRequestBuilder {
|
|
flatbuffers::FlatBufferBuilder &fbb_;
|
|
flatbuffers::uoffset_t start_;
|
|
void add_id(int64_t id) {
|
|
fbb_.AddElement<int64_t>(FlatDropRequest::VT_ID, id, 0);
|
|
}
|
|
explicit FlatDropRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
|
: fbb_(_fbb) {
|
|
start_ = fbb_.StartTable();
|
|
}
|
|
FlatDropRequestBuilder &operator=(const FlatDropRequestBuilder &);
|
|
flatbuffers::Offset<FlatDropRequest> Finish() {
|
|
const auto end = fbb_.EndTable(start_);
|
|
auto o = flatbuffers::Offset<FlatDropRequest>(end);
|
|
return o;
|
|
}
|
|
};
|
|
|
|
inline flatbuffers::Offset<FlatDropRequest> CreateFlatDropRequest(
|
|
flatbuffers::FlatBufferBuilder &_fbb,
|
|
int64_t id = 0) {
|
|
FlatDropRequestBuilder builder_(_fbb);
|
|
builder_.add_id(id);
|
|
return builder_.Finish();
|
|
}
|
|
|
|
struct FlatResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|
enum {
|
|
VT_STATUS = 4
|
|
};
|
|
int32_t status() const {
|
|
return GetField<int32_t>(VT_STATUS, 0);
|
|
}
|
|
bool Verify(flatbuffers::Verifier &verifier) const {
|
|
return VerifyTableStart(verifier) &&
|
|
VerifyField<int32_t>(verifier, VT_STATUS) &&
|
|
verifier.EndTable();
|
|
}
|
|
};
|
|
|
|
struct FlatResponseBuilder {
|
|
flatbuffers::FlatBufferBuilder &fbb_;
|
|
flatbuffers::uoffset_t start_;
|
|
void add_status(int32_t status) {
|
|
fbb_.AddElement<int32_t>(FlatResponse::VT_STATUS, status, 0);
|
|
}
|
|
explicit FlatResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
|
: fbb_(_fbb) {
|
|
start_ = fbb_.StartTable();
|
|
}
|
|
FlatResponseBuilder &operator=(const FlatResponseBuilder &);
|
|
flatbuffers::Offset<FlatResponse> Finish() {
|
|
const auto end = fbb_.EndTable(start_);
|
|
auto o = flatbuffers::Offset<FlatResponse>(end);
|
|
return o;
|
|
}
|
|
};
|
|
|
|
inline flatbuffers::Offset<FlatResponse> CreateFlatResponse(
|
|
flatbuffers::FlatBufferBuilder &_fbb,
|
|
int32_t status = 0) {
|
|
FlatResponseBuilder builder_(_fbb);
|
|
builder_.add_status(status);
|
|
return builder_.Finish();
|
|
}
|
|
|
|
inline const sd::graph::FlatGraph *GetFlatGraph(const void *buf) {
|
|
return flatbuffers::GetRoot<sd::graph::FlatGraph>(buf);
|
|
}
|
|
|
|
inline const sd::graph::FlatGraph *GetSizePrefixedFlatGraph(const void *buf) {
|
|
return flatbuffers::GetSizePrefixedRoot<sd::graph::FlatGraph>(buf);
|
|
}
|
|
|
|
inline bool VerifyFlatGraphBuffer(
|
|
flatbuffers::Verifier &verifier) {
|
|
return verifier.VerifyBuffer<sd::graph::FlatGraph>(nullptr);
|
|
}
|
|
|
|
inline bool VerifySizePrefixedFlatGraphBuffer(
|
|
flatbuffers::Verifier &verifier) {
|
|
return verifier.VerifySizePrefixedBuffer<sd::graph::FlatGraph>(nullptr);
|
|
}
|
|
|
|
inline void FinishFlatGraphBuffer(
|
|
flatbuffers::FlatBufferBuilder &fbb,
|
|
flatbuffers::Offset<sd::graph::FlatGraph> root) {
|
|
fbb.Finish(root);
|
|
}
|
|
|
|
inline void FinishSizePrefixedFlatGraphBuffer(
|
|
flatbuffers::FlatBufferBuilder &fbb,
|
|
flatbuffers::Offset<sd::graph::FlatGraph> root) {
|
|
fbb.FinishSizePrefixed(root);
|
|
}
|
|
|
|
} // namespace graph
|
|
} // namespace sd
|
|
|
|
#endif // FLATBUFFERS_GENERATED_GRAPH_ND4J_GRAPH_H_
|