Exemple #1
0
            private void CalculateCompleted(object operationState)
            {
                MatMulCalculatorCompletedEventArgs e = operationState as MatMulCalculatorCompletedEventArgs;

                if (MatMulCalculatorCompleted != null)
                {
                    event_0.Set();
                    MatMulCalculatorCompleted(this, e);
                }
            }
Exemple #2
0
            void Completion(int size, double[] mat, Exception ex, bool cancelled, AsyncOperation ao)
            {
                if (!cancelled)
                {
                    lock (tasks.SyncRoot)
                    {
                        tasks.Remove(ao.UserSuppliedState);
                    }
                }
                MatMulCalculatorCompletedEventArgs e = new MatMulCalculatorCompletedEventArgs(mat, size, ex, cancelled, ao.UserSuppliedState);

                ao.PostOperationCompleted(onCompletedCallback, e);
            }
Exemple #3
0
            void funkcja(object sender, MatMulCalculatorCompletedEventArgs e)
            {
                int count = 0;

                for (int i = 0; i < e.size; i++)
                {
                    for (int j = 0; j < e.size; j++)
                    {
                        Console.Write(e.matrix[count++] + " ");
                    }
                    Console.WriteLine("");
                }
            }