blob: a88bfa6cc147fa61774c2ef2d6068fecd0e0ac2b [file] [log] [blame]
Eric Kunzee5e26762020-10-13 16:11:07 -07001# automatically generated by the FlatBuffers compiler, do not modify
2
3# Copyright (c) 2020, ARM Limited.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17
18# namespace: tosa
19
20import flatbuffers
21
22class ConvQuantInfo(object):
23 __slots__ = ['_tab']
24
25 @classmethod
26 def GetRootAsConvQuantInfo(cls, buf, offset):
27 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
28 x = ConvQuantInfo()
29 x.Init(buf, n + offset)
30 return x
31
32 # ConvQuantInfo
33 def Init(self, buf, pos):
34 self._tab = flatbuffers.table.Table(buf, pos)
35
36 # ConvQuantInfo
37 def InputZp(self):
38 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
39 if o != 0:
40 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
41 return 0
42
43 # ConvQuantInfo
44 def WeightZp(self):
45 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
46 if o != 0:
47 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
48 return 0
49
50def ConvQuantInfoStart(builder): builder.StartObject(2)
51def ConvQuantInfoAddInputZp(builder, inputZp): builder.PrependInt32Slot(0, inputZp, 0)
52def ConvQuantInfoAddWeightZp(builder, weightZp): builder.PrependInt32Slot(1, weightZp, 0)
53def ConvQuantInfoEnd(builder): return builder.EndObject()