A implementation for random walk using cuda.