• Neither is good.  See the definition of __m128i in Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\emmintrin.h :

    typedef union __declspec(intrin_type) _CRT_ALIGN(16) __m128i {
        __int8              m128i_i8[16];
        __int16             m128i_i16[8];
        __int32             m128i_i32[4];   
        __int64             m128i_i64[2];
        unsigned __int8     m128i_u8[16];
        unsigned __int16    m128i_u16[8];
        unsigned __int32    m128i_u32[4];
        unsigned __int64    m128i_u64[2];
    } __m128i;

    Your static initialization is setting values into the first member of the union - the __int8[16] field.

    Both initializations issue a warning.  The first sets the first 4 elements of the array. The second sets all 16, but 0x80 is too big to be held in a signed __int8 field.

    Please see: for further explanation.


    24 พฤษภาคม 2555 4:09