示例#1
0
 public static void CallUnsafe(double[] a, int aStartIndex,
                               double[] b, int bStartIndex,
                               double[] y, int yStartIndex,
                               int length, UnsafeVectorVectorOperation operation)
 {
     fixed(double *p_a = &a[aStartIndex])
     {
         fixed(double *p_b = &b[bStartIndex])
         {
             fixed(double *p_y = &y[yStartIndex])
             {
                 operation(length, p_a, p_b, p_y);
             }
         }
     }
 }
 public static void CallUnsafe(double[] a, int aStartIndex,
     double[] b, int bStartIndex,
     double[] y, int yStartIndex,
     int length, UnsafeVectorVectorOperation operation)
 {
     fixed (double* p_a = &a[aStartIndex])
     {
         fixed (double* p_b = &b[bStartIndex])
         {
             fixed (double* p_y = &y[yStartIndex])
             {
                 operation(length, p_a, p_b, p_y);
             }
         }
     }
 }