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