Пример #1
0
 public static double[] Mark4(int[][] A, int[][] B, int[][] C, int Size, int Size1d, int n, int count)
 {
     double dummy = 0.0;
     double st = 0.0, sst = 0.0;
     for (int j = 0; j < n; j++)
     {
         Timer t = new Timer();
         for (int i = 0; i < count; i++)
             dummy += MA(A, B, C, Size, Size1d);
         double time = t.Check() / count;
         st += time;
         sst += time * time;
     }
     double mean = st / n, sdev = Math.Sqrt((sst - mean * mean * n) / (n - 1));
     return new double[2] { mean, sdev };
 }
Пример #2
0
 public static double[] Mark3(int[][] A, int[][] B, int[][] C, int Size, int Size1d, int n, int count)
 {
     double[] result = new double[n];
     double dummy = 0.0;
     for (int j = 0; j < n; j++)
     {
         Timer t = new Timer();
         for (int i = 0; i < count; i++)
         {
             dummy += MA(A, B, C, Size, Size1d);
         }
         double time = t.Check() / count;
         result[j] = time;
         Console.WriteLine("time: " + time + " ms");
     }
     return result;
 }