blob: c07db07b3dcfa91bf91a2121b6a909cd092acac6 [file] [log] [blame]
Eric Kunze2364dcd2021-04-26 11:06:57 -07001# automatically generated by the FlatBuffers compiler, do not modify
2
Eric Kunze2364dcd2021-04-26 11:06:57 -07003# namespace: tosa
4
5import flatbuffers
6from flatbuffers.compat import import_numpy
7np = import_numpy()
8
9class PadQuantInfo(object):
10 __slots__ = ['_tab']
11
12 @classmethod
Eric Kunzeae906de2022-05-30 22:40:47 -070013 def GetRootAsPadQuantInfo(cls, buf, offset):
Eric Kunze2364dcd2021-04-26 11:06:57 -070014 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15 x = PadQuantInfo()
16 x.Init(buf, n + offset)
17 return x
18
19 @classmethod
20 def PadQuantInfoBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
21 return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x4F\x53\x41", size_prefixed=size_prefixed)
22
23 # PadQuantInfo
24 def Init(self, buf, pos):
25 self._tab = flatbuffers.table.Table(buf, pos)
26
27 # PadQuantInfo
28 def InputZp(self):
29 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
30 if o != 0:
31 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
32 return 0
33
Eric Kunzeae906de2022-05-30 22:40:47 -070034def PadQuantInfoStart(builder): builder.StartObject(1)
35def PadQuantInfoAddInputZp(builder, inputZp): builder.PrependInt32Slot(0, inputZp, 0)
36def PadQuantInfoEnd(builder): return builder.EndObject()