示例#1
0
文件: Max.cs 项目: csritter/MaxMath
 public static sbyte16 max(sbyte16 a, sbyte16 b)
 {
     if (Sse4_1.IsSse41Supported)
     {
         return(Sse4_1.max_epi8(a, b));
     }
     else if (Sse2.IsSse2Supported)
     {
         return(Mask.BlendV(a, b, Sse2.cmpgt_epi8(b, a)));
     }
     else
     {
         return(new sbyte16((sbyte)math.max(a.x0, b.x0), (sbyte)math.max(a.x1, b.x1), (sbyte)math.max(a.x2, b.x2), (sbyte)math.max(a.x3, b.x3), (sbyte)math.max(a.x4, b.x4), (sbyte)math.max(a.x5, b.x5), (sbyte)math.max(a.x6, b.x6), (sbyte)math.max(a.x7, b.x7), (sbyte)math.max(a.x8, b.x8), (sbyte)math.max(a.x9, b.x9), (sbyte)math.max(a.x10, b.x10), (sbyte)math.max(a.x11, b.x11), (sbyte)math.max(a.x12, b.x12), (sbyte)math.max(a.x13, b.x13), (sbyte)math.max(a.x14, b.x14), (sbyte)math.max(a.x15, b.x15)));
     }
 }
示例#2
0
文件: Max.cs 项目: csritter/MaxMath
 public static sbyte2 max(sbyte2 a, sbyte2 b)
 {
     if (Sse4_1.IsSse41Supported)
     {
         return(Sse4_1.max_epi8(a, b));
     }
     else if (Sse2.IsSse2Supported)
     {
         return(Mask.BlendV(a, b, Sse2.cmpgt_epi8(b, a)));
     }
     else
     {
         return(new sbyte2((sbyte)math.max(a.x, b.x), (sbyte)math.max(a.y, b.y)));
     }
 }
示例#3
0
文件: Max.cs 项目: csritter/MaxMath
 public static sbyte8 max(sbyte8 a, sbyte8 b)
 {
     if (Sse4_1.IsSse41Supported)
     {
         return(Sse4_1.max_epi8(a, b));
     }
     else if (Sse2.IsSse2Supported)
     {
         return(Mask.BlendV(a, b, Sse2.cmpgt_epi8(b, a)));
     }
     else
     {
         return(new sbyte8((sbyte)math.max(a.x0, b.x0), (sbyte)math.max(a.x1, b.x1), (sbyte)math.max(a.x2, b.x2), (sbyte)math.max(a.x3, b.x3), (sbyte)math.max(a.x4, b.x4), (sbyte)math.max(a.x5, b.x5), (sbyte)math.max(a.x6, b.x6), (sbyte)math.max(a.x7, b.x7)));
     }
 }