TT-MLIR
system_desc_generated.h
Go to the documentation of this file.
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_SYSTEMDESC_TT_TARGET_H_
5 #define FLATBUFFERS_GENERATED_SYSTEMDESC_TT_TARGET_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 
18 
19 // For access to the binary schema that produced this file.
21 
22 namespace tt {
23 namespace target {
24 
25 struct SystemDescRoot;
26 struct SystemDescRootBuilder;
27 
28 struct SystemDescRoot FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
31  struct Traits;
32  static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
33  return "tt.target.SystemDescRoot";
34  }
35  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
39  VT_SYSTEM_DESC = 10
40  };
41  const tt::target::Version *version() const {
42  return GetStruct<const tt::target::Version *>(VT_VERSION);
43  }
44  const ::flatbuffers::String *ttmlir_git_hash() const {
45  return GetPointer<const ::flatbuffers::String *>(VT_TTMLIR_GIT_HASH);
46  }
47  const ::flatbuffers::String *product_identifier() const {
48  return GetPointer<const ::flatbuffers::String *>(VT_PRODUCT_IDENTIFIER);
49  }
50  const tt::target::SystemDesc *system_desc() const {
51  return GetPointer<const tt::target::SystemDesc *>(VT_SYSTEM_DESC);
52  }
53  bool Verify(::flatbuffers::Verifier &verifier) const {
54  return VerifyTableStart(verifier) &&
55  VerifyField<tt::target::Version>(verifier, VT_VERSION, 4) &&
56  VerifyOffset(verifier, VT_TTMLIR_GIT_HASH) &&
57  verifier.VerifyString(ttmlir_git_hash()) &&
58  VerifyOffset(verifier, VT_PRODUCT_IDENTIFIER) &&
59  verifier.VerifyString(product_identifier()) &&
60  VerifyOffset(verifier, VT_SYSTEM_DESC) &&
61  verifier.VerifyTable(system_desc()) &&
62  verifier.EndTable();
63  }
64 };
65 
67  typedef SystemDescRoot Table;
68  ::flatbuffers::FlatBufferBuilder &fbb_;
69  ::flatbuffers::uoffset_t start_;
70  void add_version(const tt::target::Version *version) {
71  fbb_.AddStruct(SystemDescRoot::VT_VERSION, version);
72  }
73  void add_ttmlir_git_hash(::flatbuffers::Offset<::flatbuffers::String> ttmlir_git_hash) {
74  fbb_.AddOffset(SystemDescRoot::VT_TTMLIR_GIT_HASH, ttmlir_git_hash);
75  }
76  void add_product_identifier(::flatbuffers::Offset<::flatbuffers::String> product_identifier) {
77  fbb_.AddOffset(SystemDescRoot::VT_PRODUCT_IDENTIFIER, product_identifier);
78  }
79  void add_system_desc(::flatbuffers::Offset<tt::target::SystemDesc> system_desc) {
80  fbb_.AddOffset(SystemDescRoot::VT_SYSTEM_DESC, system_desc);
81  }
82  explicit SystemDescRootBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
83  : fbb_(_fbb) {
84  start_ = fbb_.StartTable();
85  }
86  ::flatbuffers::Offset<SystemDescRoot> Finish() {
87  const auto end = fbb_.EndTable(start_);
88  auto o = ::flatbuffers::Offset<SystemDescRoot>(end);
89  return o;
90  }
91 };
92 
93 inline ::flatbuffers::Offset<SystemDescRoot> CreateSystemDescRoot(
94  ::flatbuffers::FlatBufferBuilder &_fbb,
95  const tt::target::Version *version = nullptr,
96  ::flatbuffers::Offset<::flatbuffers::String> ttmlir_git_hash = 0,
97  ::flatbuffers::Offset<::flatbuffers::String> product_identifier = 0,
98  ::flatbuffers::Offset<tt::target::SystemDesc> system_desc = 0) {
99  SystemDescRootBuilder builder_(_fbb);
100  builder_.add_system_desc(system_desc);
101  builder_.add_product_identifier(product_identifier);
102  builder_.add_ttmlir_git_hash(ttmlir_git_hash);
103  builder_.add_version(version);
104  return builder_.Finish();
105 }
106 
108  using type = SystemDescRoot;
109  static auto constexpr Create = CreateSystemDescRoot;
110 };
111 
112 inline ::flatbuffers::Offset<SystemDescRoot> CreateSystemDescRootDirect(
113  ::flatbuffers::FlatBufferBuilder &_fbb,
114  const tt::target::Version *version = nullptr,
115  const char *ttmlir_git_hash = nullptr,
116  const char *product_identifier = nullptr,
117  ::flatbuffers::Offset<tt::target::SystemDesc> system_desc = 0) {
118  auto ttmlir_git_hash__ = ttmlir_git_hash ? _fbb.CreateString(ttmlir_git_hash) : 0;
119  auto product_identifier__ = product_identifier ? _fbb.CreateString(product_identifier) : 0;
121  _fbb,
122  version,
123  ttmlir_git_hash__,
124  product_identifier__,
125  system_desc);
126 }
127 
128 inline const tt::target::SystemDescRoot *GetSystemDescRoot(const void *buf) {
129  return ::flatbuffers::GetRoot<tt::target::SystemDescRoot>(buf);
130 }
131 
132 inline const tt::target::SystemDescRoot *GetSizePrefixedSystemDescRoot(const void *buf) {
133  return ::flatbuffers::GetSizePrefixedRoot<tt::target::SystemDescRoot>(buf);
134 }
135 
136 inline const char *SystemDescRootIdentifier() {
137  return "TTSY";
138 }
139 
140 inline bool SystemDescRootBufferHasIdentifier(const void *buf) {
141  return ::flatbuffers::BufferHasIdentifier(
142  buf, SystemDescRootIdentifier());
143 }
144 
145 inline bool SizePrefixedSystemDescRootBufferHasIdentifier(const void *buf) {
146  return ::flatbuffers::BufferHasIdentifier(
147  buf, SystemDescRootIdentifier(), true);
148 }
149 
151  ::flatbuffers::Verifier &verifier) {
152  return verifier.VerifyBuffer<tt::target::SystemDescRoot>(SystemDescRootIdentifier());
153 }
154 
156  ::flatbuffers::Verifier &verifier) {
157  return verifier.VerifySizePrefixedBuffer<tt::target::SystemDescRoot>(SystemDescRootIdentifier());
158 }
159 
160 inline const char *SystemDescRootExtension() {
161  return "ttsys";
162 }
163 
165  ::flatbuffers::FlatBufferBuilder &fbb,
166  ::flatbuffers::Offset<tt::target::SystemDescRoot> root) {
167  fbb.Finish(root, SystemDescRootIdentifier());
168 }
169 
171  ::flatbuffers::FlatBufferBuilder &fbb,
172  ::flatbuffers::Offset<tt::target::SystemDescRoot> root) {
173  fbb.FinishSizePrefixed(root, SystemDescRootIdentifier());
174 }
175 
176 } // namespace target
177 } // namespace tt
178 
179 #endif // FLATBUFFERS_GENERATED_SYSTEMDESC_TT_TARGET_H_
VT_SYSTEM_DESC
Definition: binary_generated.h:526
bool SystemDescRootBufferHasIdentifier(const void *buf)
Definition: system_desc_generated.h:140
const char * SystemDescRootExtension()
Definition: system_desc_generated.h:160
bool VerifySystemDescRootBuffer(::flatbuffers::Verifier &verifier)
Definition: system_desc_generated.h:150
const tt::target::SystemDescRoot * GetSystemDescRoot(const void *buf)
Definition: system_desc_generated.h:128
bool SizePrefixedSystemDescRootBufferHasIdentifier(const void *buf)
Definition: system_desc_generated.h:145
void FinishSystemDescRootBuffer(::flatbuffers::FlatBufferBuilder &fbb, ::flatbuffers::Offset< tt::target::SystemDescRoot > root)
Definition: system_desc_generated.h:164
inline ::flatbuffers::Offset< SystemDescRoot > CreateSystemDescRootDirect(::flatbuffers::FlatBufferBuilder &_fbb, const tt::target::Version *version=nullptr, const char *ttmlir_git_hash=nullptr, const char *product_identifier=nullptr, ::flatbuffers::Offset< tt::target::SystemDesc > system_desc=0)
Definition: system_desc_generated.h:112
inline ::flatbuffers::Offset< SystemDescRoot > CreateSystemDescRoot(::flatbuffers::FlatBufferBuilder &_fbb, const tt::target::Version *version=nullptr, ::flatbuffers::Offset<::flatbuffers::String > ttmlir_git_hash=0, ::flatbuffers::Offset<::flatbuffers::String > product_identifier=0, ::flatbuffers::Offset< tt::target::SystemDesc > system_desc=0)
Definition: system_desc_generated.h:93
const tt::target::SystemDescRoot * GetSizePrefixedSystemDescRoot(const void *buf)
Definition: system_desc_generated.h:132
bool VerifySizePrefixedSystemDescRootBuffer(::flatbuffers::Verifier &verifier)
Definition: system_desc_generated.h:155
void FinishSizePrefixedSystemDescRootBuffer(::flatbuffers::FlatBufferBuilder &fbb, ::flatbuffers::Offset< tt::target::SystemDescRoot > root)
Definition: system_desc_generated.h:170
const char * SystemDescRootIdentifier()
Definition: system_desc_generated.h:136
Definition: debug_info_generated.h:18
const tt::target::SystemDesc * system_desc() const
Definition: system_desc_generated.h:50
const ::flatbuffers::String * ttmlir_git_hash() const
Definition: system_desc_generated.h:44
static FLATBUFFERS_CONSTEXPR_CPP11 const char * GetFullyQualifiedName()
Definition: system_desc_generated.h:32
tt::target::SystemDescRootBinarySchema BinarySchema
Definition: system_desc_generated.h:30
SystemDescRootBuilder Builder
Definition: system_desc_generated.h:29
const tt::target::Version * version() const
Definition: system_desc_generated.h:41
const ::flatbuffers::String * product_identifier() const
Definition: system_desc_generated.h:47
bool Verify(::flatbuffers::Verifier &verifier) const
Definition: system_desc_generated.h:53
Definition: system_desc_bfbs_generated.h:12
Definition: system_desc_generated.h:66
SystemDescRoot Table
Definition: system_desc_generated.h:67
::flatbuffers::uoffset_t start_
Definition: system_desc_generated.h:69
::flatbuffers::FlatBufferBuilder & fbb_
Definition: system_desc_generated.h:68
void add_version(const tt::target::Version *version)
Definition: system_desc_generated.h:70
SystemDescRootBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
Definition: system_desc_generated.h:82
void add_product_identifier(::flatbuffers::Offset<::flatbuffers::String > product_identifier)
Definition: system_desc_generated.h:76
::flatbuffers::Offset< SystemDescRoot > Finish()
Definition: system_desc_generated.h:86
void add_ttmlir_git_hash(::flatbuffers::Offset<::flatbuffers::String > ttmlir_git_hash)
Definition: system_desc_generated.h:73
void add_system_desc(::flatbuffers::Offset< tt::target::SystemDesc > system_desc)
Definition: system_desc_generated.h:79
Definition: system_desc_generated.h:107
SystemDescRoot type
Definition: system_desc_generated.h:108
static constexpr auto Create
Definition: system_desc_generated.h:109
VT_VERSION
Definition: system_desc_generated.h:36
VT_PRODUCT_IDENTIFIER
Definition: system_desc_generated.h:38
VT_TTMLIR_GIT_HASH
Definition: system_desc_generated.h:37