blob: fd933219cee59e8777eb1dbd80250e0a1d5a9480 [file] [log] [blame]
Tim Hall79d07d22020-04-27 18:20:16 +01001# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: tflite
4
5import flatbuffers
6
7class GatherOptions(object):
8 __slots__ = ['_tab']
9
10 @classmethod
erik.andersson@arm.comdd49a722022-08-10 15:26:48 +020011 def GetRootAsGatherOptions(cls, buf, offset):
Tim Hall79d07d22020-04-27 18:20:16 +010012 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13 x = GatherOptions()
14 x.Init(buf, n + offset)
15 return x
16
17 # GatherOptions
18 def Init(self, buf, pos):
19 self._tab = flatbuffers.table.Table(buf, pos)
20
21 # GatherOptions
22 def Axis(self):
23 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
24 if o != 0:
25 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
26 return 0
27
Dwight Lidman8a12da12021-07-19 13:43:05 +020028 # GatherOptions
29 def BatchDims(self):
30 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
31 if o != 0:
32 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
33 return 0
34
erik.andersson@arm.comdd49a722022-08-10 15:26:48 +020035def GatherOptionsStart(builder): builder.StartObject(2)
36def GatherOptionsAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0)
37def GatherOptionsAddBatchDims(builder, batchDims): builder.PrependInt32Slot(1, batchDims, 0)
38def GatherOptionsEnd(builder): return builder.EndObject()