changed curand-thrust code