示例#1
0
        public void Subtract()
        {
            IntWrapper[,] expected = MakeResult(size, size, 10);
            FastMatrix <IntWrapper> matrix  = MakeMatrix(size, size, 15);
            FastMatrix <IntWrapper> matrix2 = MakeMatrix(size, size, 5);

            VerifyResults(cpu.Subtract(matrix, matrix2), expected);
        }
示例#2
0
        static void Subtract()
        {
            //process is same for parallel
            SingleThreadedOperator <IntWrapper> op = new SingleThreadedOperator <IntWrapper>();

            //two 5*3 matrices
            FastMatrix <IntWrapper> one = new FastMatrix <IntWrapper>(5, 3);
            FastMatrix <IntWrapper> two = new FastMatrix <IntWrapper>(5, 3);

            Utilities.FillMatrix(one, 5);
            Utilities.FillMatrix(two, 10);

            FastMatrix <IntWrapper> result = op.Subtract(one, two);

            Console.WriteLine(result);
        }
示例#3
0
        static void Subtract()
        {
            //process is same for parallel
            SingleThreadedOperator op = new SingleThreadedOperator();

            //two 5*3 matrices
            FastMatrix one = new FastMatrix(5, 3);
            FastMatrix two = new FastMatrix(5, 3);

            Utilities.FillMatrix(one, 5);
            Utilities.FillMatrix(two, 10);

            FastMatrix result = op.Subtract(one, two);

            result.Print();
        }