Exemplo n.º 1
0
        private static void RunIntraReturn()
        {
            const int m = 24 * 12;
            const int n = 25600 - 1;

            var matrixM = new Real[m * n];
            var matrixC = new Real[m * n];
            var vector1 = new Real[n];
            var vector2 = new Real[n];
            var vector3 = new Real[n];

            Benchmark.Run(Loops,
                          () => IntraReturn.Initialise(matrixM, vector1, vector2, vector3, m, n),
                          () => IntraReturn.Initialise(matrixC, vector1, vector2, vector3, m, n),
                          () => AssertAreEqual(matrixM, matrixC, m, n),
                          () => IntraReturn.Managed(matrixM, vector1, vector2, vector3, m, n),
                          () => IntraReturn.Cuda(matrixC, vector1, vector2, vector3, m, n));
        }
Exemplo n.º 2
0
        private static void RunIntraReturn(Gpu aleaGpu, CudaAccelerator ilGpu)
        {
            const int m = 2 * 24 * 12;
            const int n = 2 * 25600 - 1;

            var matrixM = new Real[m * n];
            var matrixC = new Real[m * n];
            var vector1 = new Real[n];
            var vector2 = new Real[n];
            var vector3 = new Real[n];

            Benchmark.Run(Loops,
                          () => IntraReturn.Initialise(matrixM, vector1, vector2, vector3, m, n),
                          () => IntraReturn.Initialise(matrixC, vector1, vector2, vector3, m, n),
                          () => AssertAreEqual(matrixM, matrixC, m, n),
                          () => IntraReturn.Managed(matrixM, vector1, vector2, vector3, m, n),
#if USE_ALEA
                          () => IntraReturn.Alea(aleaGpu, matrixC, vector1, vector2, vector3, m, n),
#endif
                          () => IntraReturn.IlGpu(ilGpu, matrixC, vector1, vector2, vector3, m, n));
        }