示例#1
0
文件: Claim.x.cs 项目: 0xCM/arrows
 /// <summary>
 /// Asserts content equality for two blocked spans of primal type
 /// </summary>
 /// <param name="lhs">The left span</param>
 /// <param name="rhs">The right span</param>
 /// <param name="caller">The invoking function</param>
 /// <param name="file">The file in which the invoking function is defined </param>
 /// <param name="line">The file line number of invocation</param>
 /// <typeparam name="T">The element type</typeparam>
 public static void ClaimEqual <T>(this ReadOnlySpan128 <T> lhs, ReadOnlySpan128 <T> rhs, [Member] string caller = null, [File] string file = null, [Line] int?line = null)
     where T : struct
 {
     for (var i = 0; i < Span128.Length(lhs, rhs); i++)
     {
         if (!gmath.eq(lhs[i], rhs[i]))
         {
             throw Errors.ItemsNotEqual(i, lhs[i], rhs[i], caller, file, line);
         }
     }
 }
示例#2
0
文件: gmath.x.cs 项目: 0xCM/arrows
 public static bool Identical <T>(this ReadOnlySpan128 <T> lhs, ReadOnlySpan128 <T> rhs)
     where T : struct
 {
     for (var i = 0; i < Span128.Length(lhs, rhs); i++)
     {
         if (gmath.neq(lhs[i], rhs[i]))
         {
             return(false);
         }
     }
     return(true);
 }