# automatically generated by the FlatBuffers compiler, do not modify

# namespace: MNN

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

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

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

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

    # PReluSuperAcmeQuantizedParam
    def InputZero(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

    # PReluSuperAcmeQuantizedParam
    def OutputZero(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 0

    # PReluSuperAcmeQuantizedParam
    def SlopeQ(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # PReluSuperAcmeQuantizedParam
    def SlopeQAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def SlopeQLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def SlopeQIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        return o == 0

    # PReluSuperAcmeQuantizedParam
    def MRightShiftQ(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # PReluSuperAcmeQuantizedParam
    def MRightShiftQAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def MRightShiftQLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def MRightShiftQIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        return o == 0

    # PReluSuperAcmeQuantizedParam
    def MRightShiftQ_(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

    # PReluSuperAcmeQuantizedParam
    def SlopeP(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # PReluSuperAcmeQuantizedParam
    def SlopePAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def SlopePLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def SlopePIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
        return o == 0

    # PReluSuperAcmeQuantizedParam
    def MRightShiftP(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # PReluSuperAcmeQuantizedParam
    def MRightShiftPAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def MRightShiftPLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def MRightShiftPIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
        return o == 0

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

    # PReluSuperAcmeQuantizedParam
    def MintbiasQ(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # PReluSuperAcmeQuantizedParam
    def MintbiasQAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def MintbiasQLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def MintbiasQIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
        return o == 0

    # PReluSuperAcmeQuantizedParam
    def MintbiasP(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # PReluSuperAcmeQuantizedParam
    def MintbiasPAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def MintbiasPLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # PReluSuperAcmeQuantizedParam
    def MintbiasPIsNone(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22))
        return o == 0

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

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

def PReluSuperAcmeQuantizedParamStart(builder): builder.StartObject(12)
def Start(builder):
    return PReluSuperAcmeQuantizedParamStart(builder)
def PReluSuperAcmeQuantizedParamAddInputZero(builder, inputZero): builder.PrependInt32Slot(0, inputZero, 0)
def AddInputZero(builder, inputZero):
    return PReluSuperAcmeQuantizedParamAddInputZero(builder, inputZero)
def PReluSuperAcmeQuantizedParamAddOutputZero(builder, outputZero): builder.PrependInt32Slot(1, outputZero, 0)
def AddOutputZero(builder, outputZero):
    return PReluSuperAcmeQuantizedParamAddOutputZero(builder, outputZero)
def PReluSuperAcmeQuantizedParamAddSlopeQ(builder, slopeQ): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(slopeQ), 0)
def AddSlopeQ(builder, slopeQ):
    return PReluSuperAcmeQuantizedParamAddSlopeQ(builder, slopeQ)
def PReluSuperAcmeQuantizedParamStartSlopeQVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def StartSlopeQVector(builder, numElems):
    return PReluSuperAcmeQuantizedParamStartSlopeQVector(builder, numElems)
def PReluSuperAcmeQuantizedParamAddMRightShiftQ(builder, mRightShiftQ): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(mRightShiftQ), 0)
def AddMRightShiftQ(builder, mRightShiftQ):
    return PReluSuperAcmeQuantizedParamAddMRightShiftQ(builder, mRightShiftQ)
def PReluSuperAcmeQuantizedParamStartMRightShiftQVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def StartMRightShiftQVector(builder, numElems):
    return PReluSuperAcmeQuantizedParamStartMRightShiftQVector(builder, numElems)
def PReluSuperAcmeQuantizedParamAddMRightShiftQ_(builder, mRightShiftQ_): builder.PrependInt32Slot(4, mRightShiftQ_, 0)
def AddMRightShiftQ_(builder, mRightShiftQ_):
    return PReluSuperAcmeQuantizedParamAddMRightShiftQ_(builder, mRightShiftQ_)
def PReluSuperAcmeQuantizedParamAddSlopeP(builder, slopeP): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(slopeP), 0)
def AddSlopeP(builder, slopeP):
    return PReluSuperAcmeQuantizedParamAddSlopeP(builder, slopeP)
def PReluSuperAcmeQuantizedParamStartSlopePVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def StartSlopePVector(builder, numElems):
    return PReluSuperAcmeQuantizedParamStartSlopePVector(builder, numElems)
def PReluSuperAcmeQuantizedParamAddMRightShiftP(builder, mRightShiftP): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(mRightShiftP), 0)
def AddMRightShiftP(builder, mRightShiftP):
    return PReluSuperAcmeQuantizedParamAddMRightShiftP(builder, mRightShiftP)
def PReluSuperAcmeQuantizedParamStartMRightShiftPVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def StartMRightShiftPVector(builder, numElems):
    return PReluSuperAcmeQuantizedParamStartMRightShiftPVector(builder, numElems)
def PReluSuperAcmeQuantizedParamAddMRightShiftP_(builder, mRightShiftP_): builder.PrependInt32Slot(7, mRightShiftP_, 0)
def AddMRightShiftP_(builder, mRightShiftP_):
    return PReluSuperAcmeQuantizedParamAddMRightShiftP_(builder, mRightShiftP_)
def PReluSuperAcmeQuantizedParamAddMintbiasQ(builder, mintbiasQ): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(mintbiasQ), 0)
def AddMintbiasQ(builder, mintbiasQ):
    return PReluSuperAcmeQuantizedParamAddMintbiasQ(builder, mintbiasQ)
def PReluSuperAcmeQuantizedParamStartMintbiasQVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def StartMintbiasQVector(builder, numElems):
    return PReluSuperAcmeQuantizedParamStartMintbiasQVector(builder, numElems)
def PReluSuperAcmeQuantizedParamAddMintbiasP(builder, mintbiasP): builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(mintbiasP), 0)
def AddMintbiasP(builder, mintbiasP):
    return PReluSuperAcmeQuantizedParamAddMintbiasP(builder, mintbiasP)
def PReluSuperAcmeQuantizedParamStartMintbiasPVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def StartMintbiasPVector(builder, numElems):
    return PReluSuperAcmeQuantizedParamStartMintbiasPVector(builder, numElems)
def PReluSuperAcmeQuantizedParamAddOutputActivationMin(builder, outputActivationMin): builder.PrependInt32Slot(10, outputActivationMin, 0)
def AddOutputActivationMin(builder, outputActivationMin):
    return PReluSuperAcmeQuantizedParamAddOutputActivationMin(builder, outputActivationMin)
def PReluSuperAcmeQuantizedParamAddOutputActivationMax(builder, outputActivationMax): builder.PrependInt32Slot(11, outputActivationMax, 0)
def AddOutputActivationMax(builder, outputActivationMax):
    return PReluSuperAcmeQuantizedParamAddOutputActivationMax(builder, outputActivationMax)
def PReluSuperAcmeQuantizedParamEnd(builder): return builder.EndObject()
def End(builder):
    return PReluSuperAcmeQuantizedParamEnd(builder)