aboutsummaryrefslogtreecommitdiff
path: root/python/tosa/PadAttribute.py
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2022-08-22 18:15:41 +0000
committerEric Kunze <eric.kunze@arm.com>2022-09-13 14:18:36 -0700
commit4381b3d7fcb7cab975f46c62c86a35c53ade047f (patch)
treed9ea792e259d88039527d7c1eab6da307b140e7f /python/tosa/PadAttribute.py
parent24a68bbcfa84cee666cb268b1992bfa70aab7ab3 (diff)
downloadserialization_lib-4381b3d7fcb7cab975f46c62c86a35c53ade047f.tar.gz
Update serialization lib to flatbuffers 2.0.6
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I64ac03a2fa8711c2050efd5fedbc34a4c2a67bd5
Diffstat (limited to 'python/tosa/PadAttribute.py')
-rw-r--r--python/tosa/PadAttribute.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/python/tosa/PadAttribute.py b/python/tosa/PadAttribute.py
index 0875481..8d49d5a 100644
--- a/python/tosa/PadAttribute.py
+++ b/python/tosa/PadAttribute.py
@@ -10,13 +10,17 @@ class PadAttribute(object):
__slots__ = ['_tab']
@classmethod
- def GetRootAsPadAttribute(cls, buf, offset):
+ def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = PadAttribute()
x.Init(buf, n + offset)
return x
@classmethod
+ def GetRootAsPadAttribute(cls, buf, offset=0):
+ """This method is deprecated. Please switch to GetRootAs."""
+ return cls.GetRootAs(buf, offset)
+ @classmethod
def PadAttributeBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x4F\x53\x41", size_prefixed=size_prefixed)
@@ -66,8 +70,20 @@ class PadAttribute(object):
return 0.0
def PadAttributeStart(builder): builder.StartObject(3)
+def Start(builder):
+ return PadAttributeStart(builder)
def PadAttributeAddPadding(builder, padding): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(padding), 0)
+def AddPadding(builder, padding):
+ return PadAttributeAddPadding(builder, padding)
def PadAttributeStartPaddingVector(builder, numElems): return builder.StartVector(4, numElems, 4)
+def StartPaddingVector(builder, numElems):
+ return PadAttributeStartPaddingVector(builder, numElems)
def PadAttributeAddPadConstInt(builder, padConstInt): builder.PrependInt32Slot(1, padConstInt, 0)
+def AddPadConstInt(builder, padConstInt):
+ return PadAttributeAddPadConstInt(builder, padConstInt)
def PadAttributeAddPadConstFp(builder, padConstFp): builder.PrependFloat32Slot(2, padConstFp, 0.0)
+def AddPadConstFp(builder, padConstFp):
+ return PadAttributeAddPadConstFp(builder, padConstFp)
def PadAttributeEnd(builder): return builder.EndObject()
+def End(builder):
+ return PadAttributeEnd(builder) \ No newline at end of file