Modifications to rand.cu