blob: f2aaeb540d854459f47e02e490365f6a0d7f8bba [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
Rob Elliott00a15db2023-08-17 14:27:06 +00006from flatbuffers.compat import import_numpy
7np = import_numpy()
Patrik Gustavsson8f1f9aa2021-06-28 07:41:58 +02008
9class ArithmeticRightShiftAttribute(object):
10 __slots__ = ['_tab']
11
12 @classmethod
Rob Elliott00a15db2023-08-17 14:27:06 +000013 def GetRootAs(cls, buf, offset=0):
Patrik Gustavsson8f1f9aa2021-06-28 07:41:58 +020014 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15 x = ArithmeticRightShiftAttribute()
16 x.Init(buf, n + offset)
17 return x
18
Rob Elliott00a15db2023-08-17 14:27:06 +000019 @classmethod
20 def GetRootAsArithmeticRightShiftAttribute(cls, buf, offset=0):
21 """This method is deprecated. Please switch to GetRootAs."""
22 return cls.GetRootAs(buf, offset)
23 @classmethod
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
Patrik Gustavsson8f1f9aa2021-06-28 07:41:58 +020027 # 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
Rob Elliott00a15db2023-08-17 14:27:06 +000038def ArithmeticRightShiftAttributeStart(builder):
39 builder.StartObject(1)
40
41def Start(builder):
42 ArithmeticRightShiftAttributeStart(builder)
43
44def ArithmeticRightShiftAttributeAddRound(builder, round):
45 builder.PrependBoolSlot(0, round, 0)
46
47def AddRound(builder, round):
48 ArithmeticRightShiftAttributeAddRound(builder, round)
49
50def ArithmeticRightShiftAttributeEnd(builder):
51 return builder.EndObject()
52
53def End(builder):
54 return ArithmeticRightShiftAttributeEnd(builder)