From aee1facbde25caf27cc34e5ec08eb8bba6af8e18 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Wed, 11 Nov 2020 13:54:06 -0800 Subject: Implement and add unit tests for MUL and ARITHMETIC_RIGHT_SHIFT add .clang-format Add expected failure for RESIZE and RESCALE unit tests Signed-off-by: Kevin Cheng Change-Id: I33c8afdc8998e8518f2b0e5fabddd36ce3aa2ee9 --- verif/tosa/MulAttribute.py | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 verif/tosa/MulAttribute.py (limited to 'verif/tosa/MulAttribute.py') diff --git a/verif/tosa/MulAttribute.py b/verif/tosa/MulAttribute.py new file mode 100644 index 0000000..f45b285 --- /dev/null +++ b/verif/tosa/MulAttribute.py @@ -0,0 +1,45 @@ +# automatically generated by the FlatBuffers compiler, do not modify + +# Copyright (c) 2020, ARM Limited. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# namespace: tosa + +import flatbuffers + +class MulAttribute(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsMulAttribute(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = MulAttribute() + x.Init(buf, n + offset) + return x + + # MulAttribute + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # MulAttribute + def Shift(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + +def MulAttributeStart(builder): builder.StartObject(1) +def MulAttributeAddShift(builder, shift): builder.PrependInt32Slot(0, shift, 0) +def MulAttributeEnd(builder): return builder.EndObject() -- cgit v1.2.1