blob: 236d3f5f50dc936da8ede55eca3cd6df7edeff54 [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 MulAttribute(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 = MulAttribute()
16 x.Init(buf, n + offset)
17 return x
18
Rob Elliott00a15db2023-08-17 14:27:06 +000019 @classmethod
20 def GetRootAsMulAttribute(cls, buf, offset=0):
21 """This method is deprecated. Please switch to GetRootAs."""
22 return cls.GetRootAs(buf, offset)
23 @classmethod
24 def MulAttributeBufferHasIdentifier(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 # MulAttribute
28 def Init(self, buf, pos):
29 self._tab = flatbuffers.table.Table(buf, pos)
30
31 # MulAttribute
32 def Shift(self):
33 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
34 if o != 0:
35 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
36 return 0
37
Rob Elliott00a15db2023-08-17 14:27:06 +000038def MulAttributeStart(builder):
39 builder.StartObject(1)
40
41def Start(builder):
42 MulAttributeStart(builder)
43
44def MulAttributeAddShift(builder, shift):
45 builder.PrependInt32Slot(0, shift, 0)
46
47def AddShift(builder, shift):
48 MulAttributeAddShift(builder, shift)
49
50def MulAttributeEnd(builder):
51 return builder.EndObject()
52
53def End(builder):
54 return MulAttributeEnd(builder)