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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// automatically generated by the FlatBuffers compiler, do not modify
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
#ifndef FLATBUFFERS_GENERATED_VKGRAPH_VKGRAPH_H_
|
| 5 |
+
#define FLATBUFFERS_GENERATED_VKGRAPH_VKGRAPH_H_
|
| 6 |
+
|
| 7 |
+
#include "flatbuffers/flatbuffers.h"
|
| 8 |
+
|
| 9 |
+
// Ensure the included flatbuffers.h is the same version as when this file was
|
| 10 |
+
// generated, otherwise it may not be compatible.
|
| 11 |
+
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
|
| 12 |
+
FLATBUFFERS_VERSION_MINOR == 3 &&
|
| 13 |
+
FLATBUFFERS_VERSION_REVISION == 25,
|
| 14 |
+
"Non-compatible flatbuffers version included");
|
| 15 |
+
|
| 16 |
+
namespace vkgraph {
|
| 17 |
+
|
| 18 |
+
struct OperatorCall;
|
| 19 |
+
struct OperatorCallBuilder;
|
| 20 |
+
|
| 21 |
+
struct VkTensor;
|
| 22 |
+
struct VkTensorBuilder;
|
| 23 |
+
|
| 24 |
+
struct Null;
|
| 25 |
+
struct NullBuilder;
|
| 26 |
+
|
| 27 |
+
struct Int;
|
| 28 |
+
struct IntBuilder;
|
| 29 |
+
|
| 30 |
+
struct Bool;
|
| 31 |
+
struct BoolBuilder;
|
| 32 |
+
|
| 33 |
+
struct Double;
|
| 34 |
+
struct DoubleBuilder;
|
| 35 |
+
|
| 36 |
+
struct String;
|
| 37 |
+
struct StringBuilder;
|
| 38 |
+
|
| 39 |
+
struct IntList;
|
| 40 |
+
struct IntListBuilder;
|
| 41 |
+
|
| 42 |
+
struct DoubleList;
|
| 43 |
+
struct DoubleListBuilder;
|
| 44 |
+
|
| 45 |
+
struct BoolList;
|
| 46 |
+
struct BoolListBuilder;
|
| 47 |
+
|
| 48 |
+
struct ValueList;
|
| 49 |
+
struct ValueListBuilder;
|
| 50 |
+
|
| 51 |
+
struct SymInt;
|
| 52 |
+
struct SymIntBuilder;
|
| 53 |
+
|
| 54 |
+
struct VkValue;
|
| 55 |
+
struct VkValueBuilder;
|
| 56 |
+
|
| 57 |
+
struct VkBytes;
|
| 58 |
+
struct VkBytesBuilder;
|
| 59 |
+
|
| 60 |
+
struct VkGraph;
|
| 61 |
+
struct VkGraphBuilder;
|
| 62 |
+
|
| 63 |
+
enum VkDataType : int8_t {
|
| 64 |
+
VkDataType_BOOL = 0,
|
| 65 |
+
VkDataType_UINT8 = 1,
|
| 66 |
+
VkDataType_INT8 = 2,
|
| 67 |
+
VkDataType_INT32 = 3,
|
| 68 |
+
VkDataType_FLOAT16 = 4,
|
| 69 |
+
VkDataType_FLOAT32 = 5,
|
| 70 |
+
VkDataType_FLOAT64 = 6,
|
| 71 |
+
VkDataType_INT64 = 7,
|
| 72 |
+
VkDataType_UNSET = 127,
|
| 73 |
+
VkDataType_MIN = VkDataType_BOOL,
|
| 74 |
+
VkDataType_MAX = VkDataType_UNSET
|
| 75 |
+
};
|
| 76 |
+
|
| 77 |
+
inline const VkDataType (&EnumValuesVkDataType())[9] {
|
| 78 |
+
static const VkDataType values[] = {
|
| 79 |
+
VkDataType_BOOL,
|
| 80 |
+
VkDataType_UINT8,
|
| 81 |
+
VkDataType_INT8,
|
| 82 |
+
VkDataType_INT32,
|
| 83 |
+
VkDataType_FLOAT16,
|
| 84 |
+
VkDataType_FLOAT32,
|
| 85 |
+
VkDataType_FLOAT64,
|
| 86 |
+
VkDataType_INT64,
|
| 87 |
+
VkDataType_UNSET
|
| 88 |
+
};
|
| 89 |
+
return values;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
inline const char *EnumNameVkDataType(VkDataType e) {
|
| 93 |
+
switch (e) {
|
| 94 |
+
case VkDataType_BOOL: return "BOOL";
|
| 95 |
+
case VkDataType_UINT8: return "UINT8";
|
| 96 |
+
case VkDataType_INT8: return "INT8";
|
| 97 |
+
case VkDataType_INT32: return "INT32";
|
| 98 |
+
case VkDataType_FLOAT16: return "FLOAT16";
|
| 99 |
+
case VkDataType_FLOAT32: return "FLOAT32";
|
| 100 |
+
case VkDataType_FLOAT64: return "FLOAT64";
|
| 101 |
+
case VkDataType_INT64: return "INT64";
|
| 102 |
+
case VkDataType_UNSET: return "UNSET";
|
| 103 |
+
default: return "";
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
enum VkStorageType : uint8_t {
|
| 108 |
+
VkStorageType_BUFFER = 0,
|
| 109 |
+
VkStorageType_TEXTURE_3D = 1,
|
| 110 |
+
VkStorageType_TEXTURE_2D = 2,
|
| 111 |
+
VkStorageType_DEFAULT_STORAGE = 255,
|
| 112 |
+
VkStorageType_MIN = VkStorageType_BUFFER,
|
| 113 |
+
VkStorageType_MAX = VkStorageType_DEFAULT_STORAGE
|
| 114 |
+
};
|
| 115 |
+
|
| 116 |
+
inline const VkStorageType (&EnumValuesVkStorageType())[4] {
|
| 117 |
+
static const VkStorageType values[] = {
|
| 118 |
+
VkStorageType_BUFFER,
|
| 119 |
+
VkStorageType_TEXTURE_3D,
|
| 120 |
+
VkStorageType_TEXTURE_2D,
|
| 121 |
+
VkStorageType_DEFAULT_STORAGE
|
| 122 |
+
};
|
| 123 |
+
return values;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
inline const char *EnumNameVkStorageType(VkStorageType e) {
|
| 127 |
+
switch (e) {
|
| 128 |
+
case VkStorageType_BUFFER: return "BUFFER";
|
| 129 |
+
case VkStorageType_TEXTURE_3D: return "TEXTURE_3D";
|
| 130 |
+
case VkStorageType_TEXTURE_2D: return "TEXTURE_2D";
|
| 131 |
+
case VkStorageType_DEFAULT_STORAGE: return "DEFAULT_STORAGE";
|
| 132 |
+
default: return "";
|
| 133 |
+
}
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
enum VkMemoryLayout : uint8_t {
|
| 137 |
+
VkMemoryLayout_TENSOR_WIDTH_PACKED = 0,
|
| 138 |
+
VkMemoryLayout_TENSOR_HEIGHT_PACKED = 1,
|
| 139 |
+
VkMemoryLayout_TENSOR_CHANNELS_PACKED = 2,
|
| 140 |
+
VkMemoryLayout_PACKED_INT8_4W4C = 3,
|
| 141 |
+
VkMemoryLayout_PACKED_INT8_4H4W = 4,
|
| 142 |
+
VkMemoryLayout_PACKED_INT8_4W = 5,
|
| 143 |
+
VkMemoryLayout_PACKED_INT8_4C = 6,
|
| 144 |
+
VkMemoryLayout_PACKED_INT8_4C1W = 8,
|
| 145 |
+
VkMemoryLayout_PACKED_INT8_CONV2D = 9,
|
| 146 |
+
VkMemoryLayout_DEFAULT_LAYOUT = 255,
|
| 147 |
+
VkMemoryLayout_MIN = VkMemoryLayout_TENSOR_WIDTH_PACKED,
|
| 148 |
+
VkMemoryLayout_MAX = VkMemoryLayout_DEFAULT_LAYOUT
|
| 149 |
+
};
|
| 150 |
+
|
| 151 |
+
inline const VkMemoryLayout (&EnumValuesVkMemoryLayout())[10] {
|
| 152 |
+
static const VkMemoryLayout values[] = {
|
| 153 |
+
VkMemoryLayout_TENSOR_WIDTH_PACKED,
|
| 154 |
+
VkMemoryLayout_TENSOR_HEIGHT_PACKED,
|
| 155 |
+
VkMemoryLayout_TENSOR_CHANNELS_PACKED,
|
| 156 |
+
VkMemoryLayout_PACKED_INT8_4W4C,
|
| 157 |
+
VkMemoryLayout_PACKED_INT8_4H4W,
|
| 158 |
+
VkMemoryLayout_PACKED_INT8_4W,
|
| 159 |
+
VkMemoryLayout_PACKED_INT8_4C,
|
| 160 |
+
VkMemoryLayout_PACKED_INT8_4C1W,
|
| 161 |
+
VkMemoryLayout_PACKED_INT8_CONV2D,
|
| 162 |
+
VkMemoryLayout_DEFAULT_LAYOUT
|
| 163 |
+
};
|
| 164 |
+
return values;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
inline const char *EnumNameVkMemoryLayout(VkMemoryLayout e) {
|
| 168 |
+
switch (e) {
|
| 169 |
+
case VkMemoryLayout_TENSOR_WIDTH_PACKED: return "TENSOR_WIDTH_PACKED";
|
| 170 |
+
case VkMemoryLayout_TENSOR_HEIGHT_PACKED: return "TENSOR_HEIGHT_PACKED";
|
| 171 |
+
case VkMemoryLayout_TENSOR_CHANNELS_PACKED: return "TENSOR_CHANNELS_PACKED";
|
| 172 |
+
case VkMemoryLayout_PACKED_INT8_4W4C: return "PACKED_INT8_4W4C";
|
| 173 |
+
case VkMemoryLayout_PACKED_INT8_4H4W: return "PACKED_INT8_4H4W";
|
| 174 |
+
case VkMemoryLayout_PACKED_INT8_4W: return "PACKED_INT8_4W";
|
| 175 |
+
case VkMemoryLayout_PACKED_INT8_4C: return "PACKED_INT8_4C";
|
| 176 |
+
case VkMemoryLayout_PACKED_INT8_4C1W: return "PACKED_INT8_4C1W";
|
| 177 |
+
case VkMemoryLayout_PACKED_INT8_CONV2D: return "PACKED_INT8_CONV2D";
|
| 178 |
+
case VkMemoryLayout_DEFAULT_LAYOUT: return "DEFAULT_LAYOUT";
|
| 179 |
+
default: return "";
|
| 180 |
+
}
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
enum GraphTypes : uint8_t {
|
| 184 |
+
GraphTypes_NONE = 0,
|
| 185 |
+
GraphTypes_Null = 1,
|
| 186 |
+
GraphTypes_Int = 2,
|
| 187 |
+
GraphTypes_Double = 3,
|
| 188 |
+
GraphTypes_Bool = 4,
|
| 189 |
+
GraphTypes_VkTensor = 5,
|
| 190 |
+
GraphTypes_IntList = 6,
|
| 191 |
+
GraphTypes_DoubleList = 7,
|
| 192 |
+
GraphTypes_BoolList = 8,
|
| 193 |
+
GraphTypes_ValueList = 9,
|
| 194 |
+
GraphTypes_String = 10,
|
| 195 |
+
GraphTypes_SymInt = 11,
|
| 196 |
+
GraphTypes_MIN = GraphTypes_NONE,
|
| 197 |
+
GraphTypes_MAX = GraphTypes_SymInt
|
| 198 |
+
};
|
| 199 |
+
|
| 200 |
+
inline const GraphTypes (&EnumValuesGraphTypes())[12] {
|
| 201 |
+
static const GraphTypes values[] = {
|
| 202 |
+
GraphTypes_NONE,
|
| 203 |
+
GraphTypes_Null,
|
| 204 |
+
GraphTypes_Int,
|
| 205 |
+
GraphTypes_Double,
|
| 206 |
+
GraphTypes_Bool,
|
| 207 |
+
GraphTypes_VkTensor,
|
| 208 |
+
GraphTypes_IntList,
|
| 209 |
+
GraphTypes_DoubleList,
|
| 210 |
+
GraphTypes_BoolList,
|
| 211 |
+
GraphTypes_ValueList,
|
| 212 |
+
GraphTypes_String,
|
| 213 |
+
GraphTypes_SymInt
|
| 214 |
+
};
|
| 215 |
+
return values;
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
inline const char * const *EnumNamesGraphTypes() {
|
| 219 |
+
static const char * const names[13] = {
|
| 220 |
+
"NONE",
|
| 221 |
+
"Null",
|
| 222 |
+
"Int",
|
| 223 |
+
"Double",
|
| 224 |
+
"Bool",
|
| 225 |
+
"VkTensor",
|
| 226 |
+
"IntList",
|
| 227 |
+
"DoubleList",
|
| 228 |
+
"BoolList",
|
| 229 |
+
"ValueList",
|
| 230 |
+
"String",
|
| 231 |
+
"SymInt",
|
| 232 |
+
nullptr
|
| 233 |
+
};
|
| 234 |
+
return names;
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
inline const char *EnumNameGraphTypes(GraphTypes e) {
|
| 238 |
+
if (::flatbuffers::IsOutRange(e, GraphTypes_NONE, GraphTypes_SymInt)) return "";
|
| 239 |
+
const size_t index = static_cast<size_t>(e);
|
| 240 |
+
return EnumNamesGraphTypes()[index];
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
template<typename T> struct GraphTypesTraits {
|
| 244 |
+
static const GraphTypes enum_value = GraphTypes_NONE;
|
| 245 |
+
};
|
| 246 |
+
|
| 247 |
+
template<> struct GraphTypesTraits<vkgraph::Null> {
|
| 248 |
+
static const GraphTypes enum_value = GraphTypes_Null;
|
| 249 |
+
};
|
| 250 |
+
|
| 251 |
+
template<> struct GraphTypesTraits<vkgraph::Int> {
|
| 252 |
+
static const GraphTypes enum_value = GraphTypes_Int;
|
| 253 |
+
};
|
| 254 |
+
|
| 255 |
+
template<> struct GraphTypesTraits<vkgraph::Double> {
|
| 256 |
+
static const GraphTypes enum_value = GraphTypes_Double;
|
| 257 |
+
};
|
| 258 |
+
|
| 259 |
+
template<> struct GraphTypesTraits<vkgraph::Bool> {
|
| 260 |
+
static const GraphTypes enum_value = GraphTypes_Bool;
|
| 261 |
+
};
|
| 262 |
+
|
| 263 |
+
template<> struct GraphTypesTraits<vkgraph::VkTensor> {
|
| 264 |
+
static const GraphTypes enum_value = GraphTypes_VkTensor;
|
| 265 |
+
};
|
| 266 |
+
|
| 267 |
+
template<> struct GraphTypesTraits<vkgraph::IntList> {
|
| 268 |
+
static const GraphTypes enum_value = GraphTypes_IntList;
|
| 269 |
+
};
|
| 270 |
+
|
| 271 |
+
template<> struct GraphTypesTraits<vkgraph::DoubleList> {
|
| 272 |
+
static const GraphTypes enum_value = GraphTypes_DoubleList;
|
| 273 |
+
};
|
| 274 |
+
|
| 275 |
+
template<> struct GraphTypesTraits<vkgraph::BoolList> {
|
| 276 |
+
static const GraphTypes enum_value = GraphTypes_BoolList;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
template<> struct GraphTypesTraits<vkgraph::ValueList> {
|
| 280 |
+
static const GraphTypes enum_value = GraphTypes_ValueList;
|
| 281 |
+
};
|
| 282 |
+
|
| 283 |
+
template<> struct GraphTypesTraits<vkgraph::String> {
|
| 284 |
+
static const GraphTypes enum_value = GraphTypes_String;
|
| 285 |
+
};
|
| 286 |
+
|
| 287 |
+
template<> struct GraphTypesTraits<vkgraph::SymInt> {
|
| 288 |
+
static const GraphTypes enum_value = GraphTypes_SymInt;
|
| 289 |
+
};
|
| 290 |
+
|
| 291 |
+
bool VerifyGraphTypes(::flatbuffers::Verifier &verifier, const void *obj, GraphTypes type);
|
| 292 |
+
bool VerifyGraphTypesVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<uint8_t> *types);
|
| 293 |
+
|
| 294 |
+
struct OperatorCall FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 295 |
+
typedef OperatorCallBuilder Builder;
|
| 296 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 297 |
+
VT_NODE_ID = 4,
|
| 298 |
+
VT_NAME = 6,
|
| 299 |
+
VT_ARGS = 8
|
| 300 |
+
};
|
| 301 |
+
uint32_t node_id() const {
|
| 302 |
+
return GetField<uint32_t>(VT_NODE_ID, 0);
|
| 303 |
+
}
|
| 304 |
+
const ::flatbuffers::String *name() const {
|
| 305 |
+
return GetPointer<const ::flatbuffers::String *>(VT_NAME);
|
| 306 |
+
}
|
| 307 |
+
const ::flatbuffers::Vector<int32_t> *args() const {
|
| 308 |
+
return GetPointer<const ::flatbuffers::Vector<int32_t> *>(VT_ARGS);
|
| 309 |
+
}
|
| 310 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 311 |
+
return VerifyTableStart(verifier) &&
|
| 312 |
+
VerifyField<uint32_t>(verifier, VT_NODE_ID, 4) &&
|
| 313 |
+
VerifyOffset(verifier, VT_NAME) &&
|
| 314 |
+
verifier.VerifyString(name()) &&
|
| 315 |
+
VerifyOffset(verifier, VT_ARGS) &&
|
| 316 |
+
verifier.VerifyVector(args()) &&
|
| 317 |
+
verifier.EndTable();
|
| 318 |
+
}
|
| 319 |
+
};
|
| 320 |
+
|
| 321 |
+
struct OperatorCallBuilder {
|
| 322 |
+
typedef OperatorCall Table;
|
| 323 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 324 |
+
::flatbuffers::uoffset_t start_;
|
| 325 |
+
void add_node_id(uint32_t node_id) {
|
| 326 |
+
fbb_.AddElement<uint32_t>(OperatorCall::VT_NODE_ID, node_id, 0);
|
| 327 |
+
}
|
| 328 |
+
void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
|
| 329 |
+
fbb_.AddOffset(OperatorCall::VT_NAME, name);
|
| 330 |
+
}
|
| 331 |
+
void add_args(::flatbuffers::Offset<::flatbuffers::Vector<int32_t>> args) {
|
| 332 |
+
fbb_.AddOffset(OperatorCall::VT_ARGS, args);
|
| 333 |
+
}
|
| 334 |
+
explicit OperatorCallBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 335 |
+
: fbb_(_fbb) {
|
| 336 |
+
start_ = fbb_.StartTable();
|
| 337 |
+
}
|
| 338 |
+
::flatbuffers::Offset<OperatorCall> Finish() {
|
| 339 |
+
const auto end = fbb_.EndTable(start_);
|
| 340 |
+
auto o = ::flatbuffers::Offset<OperatorCall>(end);
|
| 341 |
+
return o;
|
| 342 |
+
}
|
| 343 |
+
};
|
| 344 |
+
|
| 345 |
+
inline ::flatbuffers::Offset<OperatorCall> CreateOperatorCall(
|
| 346 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 347 |
+
uint32_t node_id = 0,
|
| 348 |
+
::flatbuffers::Offset<::flatbuffers::String> name = 0,
|
| 349 |
+
::flatbuffers::Offset<::flatbuffers::Vector<int32_t>> args = 0) {
|
| 350 |
+
OperatorCallBuilder builder_(_fbb);
|
| 351 |
+
builder_.add_args(args);
|
| 352 |
+
builder_.add_name(name);
|
| 353 |
+
builder_.add_node_id(node_id);
|
| 354 |
+
return builder_.Finish();
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
inline ::flatbuffers::Offset<OperatorCall> CreateOperatorCallDirect(
|
| 358 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 359 |
+
uint32_t node_id = 0,
|
| 360 |
+
const char *name = nullptr,
|
| 361 |
+
const std::vector<int32_t> *args = nullptr) {
|
| 362 |
+
auto name__ = name ? _fbb.CreateString(name) : 0;
|
| 363 |
+
auto args__ = args ? _fbb.CreateVector<int32_t>(*args) : 0;
|
| 364 |
+
return vkgraph::CreateOperatorCall(
|
| 365 |
+
_fbb,
|
| 366 |
+
node_id,
|
| 367 |
+
name__,
|
| 368 |
+
args__);
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
struct VkTensor FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 372 |
+
typedef VkTensorBuilder Builder;
|
| 373 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 374 |
+
VT_DATATYPE = 4,
|
| 375 |
+
VT_DIMS = 6,
|
| 376 |
+
VT_CONSTANT_ID = 8,
|
| 377 |
+
VT_MEM_OBJ_ID = 10,
|
| 378 |
+
VT_STORAGE_TYPE = 12,
|
| 379 |
+
VT_MEMORY_LAYOUT = 14,
|
| 380 |
+
VT_STAGING_DATATYPE = 16
|
| 381 |
+
};
|
| 382 |
+
vkgraph::VkDataType datatype() const {
|
| 383 |
+
return static_cast<vkgraph::VkDataType>(GetField<int8_t>(VT_DATATYPE, 0));
|
| 384 |
+
}
|
| 385 |
+
const ::flatbuffers::Vector<uint32_t> *dims() const {
|
| 386 |
+
return GetPointer<const ::flatbuffers::Vector<uint32_t> *>(VT_DIMS);
|
| 387 |
+
}
|
| 388 |
+
int32_t constant_id() const {
|
| 389 |
+
return GetField<int32_t>(VT_CONSTANT_ID, 0);
|
| 390 |
+
}
|
| 391 |
+
int32_t mem_obj_id() const {
|
| 392 |
+
return GetField<int32_t>(VT_MEM_OBJ_ID, 0);
|
| 393 |
+
}
|
| 394 |
+
vkgraph::VkStorageType storage_type() const {
|
| 395 |
+
return static_cast<vkgraph::VkStorageType>(GetField<uint8_t>(VT_STORAGE_TYPE, 255));
|
| 396 |
+
}
|
| 397 |
+
vkgraph::VkMemoryLayout memory_layout() const {
|
| 398 |
+
return static_cast<vkgraph::VkMemoryLayout>(GetField<uint8_t>(VT_MEMORY_LAYOUT, 255));
|
| 399 |
+
}
|
| 400 |
+
vkgraph::VkDataType staging_datatype() const {
|
| 401 |
+
return static_cast<vkgraph::VkDataType>(GetField<int8_t>(VT_STAGING_DATATYPE, 127));
|
| 402 |
+
}
|
| 403 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 404 |
+
return VerifyTableStart(verifier) &&
|
| 405 |
+
VerifyField<int8_t>(verifier, VT_DATATYPE, 1) &&
|
| 406 |
+
VerifyOffset(verifier, VT_DIMS) &&
|
| 407 |
+
verifier.VerifyVector(dims()) &&
|
| 408 |
+
VerifyField<int32_t>(verifier, VT_CONSTANT_ID, 4) &&
|
| 409 |
+
VerifyField<int32_t>(verifier, VT_MEM_OBJ_ID, 4) &&
|
| 410 |
+
VerifyField<uint8_t>(verifier, VT_STORAGE_TYPE, 1) &&
|
| 411 |
+
VerifyField<uint8_t>(verifier, VT_MEMORY_LAYOUT, 1) &&
|
| 412 |
+
VerifyField<int8_t>(verifier, VT_STAGING_DATATYPE, 1) &&
|
| 413 |
+
verifier.EndTable();
|
| 414 |
+
}
|
| 415 |
+
};
|
| 416 |
+
|
| 417 |
+
struct VkTensorBuilder {
|
| 418 |
+
typedef VkTensor Table;
|
| 419 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 420 |
+
::flatbuffers::uoffset_t start_;
|
| 421 |
+
void add_datatype(vkgraph::VkDataType datatype) {
|
| 422 |
+
fbb_.AddElement<int8_t>(VkTensor::VT_DATATYPE, static_cast<int8_t>(datatype), 0);
|
| 423 |
+
}
|
| 424 |
+
void add_dims(::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> dims) {
|
| 425 |
+
fbb_.AddOffset(VkTensor::VT_DIMS, dims);
|
| 426 |
+
}
|
| 427 |
+
void add_constant_id(int32_t constant_id) {
|
| 428 |
+
fbb_.AddElement<int32_t>(VkTensor::VT_CONSTANT_ID, constant_id, 0);
|
| 429 |
+
}
|
| 430 |
+
void add_mem_obj_id(int32_t mem_obj_id) {
|
| 431 |
+
fbb_.AddElement<int32_t>(VkTensor::VT_MEM_OBJ_ID, mem_obj_id, 0);
|
| 432 |
+
}
|
| 433 |
+
void add_storage_type(vkgraph::VkStorageType storage_type) {
|
| 434 |
+
fbb_.AddElement<uint8_t>(VkTensor::VT_STORAGE_TYPE, static_cast<uint8_t>(storage_type), 255);
|
| 435 |
+
}
|
| 436 |
+
void add_memory_layout(vkgraph::VkMemoryLayout memory_layout) {
|
| 437 |
+
fbb_.AddElement<uint8_t>(VkTensor::VT_MEMORY_LAYOUT, static_cast<uint8_t>(memory_layout), 255);
|
| 438 |
+
}
|
| 439 |
+
void add_staging_datatype(vkgraph::VkDataType staging_datatype) {
|
| 440 |
+
fbb_.AddElement<int8_t>(VkTensor::VT_STAGING_DATATYPE, static_cast<int8_t>(staging_datatype), 127);
|
| 441 |
+
}
|
| 442 |
+
explicit VkTensorBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 443 |
+
: fbb_(_fbb) {
|
| 444 |
+
start_ = fbb_.StartTable();
|
| 445 |
+
}
|
| 446 |
+
::flatbuffers::Offset<VkTensor> Finish() {
|
| 447 |
+
const auto end = fbb_.EndTable(start_);
|
| 448 |
+
auto o = ::flatbuffers::Offset<VkTensor>(end);
|
| 449 |
+
return o;
|
| 450 |
+
}
|
| 451 |
+
};
|
| 452 |
+
|
| 453 |
+
inline ::flatbuffers::Offset<VkTensor> CreateVkTensor(
|
| 454 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 455 |
+
vkgraph::VkDataType datatype = vkgraph::VkDataType_BOOL,
|
| 456 |
+
::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> dims = 0,
|
| 457 |
+
int32_t constant_id = 0,
|
| 458 |
+
int32_t mem_obj_id = 0,
|
| 459 |
+
vkgraph::VkStorageType storage_type = vkgraph::VkStorageType_DEFAULT_STORAGE,
|
| 460 |
+
vkgraph::VkMemoryLayout memory_layout = vkgraph::VkMemoryLayout_DEFAULT_LAYOUT,
|
| 461 |
+
vkgraph::VkDataType staging_datatype = vkgraph::VkDataType_UNSET) {
|
| 462 |
+
VkTensorBuilder builder_(_fbb);
|
| 463 |
+
builder_.add_mem_obj_id(mem_obj_id);
|
| 464 |
+
builder_.add_constant_id(constant_id);
|
| 465 |
+
builder_.add_dims(dims);
|
| 466 |
+
builder_.add_staging_datatype(staging_datatype);
|
| 467 |
+
builder_.add_memory_layout(memory_layout);
|
| 468 |
+
builder_.add_storage_type(storage_type);
|
| 469 |
+
builder_.add_datatype(datatype);
|
| 470 |
+
return builder_.Finish();
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
inline ::flatbuffers::Offset<VkTensor> CreateVkTensorDirect(
|
| 474 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 475 |
+
vkgraph::VkDataType datatype = vkgraph::VkDataType_BOOL,
|
| 476 |
+
const std::vector<uint32_t> *dims = nullptr,
|
| 477 |
+
int32_t constant_id = 0,
|
| 478 |
+
int32_t mem_obj_id = 0,
|
| 479 |
+
vkgraph::VkStorageType storage_type = vkgraph::VkStorageType_DEFAULT_STORAGE,
|
| 480 |
+
vkgraph::VkMemoryLayout memory_layout = vkgraph::VkMemoryLayout_DEFAULT_LAYOUT,
|
| 481 |
+
vkgraph::VkDataType staging_datatype = vkgraph::VkDataType_UNSET) {
|
| 482 |
+
auto dims__ = dims ? _fbb.CreateVector<uint32_t>(*dims) : 0;
|
| 483 |
+
return vkgraph::CreateVkTensor(
|
| 484 |
+
_fbb,
|
| 485 |
+
datatype,
|
| 486 |
+
dims__,
|
| 487 |
+
constant_id,
|
| 488 |
+
mem_obj_id,
|
| 489 |
+
storage_type,
|
| 490 |
+
memory_layout,
|
| 491 |
+
staging_datatype);
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
struct Null FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 495 |
+
typedef NullBuilder Builder;
|
| 496 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 497 |
+
return VerifyTableStart(verifier) &&
|
| 498 |
+
verifier.EndTable();
|
| 499 |
+
}
|
| 500 |
+
};
|
| 501 |
+
|
| 502 |
+
struct NullBuilder {
|
| 503 |
+
typedef Null Table;
|
| 504 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 505 |
+
::flatbuffers::uoffset_t start_;
|
| 506 |
+
explicit NullBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 507 |
+
: fbb_(_fbb) {
|
| 508 |
+
start_ = fbb_.StartTable();
|
| 509 |
+
}
|
| 510 |
+
::flatbuffers::Offset<Null> Finish() {
|
| 511 |
+
const auto end = fbb_.EndTable(start_);
|
| 512 |
+
auto o = ::flatbuffers::Offset<Null>(end);
|
| 513 |
+
return o;
|
| 514 |
+
}
|
| 515 |
+
};
|
| 516 |
+
|
| 517 |
+
inline ::flatbuffers::Offset<Null> CreateNull(
|
| 518 |
+
::flatbuffers::FlatBufferBuilder &_fbb) {
|
| 519 |
+
NullBuilder builder_(_fbb);
|
| 520 |
+
return builder_.Finish();
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
+
struct Int FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 524 |
+
typedef IntBuilder Builder;
|
| 525 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 526 |
+
VT_INT_VAL = 4
|
| 527 |
+
};
|
| 528 |
+
int64_t int_val() const {
|
| 529 |
+
return GetField<int64_t>(VT_INT_VAL, 0);
|
| 530 |
+
}
|
| 531 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 532 |
+
return VerifyTableStart(verifier) &&
|
| 533 |
+
VerifyField<int64_t>(verifier, VT_INT_VAL, 8) &&
|
| 534 |
+
verifier.EndTable();
|
| 535 |
+
}
|
| 536 |
+
};
|
| 537 |
+
|
| 538 |
+
struct IntBuilder {
|
| 539 |
+
typedef Int Table;
|
| 540 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 541 |
+
::flatbuffers::uoffset_t start_;
|
| 542 |
+
void add_int_val(int64_t int_val) {
|
| 543 |
+
fbb_.AddElement<int64_t>(Int::VT_INT_VAL, int_val, 0);
|
| 544 |
+
}
|
| 545 |
+
explicit IntBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 546 |
+
: fbb_(_fbb) {
|
| 547 |
+
start_ = fbb_.StartTable();
|
| 548 |
+
}
|
| 549 |
+
::flatbuffers::Offset<Int> Finish() {
|
| 550 |
+
const auto end = fbb_.EndTable(start_);
|
| 551 |
+
auto o = ::flatbuffers::Offset<Int>(end);
|
| 552 |
+
return o;
|
| 553 |
+
}
|
| 554 |
+
};
|
| 555 |
+
|
| 556 |
+
inline ::flatbuffers::Offset<Int> CreateInt(
|
| 557 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 558 |
+
int64_t int_val = 0) {
|
| 559 |
+
IntBuilder builder_(_fbb);
|
| 560 |
+
builder_.add_int_val(int_val);
|
| 561 |
+
return builder_.Finish();
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
struct Bool FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 565 |
+
typedef BoolBuilder Builder;
|
| 566 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 567 |
+
VT_BOOL_VAL = 4
|
| 568 |
+
};
|
| 569 |
+
bool bool_val() const {
|
| 570 |
+
return GetField<uint8_t>(VT_BOOL_VAL, 0) != 0;
|
| 571 |
+
}
|
| 572 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 573 |
+
return VerifyTableStart(verifier) &&
|
| 574 |
+
VerifyField<uint8_t>(verifier, VT_BOOL_VAL, 1) &&
|
| 575 |
+
verifier.EndTable();
|
| 576 |
+
}
|
| 577 |
+
};
|
| 578 |
+
|
| 579 |
+
struct BoolBuilder {
|
| 580 |
+
typedef Bool Table;
|
| 581 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 582 |
+
::flatbuffers::uoffset_t start_;
|
| 583 |
+
void add_bool_val(bool bool_val) {
|
| 584 |
+
fbb_.AddElement<uint8_t>(Bool::VT_BOOL_VAL, static_cast<uint8_t>(bool_val), 0);
|
| 585 |
+
}
|
| 586 |
+
explicit BoolBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 587 |
+
: fbb_(_fbb) {
|
| 588 |
+
start_ = fbb_.StartTable();
|
| 589 |
+
}
|
| 590 |
+
::flatbuffers::Offset<Bool> Finish() {
|
| 591 |
+
const auto end = fbb_.EndTable(start_);
|
| 592 |
+
auto o = ::flatbuffers::Offset<Bool>(end);
|
| 593 |
+
return o;
|
| 594 |
+
}
|
| 595 |
+
};
|
| 596 |
+
|
| 597 |
+
inline ::flatbuffers::Offset<Bool> CreateBool(
|
| 598 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 599 |
+
bool bool_val = false) {
|
| 600 |
+
BoolBuilder builder_(_fbb);
|
| 601 |
+
builder_.add_bool_val(bool_val);
|
| 602 |
+
return builder_.Finish();
|
| 603 |
+
}
|
| 604 |
+
|
| 605 |
+
struct Double FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 606 |
+
typedef DoubleBuilder Builder;
|
| 607 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 608 |
+
VT_DOUBLE_VAL = 4
|
| 609 |
+
};
|
| 610 |
+
double double_val() const {
|
| 611 |
+
return GetField<double>(VT_DOUBLE_VAL, 0.0);
|
| 612 |
+
}
|
| 613 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 614 |
+
return VerifyTableStart(verifier) &&
|
| 615 |
+
VerifyField<double>(verifier, VT_DOUBLE_VAL, 8) &&
|
| 616 |
+
verifier.EndTable();
|
| 617 |
+
}
|
| 618 |
+
};
|
| 619 |
+
|
| 620 |
+
struct DoubleBuilder {
|
| 621 |
+
typedef Double Table;
|
| 622 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 623 |
+
::flatbuffers::uoffset_t start_;
|
| 624 |
+
void add_double_val(double double_val) {
|
| 625 |
+
fbb_.AddElement<double>(Double::VT_DOUBLE_VAL, double_val, 0.0);
|
| 626 |
+
}
|
| 627 |
+
explicit DoubleBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 628 |
+
: fbb_(_fbb) {
|
| 629 |
+
start_ = fbb_.StartTable();
|
| 630 |
+
}
|
| 631 |
+
::flatbuffers::Offset<Double> Finish() {
|
| 632 |
+
const auto end = fbb_.EndTable(start_);
|
| 633 |
+
auto o = ::flatbuffers::Offset<Double>(end);
|
| 634 |
+
return o;
|
| 635 |
+
}
|
| 636 |
+
};
|
| 637 |
+
|
| 638 |
+
inline ::flatbuffers::Offset<Double> CreateDouble(
|
| 639 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 640 |
+
double double_val = 0.0) {
|
| 641 |
+
DoubleBuilder builder_(_fbb);
|
| 642 |
+
builder_.add_double_val(double_val);
|
| 643 |
+
return builder_.Finish();
|
| 644 |
+
}
|
| 645 |
+
|
| 646 |
+
struct String FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 647 |
+
typedef StringBuilder Builder;
|
| 648 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 649 |
+
VT_STRING_VAL = 4
|
| 650 |
+
};
|
| 651 |
+
const ::flatbuffers::String *string_val() const {
|
| 652 |
+
return GetPointer<const ::flatbuffers::String *>(VT_STRING_VAL);
|
| 653 |
+
}
|
| 654 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 655 |
+
return VerifyTableStart(verifier) &&
|
| 656 |
+
VerifyOffset(verifier, VT_STRING_VAL) &&
|
| 657 |
+
verifier.VerifyString(string_val()) &&
|
| 658 |
+
verifier.EndTable();
|
| 659 |
+
}
|
| 660 |
+
};
|
| 661 |
+
|
| 662 |
+
struct StringBuilder {
|
| 663 |
+
typedef String Table;
|
| 664 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 665 |
+
::flatbuffers::uoffset_t start_;
|
| 666 |
+
void add_string_val(::flatbuffers::Offset<::flatbuffers::String> string_val) {
|
| 667 |
+
fbb_.AddOffset(String::VT_STRING_VAL, string_val);
|
| 668 |
+
}
|
| 669 |
+
explicit StringBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 670 |
+
: fbb_(_fbb) {
|
| 671 |
+
start_ = fbb_.StartTable();
|
| 672 |
+
}
|
| 673 |
+
::flatbuffers::Offset<String> Finish() {
|
| 674 |
+
const auto end = fbb_.EndTable(start_);
|
| 675 |
+
auto o = ::flatbuffers::Offset<String>(end);
|
| 676 |
+
return o;
|
| 677 |
+
}
|
| 678 |
+
};
|
| 679 |
+
|
| 680 |
+
inline ::flatbuffers::Offset<String> CreateString(
|
| 681 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 682 |
+
::flatbuffers::Offset<::flatbuffers::String> string_val = 0) {
|
| 683 |
+
StringBuilder builder_(_fbb);
|
| 684 |
+
builder_.add_string_val(string_val);
|
| 685 |
+
return builder_.Finish();
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
inline ::flatbuffers::Offset<String> CreateStringDirect(
|
| 689 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 690 |
+
const char *string_val = nullptr) {
|
| 691 |
+
auto string_val__ = string_val ? _fbb.CreateString(string_val) : 0;
|
| 692 |
+
return vkgraph::CreateString(
|
| 693 |
+
_fbb,
|
| 694 |
+
string_val__);
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
struct IntList FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 698 |
+
typedef IntListBuilder Builder;
|
| 699 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 700 |
+
VT_ITEMS = 4
|
| 701 |
+
};
|
| 702 |
+
const ::flatbuffers::Vector<int64_t> *items() const {
|
| 703 |
+
return GetPointer<const ::flatbuffers::Vector<int64_t> *>(VT_ITEMS);
|
| 704 |
+
}
|
| 705 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 706 |
+
return VerifyTableStart(verifier) &&
|
| 707 |
+
VerifyOffset(verifier, VT_ITEMS) &&
|
| 708 |
+
verifier.VerifyVector(items()) &&
|
| 709 |
+
verifier.EndTable();
|
| 710 |
+
}
|
| 711 |
+
};
|
| 712 |
+
|
| 713 |
+
struct IntListBuilder {
|
| 714 |
+
typedef IntList Table;
|
| 715 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 716 |
+
::flatbuffers::uoffset_t start_;
|
| 717 |
+
void add_items(::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> items) {
|
| 718 |
+
fbb_.AddOffset(IntList::VT_ITEMS, items);
|
| 719 |
+
}
|
| 720 |
+
explicit IntListBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 721 |
+
: fbb_(_fbb) {
|
| 722 |
+
start_ = fbb_.StartTable();
|
| 723 |
+
}
|
| 724 |
+
::flatbuffers::Offset<IntList> Finish() {
|
| 725 |
+
const auto end = fbb_.EndTable(start_);
|
| 726 |
+
auto o = ::flatbuffers::Offset<IntList>(end);
|
| 727 |
+
return o;
|
| 728 |
+
}
|
| 729 |
+
};
|
| 730 |
+
|
| 731 |
+
inline ::flatbuffers::Offset<IntList> CreateIntList(
|
| 732 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 733 |
+
::flatbuffers::Offset<::flatbuffers::Vector<int64_t>> items = 0) {
|
| 734 |
+
IntListBuilder builder_(_fbb);
|
| 735 |
+
builder_.add_items(items);
|
| 736 |
+
return builder_.Finish();
|
| 737 |
+
}
|
| 738 |
+
|
| 739 |
+
inline ::flatbuffers::Offset<IntList> CreateIntListDirect(
|
| 740 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 741 |
+
const std::vector<int64_t> *items = nullptr) {
|
| 742 |
+
auto items__ = items ? _fbb.CreateVector<int64_t>(*items) : 0;
|
| 743 |
+
return vkgraph::CreateIntList(
|
| 744 |
+
_fbb,
|
| 745 |
+
items__);
|
| 746 |
+
}
|
| 747 |
+
|
| 748 |
+
struct DoubleList FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 749 |
+
typedef DoubleListBuilder Builder;
|
| 750 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 751 |
+
VT_ITEMS = 4
|
| 752 |
+
};
|
| 753 |
+
const ::flatbuffers::Vector<double> *items() const {
|
| 754 |
+
return GetPointer<const ::flatbuffers::Vector<double> *>(VT_ITEMS);
|
| 755 |
+
}
|
| 756 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 757 |
+
return VerifyTableStart(verifier) &&
|
| 758 |
+
VerifyOffset(verifier, VT_ITEMS) &&
|
| 759 |
+
verifier.VerifyVector(items()) &&
|
| 760 |
+
verifier.EndTable();
|
| 761 |
+
}
|
| 762 |
+
};
|
| 763 |
+
|
| 764 |
+
struct DoubleListBuilder {
|
| 765 |
+
typedef DoubleList Table;
|
| 766 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 767 |
+
::flatbuffers::uoffset_t start_;
|
| 768 |
+
void add_items(::flatbuffers::Offset<::flatbuffers::Vector<double>> items) {
|
| 769 |
+
fbb_.AddOffset(DoubleList::VT_ITEMS, items);
|
| 770 |
+
}
|
| 771 |
+
explicit DoubleListBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 772 |
+
: fbb_(_fbb) {
|
| 773 |
+
start_ = fbb_.StartTable();
|
| 774 |
+
}
|
| 775 |
+
::flatbuffers::Offset<DoubleList> Finish() {
|
| 776 |
+
const auto end = fbb_.EndTable(start_);
|
| 777 |
+
auto o = ::flatbuffers::Offset<DoubleList>(end);
|
| 778 |
+
return o;
|
| 779 |
+
}
|
| 780 |
+
};
|
| 781 |
+
|
| 782 |
+
inline ::flatbuffers::Offset<DoubleList> CreateDoubleList(
|
| 783 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 784 |
+
::flatbuffers::Offset<::flatbuffers::Vector<double>> items = 0) {
|
| 785 |
+
DoubleListBuilder builder_(_fbb);
|
| 786 |
+
builder_.add_items(items);
|
| 787 |
+
return builder_.Finish();
|
| 788 |
+
}
|
| 789 |
+
|
| 790 |
+
inline ::flatbuffers::Offset<DoubleList> CreateDoubleListDirect(
|
| 791 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 792 |
+
const std::vector<double> *items = nullptr) {
|
| 793 |
+
auto items__ = items ? _fbb.CreateVector<double>(*items) : 0;
|
| 794 |
+
return vkgraph::CreateDoubleList(
|
| 795 |
+
_fbb,
|
| 796 |
+
items__);
|
| 797 |
+
}
|
| 798 |
+
|
| 799 |
+
struct BoolList FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 800 |
+
typedef BoolListBuilder Builder;
|
| 801 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 802 |
+
VT_ITEMS = 4
|
| 803 |
+
};
|
| 804 |
+
const ::flatbuffers::Vector<uint8_t> *items() const {
|
| 805 |
+
return GetPointer<const ::flatbuffers::Vector<uint8_t> *>(VT_ITEMS);
|
| 806 |
+
}
|
| 807 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 808 |
+
return VerifyTableStart(verifier) &&
|
| 809 |
+
VerifyOffset(verifier, VT_ITEMS) &&
|
| 810 |
+
verifier.VerifyVector(items()) &&
|
| 811 |
+
verifier.EndTable();
|
| 812 |
+
}
|
| 813 |
+
};
|
| 814 |
+
|
| 815 |
+
struct BoolListBuilder {
|
| 816 |
+
typedef BoolList Table;
|
| 817 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 818 |
+
::flatbuffers::uoffset_t start_;
|
| 819 |
+
void add_items(::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> items) {
|
| 820 |
+
fbb_.AddOffset(BoolList::VT_ITEMS, items);
|
| 821 |
+
}
|
| 822 |
+
explicit BoolListBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 823 |
+
: fbb_(_fbb) {
|
| 824 |
+
start_ = fbb_.StartTable();
|
| 825 |
+
}
|
| 826 |
+
::flatbuffers::Offset<BoolList> Finish() {
|
| 827 |
+
const auto end = fbb_.EndTable(start_);
|
| 828 |
+
auto o = ::flatbuffers::Offset<BoolList>(end);
|
| 829 |
+
return o;
|
| 830 |
+
}
|
| 831 |
+
};
|
| 832 |
+
|
| 833 |
+
inline ::flatbuffers::Offset<BoolList> CreateBoolList(
|
| 834 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 835 |
+
::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> items = 0) {
|
| 836 |
+
BoolListBuilder builder_(_fbb);
|
| 837 |
+
builder_.add_items(items);
|
| 838 |
+
return builder_.Finish();
|
| 839 |
+
}
|
| 840 |
+
|
| 841 |
+
inline ::flatbuffers::Offset<BoolList> CreateBoolListDirect(
|
| 842 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 843 |
+
const std::vector<uint8_t> *items = nullptr) {
|
| 844 |
+
auto items__ = items ? _fbb.CreateVector<uint8_t>(*items) : 0;
|
| 845 |
+
return vkgraph::CreateBoolList(
|
| 846 |
+
_fbb,
|
| 847 |
+
items__);
|
| 848 |
+
}
|
| 849 |
+
|
| 850 |
+
struct ValueList FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 851 |
+
typedef ValueListBuilder Builder;
|
| 852 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 853 |
+
VT_ITEMS = 4
|
| 854 |
+
};
|
| 855 |
+
const ::flatbuffers::Vector<int32_t> *items() const {
|
| 856 |
+
return GetPointer<const ::flatbuffers::Vector<int32_t> *>(VT_ITEMS);
|
| 857 |
+
}
|
| 858 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 859 |
+
return VerifyTableStart(verifier) &&
|
| 860 |
+
VerifyOffset(verifier, VT_ITEMS) &&
|
| 861 |
+
verifier.VerifyVector(items()) &&
|
| 862 |
+
verifier.EndTable();
|
| 863 |
+
}
|
| 864 |
+
};
|
| 865 |
+
|
| 866 |
+
struct ValueListBuilder {
|
| 867 |
+
typedef ValueList Table;
|
| 868 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 869 |
+
::flatbuffers::uoffset_t start_;
|
| 870 |
+
void add_items(::flatbuffers::Offset<::flatbuffers::Vector<int32_t>> items) {
|
| 871 |
+
fbb_.AddOffset(ValueList::VT_ITEMS, items);
|
| 872 |
+
}
|
| 873 |
+
explicit ValueListBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 874 |
+
: fbb_(_fbb) {
|
| 875 |
+
start_ = fbb_.StartTable();
|
| 876 |
+
}
|
| 877 |
+
::flatbuffers::Offset<ValueList> Finish() {
|
| 878 |
+
const auto end = fbb_.EndTable(start_);
|
| 879 |
+
auto o = ::flatbuffers::Offset<ValueList>(end);
|
| 880 |
+
return o;
|
| 881 |
+
}
|
| 882 |
+
};
|
| 883 |
+
|
| 884 |
+
inline ::flatbuffers::Offset<ValueList> CreateValueList(
|
| 885 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 886 |
+
::flatbuffers::Offset<::flatbuffers::Vector<int32_t>> items = 0) {
|
| 887 |
+
ValueListBuilder builder_(_fbb);
|
| 888 |
+
builder_.add_items(items);
|
| 889 |
+
return builder_.Finish();
|
| 890 |
+
}
|
| 891 |
+
|
| 892 |
+
inline ::flatbuffers::Offset<ValueList> CreateValueListDirect(
|
| 893 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 894 |
+
const std::vector<int32_t> *items = nullptr) {
|
| 895 |
+
auto items__ = items ? _fbb.CreateVector<int32_t>(*items) : 0;
|
| 896 |
+
return vkgraph::CreateValueList(
|
| 897 |
+
_fbb,
|
| 898 |
+
items__);
|
| 899 |
+
}
|
| 900 |
+
|
| 901 |
+
struct SymInt FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 902 |
+
typedef SymIntBuilder Builder;
|
| 903 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 904 |
+
VT_VALUE = 4
|
| 905 |
+
};
|
| 906 |
+
int32_t value() const {
|
| 907 |
+
return GetField<int32_t>(VT_VALUE, 0);
|
| 908 |
+
}
|
| 909 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 910 |
+
return VerifyTableStart(verifier) &&
|
| 911 |
+
VerifyField<int32_t>(verifier, VT_VALUE, 4) &&
|
| 912 |
+
verifier.EndTable();
|
| 913 |
+
}
|
| 914 |
+
};
|
| 915 |
+
|
| 916 |
+
struct SymIntBuilder {
|
| 917 |
+
typedef SymInt Table;
|
| 918 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 919 |
+
::flatbuffers::uoffset_t start_;
|
| 920 |
+
void add_value(int32_t value) {
|
| 921 |
+
fbb_.AddElement<int32_t>(SymInt::VT_VALUE, value, 0);
|
| 922 |
+
}
|
| 923 |
+
explicit SymIntBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 924 |
+
: fbb_(_fbb) {
|
| 925 |
+
start_ = fbb_.StartTable();
|
| 926 |
+
}
|
| 927 |
+
::flatbuffers::Offset<SymInt> Finish() {
|
| 928 |
+
const auto end = fbb_.EndTable(start_);
|
| 929 |
+
auto o = ::flatbuffers::Offset<SymInt>(end);
|
| 930 |
+
return o;
|
| 931 |
+
}
|
| 932 |
+
};
|
| 933 |
+
|
| 934 |
+
inline ::flatbuffers::Offset<SymInt> CreateSymInt(
|
| 935 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 936 |
+
int32_t value = 0) {
|
| 937 |
+
SymIntBuilder builder_(_fbb);
|
| 938 |
+
builder_.add_value(value);
|
| 939 |
+
return builder_.Finish();
|
| 940 |
+
}
|
| 941 |
+
|
| 942 |
+
struct VkValue FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 943 |
+
typedef VkValueBuilder Builder;
|
| 944 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 945 |
+
VT_VALUE_TYPE = 4,
|
| 946 |
+
VT_VALUE = 6
|
| 947 |
+
};
|
| 948 |
+
vkgraph::GraphTypes value_type() const {
|
| 949 |
+
return static_cast<vkgraph::GraphTypes>(GetField<uint8_t>(VT_VALUE_TYPE, 0));
|
| 950 |
+
}
|
| 951 |
+
const void *value() const {
|
| 952 |
+
return GetPointer<const void *>(VT_VALUE);
|
| 953 |
+
}
|
| 954 |
+
template<typename T> const T *value_as() const;
|
| 955 |
+
const vkgraph::Null *value_as_Null() const {
|
| 956 |
+
return value_type() == vkgraph::GraphTypes_Null ? static_cast<const vkgraph::Null *>(value()) : nullptr;
|
| 957 |
+
}
|
| 958 |
+
const vkgraph::Int *value_as_Int() const {
|
| 959 |
+
return value_type() == vkgraph::GraphTypes_Int ? static_cast<const vkgraph::Int *>(value()) : nullptr;
|
| 960 |
+
}
|
| 961 |
+
const vkgraph::Double *value_as_Double() const {
|
| 962 |
+
return value_type() == vkgraph::GraphTypes_Double ? static_cast<const vkgraph::Double *>(value()) : nullptr;
|
| 963 |
+
}
|
| 964 |
+
const vkgraph::Bool *value_as_Bool() const {
|
| 965 |
+
return value_type() == vkgraph::GraphTypes_Bool ? static_cast<const vkgraph::Bool *>(value()) : nullptr;
|
| 966 |
+
}
|
| 967 |
+
const vkgraph::VkTensor *value_as_VkTensor() const {
|
| 968 |
+
return value_type() == vkgraph::GraphTypes_VkTensor ? static_cast<const vkgraph::VkTensor *>(value()) : nullptr;
|
| 969 |
+
}
|
| 970 |
+
const vkgraph::IntList *value_as_IntList() const {
|
| 971 |
+
return value_type() == vkgraph::GraphTypes_IntList ? static_cast<const vkgraph::IntList *>(value()) : nullptr;
|
| 972 |
+
}
|
| 973 |
+
const vkgraph::DoubleList *value_as_DoubleList() const {
|
| 974 |
+
return value_type() == vkgraph::GraphTypes_DoubleList ? static_cast<const vkgraph::DoubleList *>(value()) : nullptr;
|
| 975 |
+
}
|
| 976 |
+
const vkgraph::BoolList *value_as_BoolList() const {
|
| 977 |
+
return value_type() == vkgraph::GraphTypes_BoolList ? static_cast<const vkgraph::BoolList *>(value()) : nullptr;
|
| 978 |
+
}
|
| 979 |
+
const vkgraph::ValueList *value_as_ValueList() const {
|
| 980 |
+
return value_type() == vkgraph::GraphTypes_ValueList ? static_cast<const vkgraph::ValueList *>(value()) : nullptr;
|
| 981 |
+
}
|
| 982 |
+
const vkgraph::String *value_as_String() const {
|
| 983 |
+
return value_type() == vkgraph::GraphTypes_String ? static_cast<const vkgraph::String *>(value()) : nullptr;
|
| 984 |
+
}
|
| 985 |
+
const vkgraph::SymInt *value_as_SymInt() const {
|
| 986 |
+
return value_type() == vkgraph::GraphTypes_SymInt ? static_cast<const vkgraph::SymInt *>(value()) : nullptr;
|
| 987 |
+
}
|
| 988 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 989 |
+
return VerifyTableStart(verifier) &&
|
| 990 |
+
VerifyField<uint8_t>(verifier, VT_VALUE_TYPE, 1) &&
|
| 991 |
+
VerifyOffset(verifier, VT_VALUE) &&
|
| 992 |
+
VerifyGraphTypes(verifier, value(), value_type()) &&
|
| 993 |
+
verifier.EndTable();
|
| 994 |
+
}
|
| 995 |
+
};
|
| 996 |
+
|
| 997 |
+
template<> inline const vkgraph::Null *VkValue::value_as<vkgraph::Null>() const {
|
| 998 |
+
return value_as_Null();
|
| 999 |
+
}
|
| 1000 |
+
|
| 1001 |
+
template<> inline const vkgraph::Int *VkValue::value_as<vkgraph::Int>() const {
|
| 1002 |
+
return value_as_Int();
|
| 1003 |
+
}
|
| 1004 |
+
|
| 1005 |
+
template<> inline const vkgraph::Double *VkValue::value_as<vkgraph::Double>() const {
|
| 1006 |
+
return value_as_Double();
|
| 1007 |
+
}
|
| 1008 |
+
|
| 1009 |
+
template<> inline const vkgraph::Bool *VkValue::value_as<vkgraph::Bool>() const {
|
| 1010 |
+
return value_as_Bool();
|
| 1011 |
+
}
|
| 1012 |
+
|
| 1013 |
+
template<> inline const vkgraph::VkTensor *VkValue::value_as<vkgraph::VkTensor>() const {
|
| 1014 |
+
return value_as_VkTensor();
|
| 1015 |
+
}
|
| 1016 |
+
|
| 1017 |
+
template<> inline const vkgraph::IntList *VkValue::value_as<vkgraph::IntList>() const {
|
| 1018 |
+
return value_as_IntList();
|
| 1019 |
+
}
|
| 1020 |
+
|
| 1021 |
+
template<> inline const vkgraph::DoubleList *VkValue::value_as<vkgraph::DoubleList>() const {
|
| 1022 |
+
return value_as_DoubleList();
|
| 1023 |
+
}
|
| 1024 |
+
|
| 1025 |
+
template<> inline const vkgraph::BoolList *VkValue::value_as<vkgraph::BoolList>() const {
|
| 1026 |
+
return value_as_BoolList();
|
| 1027 |
+
}
|
| 1028 |
+
|
| 1029 |
+
template<> inline const vkgraph::ValueList *VkValue::value_as<vkgraph::ValueList>() const {
|
| 1030 |
+
return value_as_ValueList();
|
| 1031 |
+
}
|
| 1032 |
+
|
| 1033 |
+
template<> inline const vkgraph::String *VkValue::value_as<vkgraph::String>() const {
|
| 1034 |
+
return value_as_String();
|
| 1035 |
+
}
|
| 1036 |
+
|
| 1037 |
+
template<> inline const vkgraph::SymInt *VkValue::value_as<vkgraph::SymInt>() const {
|
| 1038 |
+
return value_as_SymInt();
|
| 1039 |
+
}
|
| 1040 |
+
|
| 1041 |
+
struct VkValueBuilder {
|
| 1042 |
+
typedef VkValue Table;
|
| 1043 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 1044 |
+
::flatbuffers::uoffset_t start_;
|
| 1045 |
+
void add_value_type(vkgraph::GraphTypes value_type) {
|
| 1046 |
+
fbb_.AddElement<uint8_t>(VkValue::VT_VALUE_TYPE, static_cast<uint8_t>(value_type), 0);
|
| 1047 |
+
}
|
| 1048 |
+
void add_value(::flatbuffers::Offset<void> value) {
|
| 1049 |
+
fbb_.AddOffset(VkValue::VT_VALUE, value);
|
| 1050 |
+
}
|
| 1051 |
+
explicit VkValueBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 1052 |
+
: fbb_(_fbb) {
|
| 1053 |
+
start_ = fbb_.StartTable();
|
| 1054 |
+
}
|
| 1055 |
+
::flatbuffers::Offset<VkValue> Finish() {
|
| 1056 |
+
const auto end = fbb_.EndTable(start_);
|
| 1057 |
+
auto o = ::flatbuffers::Offset<VkValue>(end);
|
| 1058 |
+
return o;
|
| 1059 |
+
}
|
| 1060 |
+
};
|
| 1061 |
+
|
| 1062 |
+
inline ::flatbuffers::Offset<VkValue> CreateVkValue(
|
| 1063 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 1064 |
+
vkgraph::GraphTypes value_type = vkgraph::GraphTypes_NONE,
|
| 1065 |
+
::flatbuffers::Offset<void> value = 0) {
|
| 1066 |
+
VkValueBuilder builder_(_fbb);
|
| 1067 |
+
builder_.add_value(value);
|
| 1068 |
+
builder_.add_value_type(value_type);
|
| 1069 |
+
return builder_.Finish();
|
| 1070 |
+
}
|
| 1071 |
+
|
| 1072 |
+
struct VkBytes FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 1073 |
+
typedef VkBytesBuilder Builder;
|
| 1074 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 1075 |
+
VT_OFFSET = 4,
|
| 1076 |
+
VT_LENGTH = 6,
|
| 1077 |
+
VT_NAMED_KEY = 8
|
| 1078 |
+
};
|
| 1079 |
+
uint64_t offset() const {
|
| 1080 |
+
return GetField<uint64_t>(VT_OFFSET, 0);
|
| 1081 |
+
}
|
| 1082 |
+
uint64_t length() const {
|
| 1083 |
+
return GetField<uint64_t>(VT_LENGTH, 0);
|
| 1084 |
+
}
|
| 1085 |
+
const ::flatbuffers::String *named_key() const {
|
| 1086 |
+
return GetPointer<const ::flatbuffers::String *>(VT_NAMED_KEY);
|
| 1087 |
+
}
|
| 1088 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 1089 |
+
return VerifyTableStart(verifier) &&
|
| 1090 |
+
VerifyField<uint64_t>(verifier, VT_OFFSET, 8) &&
|
| 1091 |
+
VerifyField<uint64_t>(verifier, VT_LENGTH, 8) &&
|
| 1092 |
+
VerifyOffset(verifier, VT_NAMED_KEY) &&
|
| 1093 |
+
verifier.VerifyString(named_key()) &&
|
| 1094 |
+
verifier.EndTable();
|
| 1095 |
+
}
|
| 1096 |
+
};
|
| 1097 |
+
|
| 1098 |
+
struct VkBytesBuilder {
|
| 1099 |
+
typedef VkBytes Table;
|
| 1100 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 1101 |
+
::flatbuffers::uoffset_t start_;
|
| 1102 |
+
void add_offset(uint64_t offset) {
|
| 1103 |
+
fbb_.AddElement<uint64_t>(VkBytes::VT_OFFSET, offset, 0);
|
| 1104 |
+
}
|
| 1105 |
+
void add_length(uint64_t length) {
|
| 1106 |
+
fbb_.AddElement<uint64_t>(VkBytes::VT_LENGTH, length, 0);
|
| 1107 |
+
}
|
| 1108 |
+
void add_named_key(::flatbuffers::Offset<::flatbuffers::String> named_key) {
|
| 1109 |
+
fbb_.AddOffset(VkBytes::VT_NAMED_KEY, named_key);
|
| 1110 |
+
}
|
| 1111 |
+
explicit VkBytesBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 1112 |
+
: fbb_(_fbb) {
|
| 1113 |
+
start_ = fbb_.StartTable();
|
| 1114 |
+
}
|
| 1115 |
+
::flatbuffers::Offset<VkBytes> Finish() {
|
| 1116 |
+
const auto end = fbb_.EndTable(start_);
|
| 1117 |
+
auto o = ::flatbuffers::Offset<VkBytes>(end);
|
| 1118 |
+
return o;
|
| 1119 |
+
}
|
| 1120 |
+
};
|
| 1121 |
+
|
| 1122 |
+
inline ::flatbuffers::Offset<VkBytes> CreateVkBytes(
|
| 1123 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 1124 |
+
uint64_t offset = 0,
|
| 1125 |
+
uint64_t length = 0,
|
| 1126 |
+
::flatbuffers::Offset<::flatbuffers::String> named_key = 0) {
|
| 1127 |
+
VkBytesBuilder builder_(_fbb);
|
| 1128 |
+
builder_.add_length(length);
|
| 1129 |
+
builder_.add_offset(offset);
|
| 1130 |
+
builder_.add_named_key(named_key);
|
| 1131 |
+
return builder_.Finish();
|
| 1132 |
+
}
|
| 1133 |
+
|
| 1134 |
+
inline ::flatbuffers::Offset<VkBytes> CreateVkBytesDirect(
|
| 1135 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 1136 |
+
uint64_t offset = 0,
|
| 1137 |
+
uint64_t length = 0,
|
| 1138 |
+
const char *named_key = nullptr) {
|
| 1139 |
+
auto named_key__ = named_key ? _fbb.CreateString(named_key) : 0;
|
| 1140 |
+
return vkgraph::CreateVkBytes(
|
| 1141 |
+
_fbb,
|
| 1142 |
+
offset,
|
| 1143 |
+
length,
|
| 1144 |
+
named_key__);
|
| 1145 |
+
}
|
| 1146 |
+
|
| 1147 |
+
struct VkGraph FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
| 1148 |
+
typedef VkGraphBuilder Builder;
|
| 1149 |
+
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
| 1150 |
+
VT_VERSION = 4,
|
| 1151 |
+
VT_CHAIN = 6,
|
| 1152 |
+
VT_VALUES = 8,
|
| 1153 |
+
VT_INPUT_IDS = 10,
|
| 1154 |
+
VT_OUTPUT_IDS = 12,
|
| 1155 |
+
VT_CONSTANTS = 14,
|
| 1156 |
+
VT_SHADERS = 16,
|
| 1157 |
+
VT_STORAGE_TYPE_OVERRIDE = 18,
|
| 1158 |
+
VT_MEMORY_LAYOUT_OVERRIDE = 20
|
| 1159 |
+
};
|
| 1160 |
+
const ::flatbuffers::String *version() const {
|
| 1161 |
+
return GetPointer<const ::flatbuffers::String *>(VT_VERSION);
|
| 1162 |
+
}
|
| 1163 |
+
const ::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::OperatorCall>> *chain() const {
|
| 1164 |
+
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::OperatorCall>> *>(VT_CHAIN);
|
| 1165 |
+
}
|
| 1166 |
+
const ::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkValue>> *values() const {
|
| 1167 |
+
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkValue>> *>(VT_VALUES);
|
| 1168 |
+
}
|
| 1169 |
+
const ::flatbuffers::Vector<uint32_t> *input_ids() const {
|
| 1170 |
+
return GetPointer<const ::flatbuffers::Vector<uint32_t> *>(VT_INPUT_IDS);
|
| 1171 |
+
}
|
| 1172 |
+
const ::flatbuffers::Vector<uint32_t> *output_ids() const {
|
| 1173 |
+
return GetPointer<const ::flatbuffers::Vector<uint32_t> *>(VT_OUTPUT_IDS);
|
| 1174 |
+
}
|
| 1175 |
+
const ::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkBytes>> *constants() const {
|
| 1176 |
+
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkBytes>> *>(VT_CONSTANTS);
|
| 1177 |
+
}
|
| 1178 |
+
const ::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkBytes>> *shaders() const {
|
| 1179 |
+
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkBytes>> *>(VT_SHADERS);
|
| 1180 |
+
}
|
| 1181 |
+
vkgraph::VkStorageType storage_type_override() const {
|
| 1182 |
+
return static_cast<vkgraph::VkStorageType>(GetField<uint8_t>(VT_STORAGE_TYPE_OVERRIDE, 255));
|
| 1183 |
+
}
|
| 1184 |
+
vkgraph::VkMemoryLayout memory_layout_override() const {
|
| 1185 |
+
return static_cast<vkgraph::VkMemoryLayout>(GetField<uint8_t>(VT_MEMORY_LAYOUT_OVERRIDE, 255));
|
| 1186 |
+
}
|
| 1187 |
+
bool Verify(::flatbuffers::Verifier &verifier) const {
|
| 1188 |
+
return VerifyTableStart(verifier) &&
|
| 1189 |
+
VerifyOffset(verifier, VT_VERSION) &&
|
| 1190 |
+
verifier.VerifyString(version()) &&
|
| 1191 |
+
VerifyOffset(verifier, VT_CHAIN) &&
|
| 1192 |
+
verifier.VerifyVector(chain()) &&
|
| 1193 |
+
verifier.VerifyVectorOfTables(chain()) &&
|
| 1194 |
+
VerifyOffset(verifier, VT_VALUES) &&
|
| 1195 |
+
verifier.VerifyVector(values()) &&
|
| 1196 |
+
verifier.VerifyVectorOfTables(values()) &&
|
| 1197 |
+
VerifyOffset(verifier, VT_INPUT_IDS) &&
|
| 1198 |
+
verifier.VerifyVector(input_ids()) &&
|
| 1199 |
+
VerifyOffset(verifier, VT_OUTPUT_IDS) &&
|
| 1200 |
+
verifier.VerifyVector(output_ids()) &&
|
| 1201 |
+
VerifyOffset(verifier, VT_CONSTANTS) &&
|
| 1202 |
+
verifier.VerifyVector(constants()) &&
|
| 1203 |
+
verifier.VerifyVectorOfTables(constants()) &&
|
| 1204 |
+
VerifyOffset(verifier, VT_SHADERS) &&
|
| 1205 |
+
verifier.VerifyVector(shaders()) &&
|
| 1206 |
+
verifier.VerifyVectorOfTables(shaders()) &&
|
| 1207 |
+
VerifyField<uint8_t>(verifier, VT_STORAGE_TYPE_OVERRIDE, 1) &&
|
| 1208 |
+
VerifyField<uint8_t>(verifier, VT_MEMORY_LAYOUT_OVERRIDE, 1) &&
|
| 1209 |
+
verifier.EndTable();
|
| 1210 |
+
}
|
| 1211 |
+
};
|
| 1212 |
+
|
| 1213 |
+
struct VkGraphBuilder {
|
| 1214 |
+
typedef VkGraph Table;
|
| 1215 |
+
::flatbuffers::FlatBufferBuilder &fbb_;
|
| 1216 |
+
::flatbuffers::uoffset_t start_;
|
| 1217 |
+
void add_version(::flatbuffers::Offset<::flatbuffers::String> version) {
|
| 1218 |
+
fbb_.AddOffset(VkGraph::VT_VERSION, version);
|
| 1219 |
+
}
|
| 1220 |
+
void add_chain(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::OperatorCall>>> chain) {
|
| 1221 |
+
fbb_.AddOffset(VkGraph::VT_CHAIN, chain);
|
| 1222 |
+
}
|
| 1223 |
+
void add_values(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkValue>>> values) {
|
| 1224 |
+
fbb_.AddOffset(VkGraph::VT_VALUES, values);
|
| 1225 |
+
}
|
| 1226 |
+
void add_input_ids(::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> input_ids) {
|
| 1227 |
+
fbb_.AddOffset(VkGraph::VT_INPUT_IDS, input_ids);
|
| 1228 |
+
}
|
| 1229 |
+
void add_output_ids(::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> output_ids) {
|
| 1230 |
+
fbb_.AddOffset(VkGraph::VT_OUTPUT_IDS, output_ids);
|
| 1231 |
+
}
|
| 1232 |
+
void add_constants(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkBytes>>> constants) {
|
| 1233 |
+
fbb_.AddOffset(VkGraph::VT_CONSTANTS, constants);
|
| 1234 |
+
}
|
| 1235 |
+
void add_shaders(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkBytes>>> shaders) {
|
| 1236 |
+
fbb_.AddOffset(VkGraph::VT_SHADERS, shaders);
|
| 1237 |
+
}
|
| 1238 |
+
void add_storage_type_override(vkgraph::VkStorageType storage_type_override) {
|
| 1239 |
+
fbb_.AddElement<uint8_t>(VkGraph::VT_STORAGE_TYPE_OVERRIDE, static_cast<uint8_t>(storage_type_override), 255);
|
| 1240 |
+
}
|
| 1241 |
+
void add_memory_layout_override(vkgraph::VkMemoryLayout memory_layout_override) {
|
| 1242 |
+
fbb_.AddElement<uint8_t>(VkGraph::VT_MEMORY_LAYOUT_OVERRIDE, static_cast<uint8_t>(memory_layout_override), 255);
|
| 1243 |
+
}
|
| 1244 |
+
explicit VkGraphBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
| 1245 |
+
: fbb_(_fbb) {
|
| 1246 |
+
start_ = fbb_.StartTable();
|
| 1247 |
+
}
|
| 1248 |
+
::flatbuffers::Offset<VkGraph> Finish() {
|
| 1249 |
+
const auto end = fbb_.EndTable(start_);
|
| 1250 |
+
auto o = ::flatbuffers::Offset<VkGraph>(end);
|
| 1251 |
+
return o;
|
| 1252 |
+
}
|
| 1253 |
+
};
|
| 1254 |
+
|
| 1255 |
+
inline ::flatbuffers::Offset<VkGraph> CreateVkGraph(
|
| 1256 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 1257 |
+
::flatbuffers::Offset<::flatbuffers::String> version = 0,
|
| 1258 |
+
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::OperatorCall>>> chain = 0,
|
| 1259 |
+
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkValue>>> values = 0,
|
| 1260 |
+
::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> input_ids = 0,
|
| 1261 |
+
::flatbuffers::Offset<::flatbuffers::Vector<uint32_t>> output_ids = 0,
|
| 1262 |
+
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkBytes>>> constants = 0,
|
| 1263 |
+
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<vkgraph::VkBytes>>> shaders = 0,
|
| 1264 |
+
vkgraph::VkStorageType storage_type_override = vkgraph::VkStorageType_DEFAULT_STORAGE,
|
| 1265 |
+
vkgraph::VkMemoryLayout memory_layout_override = vkgraph::VkMemoryLayout_DEFAULT_LAYOUT) {
|
| 1266 |
+
VkGraphBuilder builder_(_fbb);
|
| 1267 |
+
builder_.add_shaders(shaders);
|
| 1268 |
+
builder_.add_constants(constants);
|
| 1269 |
+
builder_.add_output_ids(output_ids);
|
| 1270 |
+
builder_.add_input_ids(input_ids);
|
| 1271 |
+
builder_.add_values(values);
|
| 1272 |
+
builder_.add_chain(chain);
|
| 1273 |
+
builder_.add_version(version);
|
| 1274 |
+
builder_.add_memory_layout_override(memory_layout_override);
|
| 1275 |
+
builder_.add_storage_type_override(storage_type_override);
|
| 1276 |
+
return builder_.Finish();
|
| 1277 |
+
}
|
| 1278 |
+
|
| 1279 |
+
inline ::flatbuffers::Offset<VkGraph> CreateVkGraphDirect(
|
| 1280 |
+
::flatbuffers::FlatBufferBuilder &_fbb,
|
| 1281 |
+
const char *version = nullptr,
|
| 1282 |
+
const std::vector<::flatbuffers::Offset<vkgraph::OperatorCall>> *chain = nullptr,
|
| 1283 |
+
const std::vector<::flatbuffers::Offset<vkgraph::VkValue>> *values = nullptr,
|
| 1284 |
+
const std::vector<uint32_t> *input_ids = nullptr,
|
| 1285 |
+
const std::vector<uint32_t> *output_ids = nullptr,
|
| 1286 |
+
const std::vector<::flatbuffers::Offset<vkgraph::VkBytes>> *constants = nullptr,
|
| 1287 |
+
const std::vector<::flatbuffers::Offset<vkgraph::VkBytes>> *shaders = nullptr,
|
| 1288 |
+
vkgraph::VkStorageType storage_type_override = vkgraph::VkStorageType_DEFAULT_STORAGE,
|
| 1289 |
+
vkgraph::VkMemoryLayout memory_layout_override = vkgraph::VkMemoryLayout_DEFAULT_LAYOUT) {
|
| 1290 |
+
auto version__ = version ? _fbb.CreateString(version) : 0;
|
| 1291 |
+
auto chain__ = chain ? _fbb.CreateVector<::flatbuffers::Offset<vkgraph::OperatorCall>>(*chain) : 0;
|
| 1292 |
+
auto values__ = values ? _fbb.CreateVector<::flatbuffers::Offset<vkgraph::VkValue>>(*values) : 0;
|
| 1293 |
+
auto input_ids__ = input_ids ? _fbb.CreateVector<uint32_t>(*input_ids) : 0;
|
| 1294 |
+
auto output_ids__ = output_ids ? _fbb.CreateVector<uint32_t>(*output_ids) : 0;
|
| 1295 |
+
auto constants__ = constants ? _fbb.CreateVector<::flatbuffers::Offset<vkgraph::VkBytes>>(*constants) : 0;
|
| 1296 |
+
auto shaders__ = shaders ? _fbb.CreateVector<::flatbuffers::Offset<vkgraph::VkBytes>>(*shaders) : 0;
|
| 1297 |
+
return vkgraph::CreateVkGraph(
|
| 1298 |
+
_fbb,
|
| 1299 |
+
version__,
|
| 1300 |
+
chain__,
|
| 1301 |
+
values__,
|
| 1302 |
+
input_ids__,
|
| 1303 |
+
output_ids__,
|
| 1304 |
+
constants__,
|
| 1305 |
+
shaders__,
|
| 1306 |
+
storage_type_override,
|
| 1307 |
+
memory_layout_override);
|
| 1308 |
+
}
|
| 1309 |
+
|
| 1310 |
+
inline bool VerifyGraphTypes(::flatbuffers::Verifier &verifier, const void *obj, GraphTypes type) {
|
| 1311 |
+
switch (type) {
|
| 1312 |
+
case GraphTypes_NONE: {
|
| 1313 |
+
return true;
|
| 1314 |
+
}
|
| 1315 |
+
case GraphTypes_Null: {
|
| 1316 |
+
auto ptr = reinterpret_cast<const vkgraph::Null *>(obj);
|
| 1317 |
+
return verifier.VerifyTable(ptr);
|
| 1318 |
+
}
|
| 1319 |
+
case GraphTypes_Int: {
|
| 1320 |
+
auto ptr = reinterpret_cast<const vkgraph::Int *>(obj);
|
| 1321 |
+
return verifier.VerifyTable(ptr);
|
| 1322 |
+
}
|
| 1323 |
+
case GraphTypes_Double: {
|
| 1324 |
+
auto ptr = reinterpret_cast<const vkgraph::Double *>(obj);
|
| 1325 |
+
return verifier.VerifyTable(ptr);
|
| 1326 |
+
}
|
| 1327 |
+
case GraphTypes_Bool: {
|
| 1328 |
+
auto ptr = reinterpret_cast<const vkgraph::Bool *>(obj);
|
| 1329 |
+
return verifier.VerifyTable(ptr);
|
| 1330 |
+
}
|
| 1331 |
+
case GraphTypes_VkTensor: {
|
| 1332 |
+
auto ptr = reinterpret_cast<const vkgraph::VkTensor *>(obj);
|
| 1333 |
+
return verifier.VerifyTable(ptr);
|
| 1334 |
+
}
|
| 1335 |
+
case GraphTypes_IntList: {
|
| 1336 |
+
auto ptr = reinterpret_cast<const vkgraph::IntList *>(obj);
|
| 1337 |
+
return verifier.VerifyTable(ptr);
|
| 1338 |
+
}
|
| 1339 |
+
case GraphTypes_DoubleList: {
|
| 1340 |
+
auto ptr = reinterpret_cast<const vkgraph::DoubleList *>(obj);
|
| 1341 |
+
return verifier.VerifyTable(ptr);
|
| 1342 |
+
}
|
| 1343 |
+
case GraphTypes_BoolList: {
|
| 1344 |
+
auto ptr = reinterpret_cast<const vkgraph::BoolList *>(obj);
|
| 1345 |
+
return verifier.VerifyTable(ptr);
|
| 1346 |
+
}
|
| 1347 |
+
case GraphTypes_ValueList: {
|
| 1348 |
+
auto ptr = reinterpret_cast<const vkgraph::ValueList *>(obj);
|
| 1349 |
+
return verifier.VerifyTable(ptr);
|
| 1350 |
+
}
|
| 1351 |
+
case GraphTypes_String: {
|
| 1352 |
+
auto ptr = reinterpret_cast<const vkgraph::String *>(obj);
|
| 1353 |
+
return verifier.VerifyTable(ptr);
|
| 1354 |
+
}
|
| 1355 |
+
case GraphTypes_SymInt: {
|
| 1356 |
+
auto ptr = reinterpret_cast<const vkgraph::SymInt *>(obj);
|
| 1357 |
+
return verifier.VerifyTable(ptr);
|
| 1358 |
+
}
|
| 1359 |
+
default: return true;
|
| 1360 |
+
}
|
| 1361 |
+
}
|
| 1362 |
+
|
| 1363 |
+
inline bool VerifyGraphTypesVector(::flatbuffers::Verifier &verifier, const ::flatbuffers::Vector<::flatbuffers::Offset<void>> *values, const ::flatbuffers::Vector<uint8_t> *types) {
|
| 1364 |
+
if (!values || !types) return !values && !types;
|
| 1365 |
+
if (values->size() != types->size()) return false;
|
| 1366 |
+
for (::flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
|
| 1367 |
+
if (!VerifyGraphTypes(
|
| 1368 |
+
verifier, values->Get(i), types->GetEnum<GraphTypes>(i))) {
|
| 1369 |
+
return false;
|
| 1370 |
+
}
|
| 1371 |
+
}
|
| 1372 |
+
return true;
|
| 1373 |
+
}
|
| 1374 |
+
|
| 1375 |
+
inline const vkgraph::VkGraph *GetVkGraph(const void *buf) {
|
| 1376 |
+
return ::flatbuffers::GetRoot<vkgraph::VkGraph>(buf);
|
| 1377 |
+
}
|
| 1378 |
+
|
| 1379 |
+
inline const vkgraph::VkGraph *GetSizePrefixedVkGraph(const void *buf) {
|
| 1380 |
+
return ::flatbuffers::GetSizePrefixedRoot<vkgraph::VkGraph>(buf);
|
| 1381 |
+
}
|
| 1382 |
+
|
| 1383 |
+
inline const char *VkGraphIdentifier() {
|
| 1384 |
+
return "VK00";
|
| 1385 |
+
}
|
| 1386 |
+
|
| 1387 |
+
inline bool VkGraphBufferHasIdentifier(const void *buf) {
|
| 1388 |
+
return ::flatbuffers::BufferHasIdentifier(
|
| 1389 |
+
buf, VkGraphIdentifier());
|
| 1390 |
+
}
|
| 1391 |
+
|
| 1392 |
+
inline bool SizePrefixedVkGraphBufferHasIdentifier(const void *buf) {
|
| 1393 |
+
return ::flatbuffers::BufferHasIdentifier(
|
| 1394 |
+
buf, VkGraphIdentifier(), true);
|
| 1395 |
+
}
|
| 1396 |
+
|
| 1397 |
+
inline bool VerifyVkGraphBuffer(
|
| 1398 |
+
::flatbuffers::Verifier &verifier) {
|
| 1399 |
+
return verifier.VerifyBuffer<vkgraph::VkGraph>(VkGraphIdentifier());
|
| 1400 |
+
}
|
| 1401 |
+
|
| 1402 |
+
inline bool VerifySizePrefixedVkGraphBuffer(
|
| 1403 |
+
::flatbuffers::Verifier &verifier) {
|
| 1404 |
+
return verifier.VerifySizePrefixedBuffer<vkgraph::VkGraph>(VkGraphIdentifier());
|
| 1405 |
+
}
|
| 1406 |
+
|
| 1407 |
+
inline void FinishVkGraphBuffer(
|
| 1408 |
+
::flatbuffers::FlatBufferBuilder &fbb,
|
| 1409 |
+
::flatbuffers::Offset<vkgraph::VkGraph> root) {
|
| 1410 |
+
fbb.Finish(root, VkGraphIdentifier());
|
| 1411 |
+
}
|
| 1412 |
+
|
| 1413 |
+
inline void FinishSizePrefixedVkGraphBuffer(
|
| 1414 |
+
::flatbuffers::FlatBufferBuilder &fbb,
|
| 1415 |
+
::flatbuffers::Offset<vkgraph::VkGraph> root) {
|
| 1416 |
+
fbb.FinishSizePrefixed(root, VkGraphIdentifier());
|
| 1417 |
+
}
|
| 1418 |
+
|
| 1419 |
+
} // namespace vkgraph
|
| 1420 |
+
|
| 1421 |
+
#endif // FLATBUFFERS_GENERATED_VKGRAPH_VKGRAPH_H_
|