Пример #1
0
        internal static v128 ByteToLong(byte2 x)
        {
            if (Sse4_1.IsSse41Supported)
            {
                return(Sse4_1.cvtepu8_epi64(x));
            }
            else if (Sse2.IsSse2Supported)
            {
                v128 zero   = default(v128);
                v128 shorts = Sse2.unpacklo_epi8(x, zero);
                v128 ints   = Sse2.unpacklo_epi16(shorts, zero);

                return(Sse2.unpacklo_epi32(ints, zero));
            }
            else
            {
                throw new CPUFeatureCheckException();
            }
        }