Exemplo n.º 1
0
        public static Vector128 <T> And <T>(Vector128 <T> left, Vector128 <T> right) where T : struct
        {
            if (typeof(T) == typeof(float))
            {
                if (Sse.IsSupported)
                {
                    return(Sse.And(left.AsSingle(), right.AsSingle()).As <float, T>());
                }
            }

            if (typeof(T) == typeof(double))
            {
                if (Sse2.IsSupported)
                {
                    return(Sse2.And(left.AsDouble(), right.AsDouble()).As <double, T>());
                }
                if (Sse.IsSupported)
                {
                    return(Sse.And(left.AsSingle(), right.AsSingle()).As <float, T>());
                }
            }

            if (Sse2.IsSupported)
            {
                return(Sse2.And(left.AsByte(), right.AsByte()).As <byte, T>());
            }
            if (Sse.IsSupported)
            {
                return(Sse.And(left.AsSingle(), right.AsSingle()).As <float, T>());
            }

            return(SoftwareFallbacks.And_Software(left, right));
        }
Exemplo n.º 2
0
        public static Vector4UInt32 And(Vector4UInt32Param1_3 left, Vector4UInt32Param1_3 right)
        {
            if (Sse2.IsSupported)
            {
                return(Sse2.And(left, right));
            }

            return(SoftwareFallbacks.And_Software(left, right));
        }
Exemplo n.º 3
0
        public static Vector4Single And(Vector4SingleParam1_3 left, Vector4SingleParam1_3 right)
        {
            if (Sse.IsSupported)
            {
                return(Sse.And(left, right));
            }

            return(SoftwareFallbacks.And_Software(left, right));
        }