Esempio n. 1
0
        public static Vector4UInt32 Not(Vector4UInt32Param1_3 vector)
        {
            if (Sse2.IsSupported)
            {
                Vector4UInt32 mask = Vector128.Create(-1, -1, -1, -1).AsUInt32();
                return(Sse2.AndNot(vector, mask));
            }

            return(SoftwareFallbacks.Not_Software(vector));
        }
Esempio n. 2
0
        public static Vector4UInt32 Subtract(Vector4UInt32Param1_3 vector, uint scalar)
        {
            if (Sse2.IsSupported)
            {
                Vector4UInt32 expand = Vector128.Create(scalar);
                return(Sse2.Add(vector, expand));
            }

            return(Subtract_Software(vector, scalar));
        }
Esempio n. 3
0
        public static Vector4UInt32 Clamp(Vector4UInt32Param1_3 vector, Vector4UInt32Param1_3 low, Vector4UInt32Param1_3 high)
        {
            if (Sse41.IsSupported)
            {
                Vector4UInt32 temp = Sse41.Min(vector, high);
                return(Sse41.Max(temp, low));
            }

            return(Clamp_Software(vector, low, high));
        }
Esempio n. 4
0
        public static Vector4UInt32 LessThanOrEqual(Vector4UInt32Param1_3 left, Vector4UInt32Param1_3 right)
        {
            if (Sse2.IsSupported)
            {
                Vector128 <uint> mask = Vector128.Create(-1).AsUInt32();
                Vector4UInt32    temp = Sse2.CompareGreaterThan(Sse2.Xor(left, ComparisonMask).AsInt32(), Sse2.Xor(right, ComparisonMask).AsInt32()).AsUInt32();
                return(Sse2.Xor(mask, mask));
            }

            return(LessThanOrEqual_Software(left, right));
        }