Eric Kunze | 2364dcd | 2021-04-26 11:06:57 -0700 | [diff] [blame] | 1 | # automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
Eric Kunze | 2364dcd | 2021-04-26 11:06:57 -0700 | [diff] [blame] | 3 | # namespace: tosa |
| 4 | |
| 5 | import flatbuffers |
| 6 | from flatbuffers.compat import import_numpy |
| 7 | np = import_numpy() |
| 8 | |
| 9 | class ArithmeticRightShiftAttribute(object): |
| 10 | __slots__ = ['_tab'] |
| 11 | |
| 12 | @classmethod |
Eric Kunze | 4381b3d | 2022-08-22 18:15:41 +0000 | [diff] [blame^] | 13 | def GetRootAs(cls, buf, offset=0): |
Eric Kunze | 2364dcd | 2021-04-26 11:06:57 -0700 | [diff] [blame] | 14 | 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 Kunze | 4381b3d | 2022-08-22 18:15:41 +0000 | [diff] [blame^] | 20 | def GetRootAsArithmeticRightShiftAttribute(cls, buf, offset=0): |
| 21 | """This method is deprecated. Please switch to GetRootAs.""" |
| 22 | return cls.GetRootAs(buf, offset) |
| 23 | @classmethod |
Eric Kunze | 2364dcd | 2021-04-26 11:06:57 -0700 | [diff] [blame] | 24 | 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 Kunze | ae906de | 2022-05-30 22:40:47 -0700 | [diff] [blame] | 38 | def ArithmeticRightShiftAttributeStart(builder): builder.StartObject(1) |
Eric Kunze | 4381b3d | 2022-08-22 18:15:41 +0000 | [diff] [blame^] | 39 | def Start(builder): |
| 40 | return ArithmeticRightShiftAttributeStart(builder) |
Eric Kunze | ae906de | 2022-05-30 22:40:47 -0700 | [diff] [blame] | 41 | def ArithmeticRightShiftAttributeAddRound(builder, round): builder.PrependBoolSlot(0, round, 0) |
Eric Kunze | 4381b3d | 2022-08-22 18:15:41 +0000 | [diff] [blame^] | 42 | def AddRound(builder, round): |
| 43 | return ArithmeticRightShiftAttributeAddRound(builder, round) |
Eric Kunze | ae906de | 2022-05-30 22:40:47 -0700 | [diff] [blame] | 44 | def ArithmeticRightShiftAttributeEnd(builder): return builder.EndObject() |
Eric Kunze | 4381b3d | 2022-08-22 18:15:41 +0000 | [diff] [blame^] | 45 | def End(builder): |
| 46 | return ArithmeticRightShiftAttributeEnd(builder) |