static int32_t i32RandomP3( void )
{
    union ui32_i32 uZ;

    uZ.ui =
        i32P1[randomN_ui8( i32NumP1 )] + i32P1[randomN_ui8( i32NumP1 )]
            + i32P1[randomN_ui8( i32NumP1 )];
    return uZ.i;

}
示例#2
0
static float16_t f16RandomQOutP3( void )
{
    union ui16_f16 uZ;

    uZ.ui =
          f16QOut[randomN_ui8( f16NumQOut )]
        | ((f16P2[randomN_ui8( f16NumP2 )] + f16P2[randomN_ui8( f16NumP2 )])
               & 0x03FF);
    return uZ.f;

}
示例#3
0
static float16_t f16RandomQInfP3( void )
{
    int weightMaskNum;
    union ui16_f16 uZ;

    weightMaskNum = randomN_ui8( f16NumQInfWeightMasks );
    uZ.ui =
          ((random_ui16() & f16QInfWeightMasks[weightMaskNum])
               + f16QInfWeightOffsets[weightMaskNum])
        | ((f16P2[randomN_ui8( f16NumP2 )] + f16P2[randomN_ui8( f16NumP2 )])
               & 0x03FF);
    return uZ.f;

}
示例#4
0
static float16_t f16RandomQOutPInf( void )
{
    union ui16_f16 uZ;

    uZ.ui = f16QOut[randomN_ui8( f16NumQOut )] | (random_ui16() & 0x03FF);
    return uZ.f;

}
static int32_t i32RandomPInf( void )
{
    int weightMaskNum;
    union ui32_i32 uZ;

    weightMaskNum = randomN_ui8( i32NumPInfWeightMasks );
    uZ.ui =
        (random_ui32() & i32PInfWeightMasks[weightMaskNum])
            + i32PInfWeightOffsets[weightMaskNum];
    return uZ.i;

}
示例#6
0
static float16_t f16RandomQInfPInf( void )
{
    int weightMaskNum;
    union ui16_f16 uZ;

    weightMaskNum = randomN_ui8( f16NumQInfWeightMasks );
    uZ.ui =
        (random_ui16() & (f16QInfWeightMasks[weightMaskNum] | 0x03FF))
            + f16QInfWeightOffsets[weightMaskNum];
    return uZ.f;

}