ArmNN
 24.08
ClContextSchema_generated.h
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 // automatically generated by the FlatBuffers compiler, do not modify
7 
8 #ifndef FLATBUFFERS_GENERATED_CLCONTEXTSCHEMA_ARMNN_H_
9 #define FLATBUFFERS_GENERATED_CLCONTEXTSCHEMA_ARMNN_H_
10 
11 #include "flatbuffers/flatbuffers.h"
12 
13 namespace armnn {
14 
15 struct ClContext;
16 struct ClContextBuilder;
17 
18 struct Program;
19 struct ProgramBuilder;
20 
21 struct ClContext FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
23  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
24  VT_PROGRAMS = 4
25  };
26  const flatbuffers::Vector<flatbuffers::Offset<armnn::Program>> *programs() const {
27  return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<armnn::Program>> *>(VT_PROGRAMS);
28  }
29  bool Verify(flatbuffers::Verifier &verifier) const {
30  return VerifyTableStart(verifier) &&
31  VerifyOffset(verifier, VT_PROGRAMS) &&
32  verifier.VerifyVector(programs()) &&
33  verifier.VerifyVectorOfTables(programs()) &&
34  verifier.EndTable();
35  }
36 };
37 
39  typedef ClContext Table;
40  flatbuffers::FlatBufferBuilder &fbb_;
41  flatbuffers::uoffset_t start_;
42  void add_programs(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnn::Program>>> programs) {
43  fbb_.AddOffset(ClContext::VT_PROGRAMS, programs);
44  }
45  explicit ClContextBuilder(flatbuffers::FlatBufferBuilder &_fbb)
46  : fbb_(_fbb) {
47  start_ = fbb_.StartTable();
48  }
50  flatbuffers::Offset<ClContext> Finish() {
51  const auto end = fbb_.EndTable(start_);
52  auto o = flatbuffers::Offset<ClContext>(end);
53  return o;
54  }
55 };
56 
57 inline flatbuffers::Offset<ClContext> CreateClContext(
58  flatbuffers::FlatBufferBuilder &_fbb,
59  flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnn::Program>>> programs = 0) {
60  ClContextBuilder builder_(_fbb);
61  builder_.add_programs(programs);
62  return builder_.Finish();
63 }
64 
65 inline flatbuffers::Offset<ClContext> CreateClContextDirect(
66  flatbuffers::FlatBufferBuilder &_fbb,
67  const std::vector<flatbuffers::Offset<armnn::Program>> *programs = nullptr) {
68  auto programs__ = programs ? _fbb.CreateVector<flatbuffers::Offset<armnn::Program>>(*programs) : 0;
70  _fbb,
71  programs__);
72 }
73 
74 struct Program FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
76  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
77  VT_NAME = 4,
78  VT_BINARY = 6
79  };
80  const flatbuffers::String *name() const {
81  return GetPointer<const flatbuffers::String *>(VT_NAME);
82  }
83  const flatbuffers::Vector<uint8_t> *binary() const {
84  return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_BINARY);
85  }
86  bool Verify(flatbuffers::Verifier &verifier) const {
87  return VerifyTableStart(verifier) &&
88  VerifyOffset(verifier, VT_NAME) &&
89  verifier.VerifyString(name()) &&
90  VerifyOffset(verifier, VT_BINARY) &&
91  verifier.VerifyVector(binary()) &&
92  verifier.EndTable();
93  }
94 };
95 
97  typedef Program Table;
98  flatbuffers::FlatBufferBuilder &fbb_;
99  flatbuffers::uoffset_t start_;
100  void add_name(flatbuffers::Offset<flatbuffers::String> name) {
101  fbb_.AddOffset(Program::VT_NAME, name);
102  }
103  void add_binary(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> binary) {
104  fbb_.AddOffset(Program::VT_BINARY, binary);
105  }
106  explicit ProgramBuilder(flatbuffers::FlatBufferBuilder &_fbb)
107  : fbb_(_fbb) {
108  start_ = fbb_.StartTable();
109  }
111  flatbuffers::Offset<Program> Finish() {
112  const auto end = fbb_.EndTable(start_);
113  auto o = flatbuffers::Offset<Program>(end);
114  return o;
115  }
116 };
117 
118 inline flatbuffers::Offset<Program> CreateProgram(
119  flatbuffers::FlatBufferBuilder &_fbb,
120  flatbuffers::Offset<flatbuffers::String> name = 0,
121  flatbuffers::Offset<flatbuffers::Vector<uint8_t>> binary = 0) {
122  ProgramBuilder builder_(_fbb);
123  builder_.add_binary(binary);
124  builder_.add_name(name);
125  return builder_.Finish();
126 }
127 
128 inline flatbuffers::Offset<Program> CreateProgramDirect(
129  flatbuffers::FlatBufferBuilder &_fbb,
130  const char *name = nullptr,
131  const std::vector<uint8_t> *binary = nullptr) {
132  auto name__ = name ? _fbb.CreateString(name) : 0;
133  auto binary__ = binary ? _fbb.CreateVector<uint8_t>(*binary) : 0;
134  return armnn::CreateProgram(
135  _fbb,
136  name__,
137  binary__);
138 }
139 
140 inline const armnn::ClContext *GetClContext(const void *buf) {
141  return flatbuffers::GetRoot<armnn::ClContext>(buf);
142 }
143 
144 inline const armnn::ClContext *GetSizePrefixedClContext(const void *buf) {
145  return flatbuffers::GetSizePrefixedRoot<armnn::ClContext>(buf);
146 }
147 
148 inline const char *ClContextIdentifier() {
149  return "ARMN";
150 }
151 
152 inline bool ClContextBufferHasIdentifier(const void *buf) {
153  return flatbuffers::BufferHasIdentifier(
154  buf, ClContextIdentifier());
155 }
156 
158  flatbuffers::Verifier &verifier) {
159  return verifier.VerifyBuffer<armnn::ClContext>(ClContextIdentifier());
160 }
161 
163  flatbuffers::Verifier &verifier) {
164  return verifier.VerifySizePrefixedBuffer<armnn::ClContext>(ClContextIdentifier());
165 }
166 
167 inline const char *ClContextExtension() {
168  return "armnn";
169 }
170 
172  flatbuffers::FlatBufferBuilder &fbb,
173  flatbuffers::Offset<armnn::ClContext> root) {
174  fbb.Finish(root, ClContextIdentifier());
175 }
176 
178  flatbuffers::FlatBufferBuilder &fbb,
179  flatbuffers::Offset<armnn::ClContext> root) {
180  fbb.FinishSizePrefixed(root, ClContextIdentifier());
181 }
182 
183 } // namespace armnn
184 
185 #endif // FLATBUFFERS_GENERATED_CLCONTEXTSCHEMA_ARMNN_H_
armnn::GetClContext
const armnn::ClContext * GetClContext(const void *buf)
Definition: ClContextSchema_generated.h:140
armnn::ClContextExtension
const char * ClContextExtension()
Definition: ClContextSchema_generated.h:167
armnn::ClContextBuilder
Definition: ClContextSchema_generated.h:38
armnn::FLATBUFFERS_FINAL_CLASS::Builder
ProgramBuilder Builder
Definition: ClContextSchema_generated.h:75
armnn::FLATBUFFERS_FINAL_CLASS
Definition: ClContextSchema_generated.h:21
armnn::VerifyClContextBuffer
bool VerifyClContextBuffer(flatbuffers::Verifier &verifier)
Definition: ClContextSchema_generated.h:157
armnn::FLATBUFFERS_FINAL_CLASS::binary
const flatbuffers::Vector< uint8_t > * binary() const
Definition: ClContextSchema_generated.h:83
armnn::GetSizePrefixedClContext
const armnn::ClContext * GetSizePrefixedClContext(const void *buf)
Definition: ClContextSchema_generated.h:144
armnn::ProgramBuilder
Definition: ClContextSchema_generated.h:96
armnn::CreateProgram
flatbuffers::Offset< Program > CreateProgram(flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset< flatbuffers::String > name=0, flatbuffers::Offset< flatbuffers::Vector< uint8_t >> binary=0)
Definition: ClContextSchema_generated.h:118
armnn::VerifySizePrefixedClContextBuffer
bool VerifySizePrefixedClContextBuffer(flatbuffers::Verifier &verifier)
Definition: ClContextSchema_generated.h:162
armnn::ProgramBuilder::operator=
ProgramBuilder & operator=(const ProgramBuilder &)
armnn::CreateClContextDirect
flatbuffers::Offset< ClContext > CreateClContextDirect(flatbuffers::FlatBufferBuilder &_fbb, const std::vector< flatbuffers::Offset< armnn::Program >> *programs=nullptr)
Definition: ClContextSchema_generated.h:65
armnn::CreateClContext
flatbuffers::Offset< ClContext > CreateClContext(flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< armnn::Program >>> programs=0)
Definition: ClContextSchema_generated.h:57
armnn::ProgramBuilder::Table
Program Table
Definition: ClContextSchema_generated.h:97
armnn::ProgramBuilder::add_binary
void add_binary(flatbuffers::Offset< flatbuffers::Vector< uint8_t >> binary)
Definition: ClContextSchema_generated.h:103
armnn::FLATBUFFERS_FINAL_CLASS::name
const flatbuffers::String * name() const
Definition: ClContextSchema_generated.h:80
armnn::ClContextIdentifier
const char * ClContextIdentifier()
Definition: ClContextSchema_generated.h:148
armnn::ClContextBuilder::add_programs
void add_programs(flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< armnn::Program >>> programs)
Definition: ClContextSchema_generated.h:42
VT_NAME
VT_NAME
Definition: ClContextSchema_generated.h:77
armnn::FLATBUFFERS_FINAL_CLASS::Builder
ClContextBuilder Builder
Definition: ClContextSchema_generated.h:22
armnn::ProgramBuilder::ProgramBuilder
ProgramBuilder(flatbuffers::FlatBufferBuilder &_fbb)
Definition: ClContextSchema_generated.h:106
armnn::FinishClContextBuffer
void FinishClContextBuffer(flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset< armnn::ClContext > root)
Definition: ClContextSchema_generated.h:171
armnn::FLATBUFFERS_FINAL_CLASS::Verify
bool Verify(flatbuffers::Verifier &verifier) const
Definition: ClContextSchema_generated.h:29
armnn::ClContextBufferHasIdentifier
bool ClContextBufferHasIdentifier(const void *buf)
Definition: ClContextSchema_generated.h:152
armnn::ClContextBuilder::fbb_
flatbuffers::FlatBufferBuilder & fbb_
Definition: ClContextSchema_generated.h:40
armnn::ClContextBuilder::ClContextBuilder
ClContextBuilder(flatbuffers::FlatBufferBuilder &_fbb)
Definition: ClContextSchema_generated.h:45
armnn::ClContextBuilder::Finish
flatbuffers::Offset< ClContext > Finish()
Definition: ClContextSchema_generated.h:50
armnn::ProgramBuilder::fbb_
flatbuffers::FlatBufferBuilder & fbb_
Definition: ClContextSchema_generated.h:98
armnn::Offset
unsigned int Offset(const TensorShape &shape, unsigned int batch, unsigned int height, unsigned int width, unsigned int channels, const DataLayoutIndexed &dataLayout)
Definition: BatchToSpaceNd.cpp:15
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::ProgramBuilder::add_name
void add_name(flatbuffers::Offset< flatbuffers::String > name)
Definition: ClContextSchema_generated.h:100
armnn::FinishSizePrefixedClContextBuffer
void FinishSizePrefixedClContextBuffer(flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset< armnn::ClContext > root)
Definition: ClContextSchema_generated.h:177
armnn::ProgramBuilder::start_
flatbuffers::uoffset_t start_
Definition: ClContextSchema_generated.h:99
armnn::FLATBUFFERS_FINAL_CLASS::programs
const flatbuffers::Vector< flatbuffers::Offset< armnn::Program > > * programs() const
Definition: ClContextSchema_generated.h:26
armnn::ProgramBuilder::Finish
flatbuffers::Offset< Program > Finish()
Definition: ClContextSchema_generated.h:111
armnn::ClContextBuilder::start_
flatbuffers::uoffset_t start_
Definition: ClContextSchema_generated.h:41
armnn::ClContextBuilder::operator=
ClContextBuilder & operator=(const ClContextBuilder &)
armnn::CreateProgramDirect
flatbuffers::Offset< Program > CreateProgramDirect(flatbuffers::FlatBufferBuilder &_fbb, const char *name=nullptr, const std::vector< uint8_t > *binary=nullptr)
Definition: ClContextSchema_generated.h:128
armnn::ClContextBuilder::Table
ClContext Table
Definition: ClContextSchema_generated.h:39