Calculation in parallel using GeForce Cuda

1

I have the following method that calculates the PI value serially:

        public static double CalculoPISerie()
        {
            double integral = 0;
            double h = 1.0 / NUMERO;

            for (int i = 0; i <= NUMERO; i++)
            {
                if (i == 0 || i == NUMERO)
                    integral += (4.0 / (1.0 + Math.Pow(i * h, 2)));
                else
                    integral += (2 * ((4.0 / (1.0 + Math.Pow(i * h, 2)))));
            }

            return integral * h / 2;
        }

I would like to do this method in parallel using GeForce's CUDA. How can I do it?

    
asked by anonymous 12.11.2016 / 00:26

0 answers