blob: 7111c6c892a95b8ea1e4deca0e20fb3797b9578a [file] [log] [blame]
Patrik Gustavsson8f1f9aa2021-06-28 07:41:58 +02001# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: tosa
4
5import flatbuffers
6
7class UnaryQuantInfo(object):
8 __slots__ = ['_tab']
9
10 @classmethod
11 def GetRootAsUnaryQuantInfo(cls, buf, offset):
12 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13 x = UnaryQuantInfo()
14 x.Init(buf, n + offset)
15 return x
16
17 # UnaryQuantInfo
18 def Init(self, buf, pos):
19 self._tab = flatbuffers.table.Table(buf, pos)
20
21 # UnaryQuantInfo
22 def InputZp(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
28 # UnaryQuantInfo
29 def OutputZp(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
35def UnaryQuantInfoStart(builder): builder.StartObject(2)
36def UnaryQuantInfoAddInputZp(builder, inputZp): builder.PrependInt32Slot(0, inputZp, 0)
37def UnaryQuantInfoAddOutputZp(builder, outputZp): builder.PrependInt32Slot(1, outputZp, 0)
38def UnaryQuantInfoEnd(builder): return builder.EndObject()