예제 #1
0
 public static void onCompletion(object sender, MatMulCompletedEventArgs e)
 {
     Console.WriteLine("Mat1:");
     MatMulCalculator.Print(e.Array1);
     Console.WriteLine("Mat2:");
     MatMulCalculator.Print(e.Array2);
     Console.WriteLine("Mat3:");
     MatMulCalculator.Print(e.Array3);
 }
예제 #2
0
        public static void Start()
        {
            int TaskID           = 1;
            MatMulCalculator mmc = new MatMulCalculator();


            for (int i = 0; i < 2; i++)
            {
                double[][] mat1 = MatMulCalculator.RandomMat(3);
                Thread.Sleep(50);
                double[][] mat2 = MatMulCalculator.RandomMat(3);
                mmc.MatMulAsync(mat1, mat2, TaskID);
                TaskID++;
            }
            Thread.Sleep(1000);
        }