示例#1
0
文件: and.g.cs 项目: 0xCM/arrows
 public static Vector128 <T> vand <T>(Vector128 <T> lhs, Vector128 <T> rhs)
     where T : unmanaged
 {
     if (typeof(T) == typeof(sbyte))
     {
         return(generic <T>(Bits.and(int8(lhs), int8(rhs))));
     }
     else if (typeof(T) == typeof(byte))
     {
         return(generic <T>(Bits.and(uint8(lhs), uint8(rhs))));
     }
     else if (typeof(T) == typeof(short))
     {
         return(generic <T>(Bits.and(int16(lhs), int16(rhs))));
     }
     else if (typeof(T) == typeof(ushort))
     {
         return(generic <T>(Bits.and(uint16(lhs), uint16(rhs))));
     }
     else if (typeof(T) == typeof(int))
     {
         return(generic <T>(Bits.and(int32(lhs), int32(rhs))));
     }
     else if (typeof(T) == typeof(uint))
     {
         return(generic <T>(Bits.and(uint32(lhs), uint32(rhs))));
     }
     else if (typeof(T) == typeof(long))
     {
         return(generic <T>(Bits.and(int64(lhs), int64(rhs))));
     }
     else if (typeof(T) == typeof(ulong))
     {
         return(generic <T>(Bits.and(uint64(lhs), uint64(rhs))));
     }
     else if (typeof(T) == typeof(float))
     {
         return(generic <T>(Bits.and(float32(lhs), float32(rhs))));
     }
     else if (typeof(T) == typeof(double))
     {
         return(generic <T>(Bits.and(float64(lhs), float64(rhs))));
     }
     else
     {
         throw unsupported <T>();
     }
 }
示例#2
0
文件: fpbits.cs 项目: 0xCM/arrows
 public static Vector256 <T> vand <T>(Vector256 <T> lhs, Vector256 <T> rhs)
     where T : unmanaged
 {
     if (typeof(T) == typeof(float))
     {
         return(generic <T>(Bits.and(float32(lhs), float32(rhs))));
     }
     else if (typeof(T) == typeof(double))
     {
         return(generic <T>(Bits.and(float64(lhs), float64(rhs))));
     }
     else
     {
         throw unsupported <T>();
     }
 }
示例#3
0
文件: and.g.cs 项目: 0xCM/arrows
 static Vector256 <T> vand256i <T>(Vector256 <T> lhs, Vector256 <T> rhs)
     where T : struct
 {
     if (typeof(T) == typeof(sbyte))
     {
         return(generic <T>(Bits.and(int8(lhs), int8(rhs))));
     }
     else if (typeof(T) == typeof(short))
     {
         return(generic <T>(Bits.and(int16(lhs), int16(rhs))));
     }
     else if (typeof(T) == typeof(int))
     {
         return(generic <T>(Bits.and(int32(lhs), int32(rhs))));
     }
     else
     {
         return(generic <T>(Bits.and(int64(lhs), int64(rhs))));
     }
 }