# automatically generated by the FlatBuffers compiler, do not modify

# namespace: MNN

import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()

class SoftmaxIntSuperAcme(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAs(cls, buf, offset=0):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = SoftmaxIntSuperAcme()
        x.Init(buf, n + offset)
        return x

    @classmethod
    def GetRootAsSoftmaxIntSuperAcme(cls, buf, offset=0):
        """This method is deprecated. Please switch to GetRootAs."""
        return cls.GetRootAs(buf, offset)
    # SoftmaxIntSuperAcme
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # SoftmaxIntSuperAcme
    def Lutexp(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Int8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
        return 0

    # SoftmaxIntSuperAcme
    def LutexpAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int8Flags, o)
        return 0

    # SoftmaxIntSuperAcme
    def LutexpLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # SoftmaxIntSuperAcme
    def LutexpIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        return o == 0

    # SoftmaxIntSuperAcme
    def Axis(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return -1

    # SoftmaxIntSuperAcme
    def MRightShift(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # SoftmaxIntSuperAcme
    def InputOffset(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 255

    # SoftmaxIntSuperAcme
    def OutputOffset(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 0

    # SoftmaxIntSuperAcme
    def OutputActivationMin(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return -128

    # SoftmaxIntSuperAcme
    def OutputActivationMax(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
        return 127

def SoftmaxIntSuperAcmeStart(builder): builder.StartObject(7)
def Start(builder):
    return SoftmaxIntSuperAcmeStart(builder)
def SoftmaxIntSuperAcmeAddLutexp(builder, lutexp): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(lutexp), 0)
def AddLutexp(builder, lutexp):
    return SoftmaxIntSuperAcmeAddLutexp(builder, lutexp)
def SoftmaxIntSuperAcmeStartLutexpVector(builder, numElems): return builder.StartVector(1, numElems, 1)
def StartLutexpVector(builder, numElems):
    return SoftmaxIntSuperAcmeStartLutexpVector(builder, numElems)
def SoftmaxIntSuperAcmeAddAxis(builder, axis): builder.PrependInt32Slot(1, axis, -1)
def AddAxis(builder, axis):
    return SoftmaxIntSuperAcmeAddAxis(builder, axis)
def SoftmaxIntSuperAcmeAddMRightShift(builder, mRightShift): builder.PrependInt32Slot(2, mRightShift, 0)
def AddMRightShift(builder, mRightShift):
    return SoftmaxIntSuperAcmeAddMRightShift(builder, mRightShift)
def SoftmaxIntSuperAcmeAddInputOffset(builder, inputOffset): builder.PrependInt32Slot(3, inputOffset, 255)
def AddInputOffset(builder, inputOffset):
    return SoftmaxIntSuperAcmeAddInputOffset(builder, inputOffset)
def SoftmaxIntSuperAcmeAddOutputOffset(builder, outputOffset): builder.PrependInt32Slot(4, outputOffset, 0)
def AddOutputOffset(builder, outputOffset):
    return SoftmaxIntSuperAcmeAddOutputOffset(builder, outputOffset)
def SoftmaxIntSuperAcmeAddOutputActivationMin(builder, outputActivationMin): builder.PrependInt32Slot(5, outputActivationMin, -128)
def AddOutputActivationMin(builder, outputActivationMin):
    return SoftmaxIntSuperAcmeAddOutputActivationMin(builder, outputActivationMin)
def SoftmaxIntSuperAcmeAddOutputActivationMax(builder, outputActivationMax): builder.PrependInt32Slot(6, outputActivationMax, 127)
def AddOutputActivationMax(builder, outputActivationMax):
    return SoftmaxIntSuperAcmeAddOutputActivationMax(builder, outputActivationMax)
def SoftmaxIntSuperAcmeEnd(builder): return builder.EndObject()
def End(builder):
    return SoftmaxIntSuperAcmeEnd(builder)