CUDA implementation of the Jacobi method