Problem with the sampling on GPU