Beispiel #1
0
        internal static v128 UShortToLong(ushort2 x)
        {
            if (Sse4_1.IsSse41Supported)
            {
                return(Sse4_1.cvtepu16_epi64(x));
            }
            else if (Sse2.IsSse2Supported)
            {
                v128 zero   = default(v128);
                v128 shorts = Sse2.unpacklo_epi16(x, zero);

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