blob: cce8f6b517a8ffe16f0b53d0ac0c6ad6d429de50 [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 ArithmeticRightShiftAttribute(object):
10 __slots__ = ['_tab']
11
12 @classmethod
Eric Kunze4381b3d2022-08-22 18:15:41 +000013 def GetRootAs(cls, buf, offset=0):
Eric Kunze2364dcd2021-04-26 11:06:57 -070014 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15 x = ArithmeticRightShiftAttribute()
16 x.Init(buf, n + offset)
17 return x
18
19 @classmethod
Eric Kunze4381b3d2022-08-22 18:15:41 +000020 def GetRootAsArithmeticRightShiftAttribute(cls, buf, offset=0):
21 """This method is deprecated. Please switch to GetRootAs."""
22 return cls.GetRootAs(buf, offset)
23 @classmethod
Eric Kunze2364dcd2021-04-26 11:06:57 -070024 def ArithmeticRightShiftAttributeBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
25 return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x4F\x53\x41", size_prefixed=size_prefixed)
26
27 # ArithmeticRightShiftAttribute
28 def Init(self, buf, pos):
29 self._tab = flatbuffers.table.Table(buf, pos)
30
31 # ArithmeticRightShiftAttribute
32 def Round(self):
33 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
34 if o != 0:
35 return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
36 return False
37
Eric Kunzeae906de2022-05-30 22:40:47 -070038def ArithmeticRightShiftAttributeStart(builder): builder.StartObject(1)
Eric Kunze4381b3d2022-08-22 18:15:41 +000039def Start(builder):
40 return ArithmeticRightShiftAttributeStart(builder)
Eric Kunzeae906de2022-05-30 22:40:47 -070041def ArithmeticRightShiftAttributeAddRound(builder, round): builder.PrependBoolSlot(0, round, 0)
Eric Kunze4381b3d2022-08-22 18:15:41 +000042def AddRound(builder, round):
43 return ArithmeticRightShiftAttributeAddRound(builder, round)
Eric Kunzeae906de2022-05-30 22:40:47 -070044def ArithmeticRightShiftAttributeEnd(builder): return builder.EndObject()
Eric Kunze4381b3d2022-08-22 18:15:41 +000045def End(builder):
46 return ArithmeticRightShiftAttributeEnd(builder)